chore(组件): 组件尽量使用异步导入模式

This commit is contained in:
2026-01-04 14:40:00 +08:00
parent 4da852944e
commit 9415f397d2
172 changed files with 11520 additions and 10979 deletions

View File

@@ -2,17 +2,17 @@
<view>
<view class="content">
<view class="goods-attr">
<view class="title">{{title}}</view>
<view class="title">{{ title }}</view>
<view class="attr-wrap">
<block v-for="(item, index) in list" :key="index">
<view class="item">
<text class="attr-name" :style="{background: item.background}">{{item.text}}</text>
<text class="value-name" :style="{color: item.color}">{{item.value}}</text>
<text class="attr-name" :style="{ background: item.background }">{{ item.text }}</text>
<text class="value-name" :style="{ color: item.color }">{{ item.value }}</text>
</view>
</block>
</view>
</view>
<block v-if="g0>0">
<block v-if="g0 > 0">
<view class="foot">
<view @tap="generateImage" class="item" style="margin-right:30rpx;">导出图片</view>
<view @tap="generatePdf" class="item">导出PDF</view>
@@ -60,7 +60,7 @@ export default {
const filePath = res.tempFilePath;
uni.shareFileMessage({
filePath: filePath,
success: () => {},
success: () => { },
fail: console.error
});
}

View File

@@ -3,7 +3,8 @@
<view class="content">
<view class="cate-search">
<view class="search-box">
<input class="uni-input" maxlength="50" confirm-type="search" :focus="true" placeholder="请输入介质名称 '如汽油'" v-model="inputValue" @focus="inputFocus" @confirm="search" @input="inputChange" />
<input class="uni-input" maxlength="50" confirm-type="search" :focus="true" placeholder="请输入介质名称 '如汽油'"
v-model="inputValue" @focus="inputFocus" @confirm="search" @input="inputChange" />
<text @tap="search" class="iconfont icon-sousuo3"></text>
</view>
</view>
@@ -17,7 +18,7 @@
<view class="history-bottom">
<block v-for="(item, index) in list" :key="index">
<view @tap="otherSearch(item, index)" @longtap="deleteItem(item, index)" class="history-li">
<view>{{item.name}}</view>
<view>{{ item.name }}</view>
</view>
</block>
</view>
@@ -33,11 +34,9 @@
</template>
<script>
import nsEmpty from '@/components/ns-empty/ns-empty';
export default {
components: {
nsEmpty
nsEmpty: () => import('@/components/ns-empty/ns-empty.vue'),
},
data() {
return {