wui-components-v2 1.1.91 → 1.1.92
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.
|
@@ -259,7 +259,7 @@ console.log(props, '3333333333333')
|
|
|
259
259
|
</view> -->
|
|
260
260
|
<view>
|
|
261
261
|
<wd-button
|
|
262
|
-
v-if="morebutns.length >
|
|
262
|
+
v-if="morebutns.length > 1"
|
|
263
263
|
size="small"
|
|
264
264
|
type="info"
|
|
265
265
|
@click="
|
|
@@ -288,9 +288,20 @@ console.log(props, '3333333333333')
|
|
|
288
288
|
</view>
|
|
289
289
|
</view>
|
|
290
290
|
|
|
291
|
-
<wd-button
|
|
291
|
+
<wd-button
|
|
292
|
+
v-if="props.item.buttons.includes('dtmplEdit') && isShowAction(props.buttonEditAction)"
|
|
293
|
+
size="small"
|
|
294
|
+
@click="edit()"
|
|
295
|
+
>
|
|
296
|
+
编辑
|
|
297
|
+
</wd-button>
|
|
292
298
|
<wd-button v-if="props.item.buttons.includes('detail')" size="small" type="info" @click="detail()">详情</wd-button>
|
|
293
|
-
<wd-button
|
|
299
|
+
<wd-button
|
|
300
|
+
v-if="props.item.buttons.includes('singleDelete') && isShowAction(props.buttonDeleteAction)"
|
|
301
|
+
size="small"
|
|
302
|
+
type="danger"
|
|
303
|
+
@click="del()"
|
|
304
|
+
>
|
|
294
305
|
删除
|
|
295
306
|
</wd-button>
|
|
296
307
|
<ActionPopup
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed, defineOptions, defineProps, ref } from 'vue'
|
|
2
|
+
import { computed, defineEmits, defineOptions, defineProps, ref } from 'vue'
|
|
3
3
|
import type { Columns, Entities, Enums, FoldCardModel, Groups } from '../../type'
|
|
4
4
|
import { formatItemData } from '../../utils'
|
|
5
5
|
import LabelValue from '../label-value/label-value.vue'
|
|
@@ -7,8 +7,15 @@ import { useManualTheme } from '../../composables/useManualTheme'
|
|
|
7
7
|
|
|
8
8
|
defineOptions({
|
|
9
9
|
name: 'FoldCard',
|
|
10
|
+
// ★ 关闭属性透传,避免 H5 下根节点原生 onClick 与下面显式 emit('click') 重复触发
|
|
11
|
+
inheritAttrs: false,
|
|
10
12
|
})
|
|
11
13
|
|
|
14
|
+
// ★ 显式 emit click,保证微信小程序下 @click 能正常触发(小程序自定义组件不会自动透传原生 tap)
|
|
15
|
+
const emit = defineEmits<{
|
|
16
|
+
(e: 'click'): void
|
|
17
|
+
}>()
|
|
18
|
+
|
|
12
19
|
const props = defineProps<{
|
|
13
20
|
columns: Columns[]
|
|
14
21
|
collapseNum?: number
|
|
@@ -89,7 +96,7 @@ function toggleCollapse(contentId: string) {
|
|
|
89
96
|
<!-- 订单卡片容器 -->
|
|
90
97
|
<view class="mx-auto max-w-md space-y-4">
|
|
91
98
|
<!-- 订单卡片2 -->
|
|
92
|
-
<view class="ma-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-[var(--wot-dark-background2)]">
|
|
99
|
+
<view class="ma-2 overflow-hidden rounded-xl bg-white shadow-sm dark:bg-[var(--wot-dark-background2)]" @click="emit('click')">
|
|
93
100
|
<!-- 订单头部 -->
|
|
94
101
|
<view v-if="props.primaryColumn" class="flex items-center justify-between border-b border-gray-100 p-4">
|
|
95
102
|
<view class="flex items-center gap-4 text-base text-gray-800 font-medium dark:text-white">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { computed,
|
|
2
|
+
import { computed, 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'
|
|
@@ -420,13 +420,13 @@ watch(
|
|
|
420
420
|
}
|
|
421
421
|
)
|
|
422
422
|
|
|
423
|
-
onBeforeMount
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
423
|
+
// 提前到 setup 同步初始化,确保子组件(如 wd-switch)onBeforeMount 时 model 已就绪,
|
|
424
|
+
// 避免小程序中因初始化晚于子组件导致默认值被组件校正逻辑重置为未选中
|
|
425
|
+
action.value = uni.getStorageSync('BASE_URL')
|
|
426
|
+
hydrocarbonProgramToken.value = uni.getStorageSync('HYDROCARBON_PROGRAM_TOKEN')
|
|
427
|
+
token.value = uni.getStorageSync('TOKEN')
|
|
428
|
+
initFormData()
|
|
429
|
+
initialModel.value = JSON.parse(JSON.stringify(model.value))
|
|
430
430
|
function formatSelectColumns(columns: any) {
|
|
431
431
|
return columns.map((item: any) => {
|
|
432
432
|
return {
|