wui-components-v2 1.1.92 → 1.1.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/card-botom-buttons/card-botom-buttons.vue +9 -32
- package/components/fold-card2/fold-card2.vue +204 -0
- package/components/form-control/form-control.vue +27 -1
- package/components/wui-details-page/wui-details-page.vue +3 -3
- package/components/wui-edit-page/wui-edit-page-copy.vue +3 -3
- package/components/wui-edit-page/wui-edit-page.vue +3 -3
- package/components/wui-list/wui-list.vue +3 -3
- package/components/wui-select-list/wui-select-list.vue +3 -3
- package/components/wui-select-popup/wui-select-popup.vue +3 -3
- package/package.json +1 -1
|
@@ -77,7 +77,6 @@ function edit() {
|
|
|
77
77
|
|
|
78
78
|
const actionItem = ref<Groups>()
|
|
79
79
|
const actionItemShow = ref(false) // rowActions输入弹框开关
|
|
80
|
-
const showMoreButn = ref(false) // 更多按钮开关
|
|
81
80
|
// 打开rowActions弹框
|
|
82
81
|
async function action(subitem: rowActions) {
|
|
83
82
|
console.log(subitem, 2222222222222222)
|
|
@@ -196,12 +195,7 @@ const morebutns = computed(() => {
|
|
|
196
195
|
return buts
|
|
197
196
|
})
|
|
198
197
|
|
|
199
|
-
//
|
|
200
|
-
function closeMoreButn() {
|
|
201
|
-
showMoreButn.value = false
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// 点击更多按钮
|
|
198
|
+
// 点击操作按钮
|
|
205
199
|
async function select({ item }: { item: any }) {
|
|
206
200
|
// 复制操作:跳转新增页,仅复制基本信息(fieldMap),不带原 ID 和 relation 分组数据(如快递运单)
|
|
207
201
|
if (item.title.includes('复制')) {
|
|
@@ -246,7 +240,7 @@ console.log(props, '3333333333333')
|
|
|
246
240
|
</script>
|
|
247
241
|
|
|
248
242
|
<template>
|
|
249
|
-
<view class="flex items-center gap-1">
|
|
243
|
+
<view class="flex items-center gap-1 flex-wrap justify-end">
|
|
250
244
|
<!-- <view v-if="props.rowActions" class="flex gap-1">
|
|
251
245
|
<wd-button v-for="subitem in anctions" :key="subitem.id" plain size="small" @click="action(subitem)">
|
|
252
246
|
{{ subitem.title }}
|
|
@@ -257,36 +251,21 @@ console.log(props, '3333333333333')
|
|
|
257
251
|
{{ subitem.title }}
|
|
258
252
|
</wd-button>
|
|
259
253
|
</view> -->
|
|
260
|
-
|
|
254
|
+
|
|
255
|
+
<template v-for="subitem in morebutns" :key="subitem.id">
|
|
261
256
|
<wd-button
|
|
262
|
-
v-if="
|
|
257
|
+
v-if="isShowAction(subitem)"
|
|
258
|
+
plain
|
|
263
259
|
size="small"
|
|
264
|
-
type="info"
|
|
265
260
|
@click="
|
|
266
261
|
() => {
|
|
267
|
-
|
|
262
|
+
select({ item: subitem })
|
|
268
263
|
}
|
|
269
264
|
"
|
|
270
265
|
>
|
|
271
|
-
|
|
266
|
+
{{ subitem.title }}
|
|
272
267
|
</wd-button>
|
|
273
|
-
|
|
274
|
-
<template v-for="subitem in morebutns" :key="subitem.id">
|
|
275
|
-
<wd-button
|
|
276
|
-
v-if="isShowAction(subitem)"
|
|
277
|
-
plain
|
|
278
|
-
size="small"
|
|
279
|
-
@click="
|
|
280
|
-
() => {
|
|
281
|
-
select({ item: subitem })
|
|
282
|
-
}
|
|
283
|
-
"
|
|
284
|
-
>
|
|
285
|
-
{{ subitem.title }}
|
|
286
|
-
</wd-button>
|
|
287
|
-
</template>
|
|
288
|
-
</view>
|
|
289
|
-
</view>
|
|
268
|
+
</template>
|
|
290
269
|
|
|
291
270
|
<wd-button
|
|
292
271
|
v-if="props.item.buttons.includes('dtmplEdit') && isShowAction(props.buttonEditAction)"
|
|
@@ -311,7 +290,5 @@ console.log(props, '3333333333333')
|
|
|
311
290
|
:field-group="actionItem"
|
|
312
291
|
:code="props.code"
|
|
313
292
|
/>
|
|
314
|
-
<!-- 更多按钮 -->
|
|
315
|
-
<wd-action-sheet v-model="showMoreButn" :actions="morebutns" @close="closeMoreButn" @select="select" />
|
|
316
293
|
</view>
|
|
317
294
|
</template>
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, defineEmits, defineOptions, defineProps, ref } from 'vue'
|
|
3
|
+
import type { Columns, Entities, Enums, FoldCardModel, Groups } from '../../type'
|
|
4
|
+
import { formatItemData } from '../../utils'
|
|
5
|
+
import LabelValue from '../label-value/label-value.vue'
|
|
6
|
+
import { useManualTheme } from '../../composables/useManualTheme'
|
|
7
|
+
|
|
8
|
+
defineOptions({
|
|
9
|
+
name: 'FoldCard2',
|
|
10
|
+
// ★ 关闭属性透传,避免 H5 下根节点原生 onClick 与下面显式 emit('click') 重复触发
|
|
11
|
+
inheritAttrs: false,
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
// ★ 显式 emit click,保证微信小程序下 @click 能正常触发(小程序自定义组件不会自动透传原生 tap)
|
|
15
|
+
const emit = defineEmits<{
|
|
16
|
+
(e: 'click'): void
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
const props = defineProps<{
|
|
20
|
+
columns: Columns[]
|
|
21
|
+
collapseNum?: number
|
|
22
|
+
primaryColumn?: Columns
|
|
23
|
+
secondColumn?: Columns
|
|
24
|
+
labelColumn?: Columns
|
|
25
|
+
data: Entities
|
|
26
|
+
model: FoldCardModel
|
|
27
|
+
sourceId: string
|
|
28
|
+
groups: Groups
|
|
29
|
+
enumColumn?: Enums
|
|
30
|
+
index: number
|
|
31
|
+
}>()
|
|
32
|
+
const { currentThemeColor } = useManualTheme()
|
|
33
|
+
// 展示内容
|
|
34
|
+
const exhibitData = computed(() => {
|
|
35
|
+
const { collapseNum } = props
|
|
36
|
+
// collapseNum 为 0 时,只显示标题,不展示任何字段数据
|
|
37
|
+
if (collapseNum === 0) return []
|
|
38
|
+
const num = collapseNum || 5
|
|
39
|
+
const columns = props.columns.length >= num ? props.columns.slice(0, num) : props.columns
|
|
40
|
+
return columns.filter(item => item.title !== '操作')
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// 是否展示折叠按钮
|
|
44
|
+
const showCollapse = computed(() => {
|
|
45
|
+
const { collapseNum } = props
|
|
46
|
+
// collapseNum 为 0 时,默认收起全部字段,仍可点击展开
|
|
47
|
+
if (collapseNum === 0) return true
|
|
48
|
+
const num = collapseNum || 5
|
|
49
|
+
return props.columns.length > num
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
// 折叠内容
|
|
53
|
+
const collapseData = ref<Columns[]>([])
|
|
54
|
+
// 是否展开(用于驱动动画)
|
|
55
|
+
const expanded = ref(false)
|
|
56
|
+
|
|
57
|
+
// 标签字段
|
|
58
|
+
const labelColumns = computed(() => {
|
|
59
|
+
if (props.labelColumn && props.enumColumn) {
|
|
60
|
+
return props.enumColumn[props.labelColumn.mstrucId]
|
|
61
|
+
} else {
|
|
62
|
+
return []
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
// 折叠图标:未展开为 left,展开为 down
|
|
67
|
+
const collapseIcon = ref('left')
|
|
68
|
+
|
|
69
|
+
// 计算需要折叠展示的字段
|
|
70
|
+
function getCollapseColumns(): Columns[] {
|
|
71
|
+
const { collapseNum } = props
|
|
72
|
+
let columns: Columns[]
|
|
73
|
+
if (collapseNum === 0) {
|
|
74
|
+
// 默认不展示任何字段,展开时显示全部
|
|
75
|
+
columns = props.columns
|
|
76
|
+
} else {
|
|
77
|
+
const num = collapseNum || 5
|
|
78
|
+
columns = props.columns.length >= num ? props.columns.slice(num) : []
|
|
79
|
+
}
|
|
80
|
+
return columns.filter(item => item.title !== '操作')
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// 切换折叠内容
|
|
84
|
+
function toggleCollapse(contentId: string) {
|
|
85
|
+
console.log(contentId)
|
|
86
|
+
if (!expanded.value) {
|
|
87
|
+
collapseData.value = getCollapseColumns()
|
|
88
|
+
expanded.value = true
|
|
89
|
+
collapseIcon.value = 'down'
|
|
90
|
+
} else {
|
|
91
|
+
expanded.value = false
|
|
92
|
+
collapseIcon.value = 'left'
|
|
93
|
+
// 等收起动画结束后再清空内容,保证退出动画可见
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
if (!expanded.value) collapseData.value = []
|
|
96
|
+
}, 300)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<!-- 订单卡片容器 -->
|
|
103
|
+
<view class="mx-auto max-w-md space-y-4">
|
|
104
|
+
<!-- 订单卡片2 -->
|
|
105
|
+
<view class="ma-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-[var(--wot-dark-background2)]" @click="emit('click')">
|
|
106
|
+
<!-- 订单头部 -->
|
|
107
|
+
<view v-if="props.primaryColumn" class="flex items-center justify-between border-b border-gray-100 p-4">
|
|
108
|
+
<view class="flex min-w-0 flex-1 items-center gap-4 text-base text-gray-800 font-medium dark:text-white">
|
|
109
|
+
<view class="flex items-center gap-1">
|
|
110
|
+
<slot name="select" />
|
|
111
|
+
<view class="mr-1 h-4 w-1 rounded-2xl" :style="{ backgroundColor: currentThemeColor.primary }" />
|
|
112
|
+
</view>
|
|
113
|
+
<view class="min-w-0 flex-1">
|
|
114
|
+
<view class="flex min-w-0 flex-1 items-center gap-2">
|
|
115
|
+
<view class="min-w-0 flex-1 truncate font-700">
|
|
116
|
+
{{
|
|
117
|
+
formatItemData(
|
|
118
|
+
data.fieldMap[props.primaryColumn.sourceId],
|
|
119
|
+
props.primaryColumn.extControlType || props.primaryColumn.controlType
|
|
120
|
+
)
|
|
121
|
+
}}
|
|
122
|
+
</view>
|
|
123
|
+
<!-- 折叠按钮 -->
|
|
124
|
+
<wd-icon
|
|
125
|
+
v-if="showCollapse"
|
|
126
|
+
id="toggle-btn-2"
|
|
127
|
+
:name="collapseIcon"
|
|
128
|
+
size="24px"
|
|
129
|
+
class="ml-1 flex items-center text-sm text-[#6b7280]"
|
|
130
|
+
@click.stop="toggleCollapse(data.code)"
|
|
131
|
+
/>
|
|
132
|
+
<!-- <slot name="addressInfo" />s -->
|
|
133
|
+
</view>
|
|
134
|
+
<!-- <slot name="detailAddress" /> -->
|
|
135
|
+
</view>
|
|
136
|
+
</view>
|
|
137
|
+
<view
|
|
138
|
+
v-if="props.labelColumn"
|
|
139
|
+
class="whitespace-nowrap rounded px-1 py-1 text-sm text-white font-700"
|
|
140
|
+
:style="{
|
|
141
|
+
color: labelColumns?.find(
|
|
142
|
+
item => props.labelColumn && item.value === data.fieldMap[props.labelColumn.sourceId]
|
|
143
|
+
)?.css?.color,
|
|
144
|
+
}"
|
|
145
|
+
>
|
|
146
|
+
{{
|
|
147
|
+
formatItemData(
|
|
148
|
+
data.fieldMap[props.labelColumn.sourceId],
|
|
149
|
+
props.labelColumn.extControlType || props.labelColumn.controlType
|
|
150
|
+
)
|
|
151
|
+
}}
|
|
152
|
+
</view>
|
|
153
|
+
</view>
|
|
154
|
+
|
|
155
|
+
<!-- 订单内容 -->
|
|
156
|
+
<view v-if="props.model === 'complex'" class="p-4 pt-0">
|
|
157
|
+
<!-- 商品列表 -->
|
|
158
|
+
<view class="mb-3">
|
|
159
|
+
<!-- 订单信息 -->
|
|
160
|
+
<view class="text-sm space-y-3">
|
|
161
|
+
<LabelValue :exhibit-data="exhibitData" :data="data" :index="index" />
|
|
162
|
+
|
|
163
|
+
<!-- 可折叠内容 -->
|
|
164
|
+
<view class="fold-collapse" :class="expanded ? 'is-expanded' : 'is-collapsed'">
|
|
165
|
+
<view class="space-y-3">
|
|
166
|
+
<LabelValue :exhibit-data="collapseData" :data="data" :index="index" />
|
|
167
|
+
</view>
|
|
168
|
+
</view>
|
|
169
|
+
</view>
|
|
170
|
+
</view>
|
|
171
|
+
|
|
172
|
+
<!-- 订单底部 -->
|
|
173
|
+
<view class="flex items-center justify-end border-t border-gray-100">
|
|
174
|
+
<view class="flex items-center gap-1">
|
|
175
|
+
<slot name="buttons" />
|
|
176
|
+
</view>
|
|
177
|
+
</view>
|
|
178
|
+
</view>
|
|
179
|
+
</view>
|
|
180
|
+
</view>
|
|
181
|
+
</template>
|
|
182
|
+
|
|
183
|
+
<style>
|
|
184
|
+
.fold-collapse {
|
|
185
|
+
display: grid;
|
|
186
|
+
grid-template-rows: 0fr;
|
|
187
|
+
opacity: 0;
|
|
188
|
+
transition: grid-template-rows 0.3s ease, opacity 0.25s ease;
|
|
189
|
+
}
|
|
190
|
+
.fold-collapse > view {
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
min-height: 0;
|
|
193
|
+
}
|
|
194
|
+
.fold-collapse.is-expanded {
|
|
195
|
+
grid-template-rows: 1fr;
|
|
196
|
+
opacity: 1;
|
|
197
|
+
}
|
|
198
|
+
:deep(.wd-collapse-item__body) {
|
|
199
|
+
background-color: #f9f9f9 !important;
|
|
200
|
+
}
|
|
201
|
+
:deep(.wot-theme-dark .wd-collapse-item__body) {
|
|
202
|
+
background-color: #1b1b1e !important;
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, ref, toRaw, watch } from 'vue'
|
|
2
|
+
import { computed, onMounted, nextTick, ref, toRaw, watch } from 'vue'
|
|
3
3
|
import type { FormSchema, FormSchemaIssue } from '@wot-ui/ui/components/wd-form/types'
|
|
4
4
|
import dayjs from 'dayjs/esm/index'
|
|
5
5
|
import type { Enums, Fields, Groups } from '../../type'
|
|
@@ -126,6 +126,14 @@ function initFormData() {
|
|
|
126
126
|
return (models[item.sourceId] = val !== undefined && val !== null && val !== '' ? Number(val) : 0)
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// 开关:归一化为 "是"/"否" 字符串,避免 wd-switch 在 onBeforeMount 校验时
|
|
130
|
+
// 因 modelValue 非 active/inactive 值(如 ''、布尔、数字)被强制重置为未选中
|
|
131
|
+
if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'yes-no-switch') {
|
|
132
|
+
const def = (props.entity && props.entity[item.sourceId]) ?? item.transDefaultValue
|
|
133
|
+
const isYes = def === '是' || def === true || def === 1 || def === 'true' || def === '1'
|
|
134
|
+
return (models[item.sourceId] = isYes ? '是' : '否')
|
|
135
|
+
}
|
|
136
|
+
|
|
129
137
|
return (models[item.sourceId] = (props.entity && props.entity[item.sourceId]) || item.transDefaultValue || '')
|
|
130
138
|
})
|
|
131
139
|
|
|
@@ -427,6 +435,24 @@ hydrocarbonProgramToken.value = uni.getStorageSync('HYDROCARBON_PROGRAM_TOKEN')
|
|
|
427
435
|
token.value = uni.getStorageSync('TOKEN')
|
|
428
436
|
initFormData()
|
|
429
437
|
initialModel.value = JSON.parse(JSON.stringify(model.value))
|
|
438
|
+
|
|
439
|
+
// 小程序端 setData 异步:wd-switch 在 popup 内延迟挂载时,onBeforeMount 可能读到
|
|
440
|
+
// 初始(未同步)的 modelValue,被组件校正逻辑强制重置为 inactiveValue("否")。
|
|
441
|
+
// 挂载完成后再兜底恢复一次正确的默认值,确保默认选中生效。
|
|
442
|
+
onMounted(() => {
|
|
443
|
+
nextTick(() => {
|
|
444
|
+
fields.value.forEach((item: any) => {
|
|
445
|
+
if (ControlTypeSupportor.getControlType(item) === 'yes-no-switch') {
|
|
446
|
+
const def = (props.entity && props.entity[item.sourceId]) ?? item.transDefaultValue
|
|
447
|
+
const isYes = def === '是' || def === true || def === 1 || def === 'true' || def === '1'
|
|
448
|
+
const expected = isYes ? '是' : '否'
|
|
449
|
+
if (model.value[item.sourceId] !== expected) {
|
|
450
|
+
model.value[item.sourceId] = expected
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
})
|
|
454
|
+
})
|
|
455
|
+
})
|
|
430
456
|
function formatSelectColumns(columns: any) {
|
|
431
457
|
return columns.map((item: any) => {
|
|
432
458
|
return {
|
|
@@ -4,7 +4,7 @@ import { onLoad } from '@dcloudio/uni-app'
|
|
|
4
4
|
import { detailPageConfig, detailPageData } from '../../api/page'
|
|
5
5
|
import type { Entities, Groups, dtmplConfig } from '../../type'
|
|
6
6
|
import CardBotomButtons from '../card-botom-buttons/card-botom-buttons.vue'
|
|
7
|
-
import
|
|
7
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
8
8
|
import LabelValue from '../label-value/label-value.vue'
|
|
9
9
|
|
|
10
10
|
defineOptions({
|
|
@@ -132,11 +132,11 @@ async function getDetailData() {
|
|
|
132
132
|
</view>
|
|
133
133
|
<view v-if="group.type === 'relation'">
|
|
134
134
|
<view v-for="(field, subindex) in data.arrayMap[group.id]" :key="field.code">
|
|
135
|
-
<
|
|
135
|
+
<foldCard2 :index="subindex" :enum-column="{}" :groups="group" :source-id="sourceId" :columns="group.fields" model="complex" :data="field">
|
|
136
136
|
<template #buttons>
|
|
137
137
|
<CardBotomButtons :primary-column="group.primaryColumn || { controlType: '', extControlType: '', sourceId: '', mstrucId: '' }" :source-id="group.id" :item="groups" :code="field.code" :data="data" />
|
|
138
138
|
</template>
|
|
139
|
-
</
|
|
139
|
+
</foldCard2>
|
|
140
140
|
</view>
|
|
141
141
|
</view>
|
|
142
142
|
</wd-collapse-item>
|
|
@@ -7,7 +7,7 @@ import FormControl from '../form-control/form-control.vue'
|
|
|
7
7
|
import { addPageConfig, editPageConfig, editPageDataSave, enums, selectDatas } from '../../api/page'
|
|
8
8
|
import type { Entities, Enums, Groups, dtmplConfig } from '../../type'
|
|
9
9
|
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
10
|
-
import
|
|
10
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
11
11
|
import { generateHighResolutionID } from '../../utils/index'
|
|
12
12
|
import TreeSelectControl from '../tree-select/index.vue'
|
|
13
13
|
import batchUploadFile from '../batch-upload-file/batch-upload-file.vue'
|
|
@@ -720,7 +720,7 @@ function handleFileChange(e: any, group: Groups) {
|
|
|
720
720
|
</wd-button>
|
|
721
721
|
</view>
|
|
722
722
|
<view v-for="(field, index) in pageConfig?.entity?.arrayMap[group.id]" :key="field.code">
|
|
723
|
-
<
|
|
723
|
+
<foldCard2
|
|
724
724
|
:index="index" :enum-column="{}" :groups="group" :source-id="sourceId" :columns="group.fields"
|
|
725
725
|
model="complex" :data="field"
|
|
726
726
|
>
|
|
@@ -738,7 +738,7 @@ function handleFileChange(e: any, group: Groups) {
|
|
|
738
738
|
删除
|
|
739
739
|
</wd-button>
|
|
740
740
|
</template>
|
|
741
|
-
</
|
|
741
|
+
</foldCard2>
|
|
742
742
|
</view>
|
|
743
743
|
</view>
|
|
744
744
|
</view>
|
|
@@ -7,7 +7,7 @@ import { addPageConfig, editPageConfig, editPageDataSave, enums, selectDatas, ac
|
|
|
7
7
|
import type { Entities, Enums, Groups, dtmplConfig, rowActions, Fields } from '../../type'
|
|
8
8
|
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
9
9
|
import { useGlobalMessage } from '../../composables/useGlobalMessage'
|
|
10
|
-
import
|
|
10
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
11
11
|
import ActionPopup from '../action-popup/action-popup.vue'
|
|
12
12
|
import { generateHighResolutionID, comparator } from '../../utils/index'
|
|
13
13
|
import TreeSelectControl from '../tree-select/index.vue'
|
|
@@ -937,7 +937,7 @@ console.log(pageConfig, 'props111')
|
|
|
937
937
|
</view>
|
|
938
938
|
<view v-else>
|
|
939
939
|
<view v-for="(field, index) in pageConfig?.entity?.arrayMap[group.id]" :key="field.code">
|
|
940
|
-
<
|
|
940
|
+
<foldCard2
|
|
941
941
|
:index="index"
|
|
942
942
|
:enum-column="{}"
|
|
943
943
|
:groups="group"
|
|
@@ -962,7 +962,7 @@ console.log(pageConfig, 'props111')
|
|
|
962
962
|
删除
|
|
963
963
|
</wd-button>
|
|
964
964
|
</template>
|
|
965
|
-
</
|
|
965
|
+
</foldCard2>
|
|
966
966
|
</view>
|
|
967
967
|
</view>
|
|
968
968
|
</view>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { defineOptions, defineProps, onMounted, onUnmounted, ref } from 'vue'
|
|
3
3
|
import { onLoad } from '@dcloudio/uni-app'
|
|
4
4
|
import { listData, pageConfig, pageKey } from '../../api/page'
|
|
5
|
-
import
|
|
5
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
6
6
|
import type { Config, Entities } from '../../type'
|
|
7
7
|
import Search from '../search/search.vue'
|
|
8
8
|
import ListTopButtons from '../list-top-buttons/list-top-buttons.vue'
|
|
@@ -246,7 +246,7 @@ function tabSearchClick(data: any) {
|
|
|
246
246
|
</productCard>
|
|
247
247
|
</view>
|
|
248
248
|
<view v-else>
|
|
249
|
-
<
|
|
249
|
+
<foldCard2
|
|
250
250
|
v-for="(item, index) in datas"
|
|
251
251
|
:key="item.code"
|
|
252
252
|
:index="index"
|
|
@@ -281,7 +281,7 @@ function tabSearchClick(data: any) {
|
|
|
281
281
|
:button-edit-action="config.buttonEditAction"
|
|
282
282
|
/>
|
|
283
283
|
</template>
|
|
284
|
-
</
|
|
284
|
+
</foldCard2>
|
|
285
285
|
</view>
|
|
286
286
|
|
|
287
287
|
<template #bottom>
|
|
@@ -3,7 +3,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
|
3
3
|
import { onLoad } from '@dcloudio/uni-app'
|
|
4
4
|
import { useRouter } from 'uni-mini-router'
|
|
5
5
|
import { enums, listData, pageConfig, pageKey } from '../../api/page'
|
|
6
|
-
import
|
|
6
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
7
7
|
import type { Config, Entities, Enums, FoldCardModel } from '../../type'
|
|
8
8
|
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
9
9
|
import Search from '../search/search.vue'
|
|
@@ -251,7 +251,7 @@ onUnmounted(() => {
|
|
|
251
251
|
<slot name="top" />
|
|
252
252
|
</template>
|
|
253
253
|
|
|
254
|
-
<
|
|
254
|
+
<foldCard2
|
|
255
255
|
v-for="(item, index) in datas"
|
|
256
256
|
:key="item.code"
|
|
257
257
|
:index="index"
|
|
@@ -286,7 +286,7 @@ onUnmounted(() => {
|
|
|
286
286
|
<!-- <template #buttons>
|
|
287
287
|
<CardBotomButtons :data="item" :groups="config" :source-id="sourceId" :item="config" :code="item.code" />
|
|
288
288
|
</template> -->
|
|
289
|
-
</
|
|
289
|
+
</foldCard2>
|
|
290
290
|
|
|
291
291
|
<template #bottom>
|
|
292
292
|
<slot name="bottom">
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
3
3
|
import { enums, listData, pageConfig, pageKey } from '../../api/page'
|
|
4
|
-
import
|
|
4
|
+
import foldCard2 from '../fold-card2/fold-card2.vue'
|
|
5
5
|
import Search from '../search/search.vue'
|
|
6
6
|
import type { Config, Entities, Enums, FoldCardModel } from '../../type'
|
|
7
7
|
import { useGlobalToast } from '../../composables/useGlobalToast'
|
|
@@ -475,7 +475,7 @@ console.log(props, 'props')
|
|
|
475
475
|
<slot name="top" />
|
|
476
476
|
</template>
|
|
477
477
|
|
|
478
|
-
<
|
|
478
|
+
<foldCard2
|
|
479
479
|
v-for="(item, index) in datas"
|
|
480
480
|
:key="item.code"
|
|
481
481
|
:index="index"
|
|
@@ -496,7 +496,7 @@ console.log(props, 'props')
|
|
|
496
496
|
:type="checkboxType"
|
|
497
497
|
/>
|
|
498
498
|
</template>
|
|
499
|
-
</
|
|
499
|
+
</foldCard2>
|
|
500
500
|
|
|
501
501
|
<template #bottom>
|
|
502
502
|
<view class="popup-footer flex justify-center gap-4 p-4 border-t border-gray-200">
|