wui-components-v2 1.1.72 → 1.1.73
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.
|
@@ -8,10 +8,6 @@ defineOptions({
|
|
|
8
8
|
const props = defineProps({
|
|
9
9
|
modelValue: String,
|
|
10
10
|
placeholder: String,
|
|
11
|
-
columns: {
|
|
12
|
-
type: Array as PropType<SelectOption[]>,
|
|
13
|
-
default: () => [],
|
|
14
|
-
},
|
|
15
11
|
labelKey: { type: String, default: 'label' },
|
|
16
12
|
valueKey: { type: String, default: 'value' },
|
|
17
13
|
type: { type: String, default: 'date' },
|
|
@@ -40,7 +36,7 @@ watch(
|
|
|
40
36
|
)
|
|
41
37
|
|
|
42
38
|
watch(currentValue, val => {
|
|
43
|
-
const newVal = props.type
|
|
39
|
+
const newVal = ['year', 'month'].includes(props.type) ? dayjs(val).format('YYYY-MM') : val
|
|
44
40
|
emit('update:modelValue', newVal)
|
|
45
41
|
})
|
|
46
42
|
|
|
@@ -71,7 +67,7 @@ const labelText = computed(() => {
|
|
|
71
67
|
</div>
|
|
72
68
|
|
|
73
69
|
<wd-calendar
|
|
74
|
-
v-if="['date', 'datetime'].includes(type)"
|
|
70
|
+
v-if="['date', 'datetime', 'month'].includes(type)"
|
|
75
71
|
v-model="currentValue"
|
|
76
72
|
v-model:visible="open"
|
|
77
73
|
label-key="label"
|
|
@@ -291,7 +291,7 @@ defineExpose({
|
|
|
291
291
|
})
|
|
292
292
|
const clearValueMap = fields.value.reduce(
|
|
293
293
|
(acc, field) => {
|
|
294
|
-
acc[field.id] = field.clearValueOnHidden ? '' : field.defaultValue ?? null
|
|
294
|
+
acc[field.id] = field.clearValueOnHidden ? '' : (field.defaultValue ?? null)
|
|
295
295
|
return acc
|
|
296
296
|
},
|
|
297
297
|
{} as Record<string, any>
|
|
@@ -479,6 +479,22 @@ console.log('clearValueMap', clearValueMap)
|
|
|
479
479
|
:placeholder="`请选择${item.title}`"
|
|
480
480
|
/>
|
|
481
481
|
</wd-form-item>
|
|
482
|
+
<wd-form-item
|
|
483
|
+
v-else-if="
|
|
484
|
+
ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date-M1'
|
|
485
|
+
"
|
|
486
|
+
:class="{ 'no-border-top': fields.indexOf(item) === 0 }"
|
|
487
|
+
:prop="item.sourceId"
|
|
488
|
+
:title="item.title"
|
|
489
|
+
>
|
|
490
|
+
<customDatePicker
|
|
491
|
+
v-model="model[item.sourceId]"
|
|
492
|
+
type="month"
|
|
493
|
+
use-second
|
|
494
|
+
:clearable="!item.disabled"
|
|
495
|
+
:placeholder="`请选择${item.title}`"
|
|
496
|
+
/>
|
|
497
|
+
</wd-form-item>
|
|
482
498
|
<wd-form-item
|
|
483
499
|
v-else-if="
|
|
484
500
|
ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' ||
|
|
@@ -32,6 +32,7 @@ const props = defineProps({
|
|
|
32
32
|
title: String,
|
|
33
33
|
extControlType: String,
|
|
34
34
|
})
|
|
35
|
+
console.log('props11111', props)
|
|
35
36
|
|
|
36
37
|
const emit = defineEmits<{
|
|
37
38
|
'update:modelValue': [value: string]
|
|
@@ -51,7 +52,8 @@ const EVENT_NAME = `userChooseSelected_${generateHighResolutionID()}`
|
|
|
51
52
|
const addUser = () => {
|
|
52
53
|
const addEvent = generateHighResolutionID()
|
|
53
54
|
// 当前已有数据时,跳转到编辑页面
|
|
54
|
-
if (currentValue.value) {
|
|
55
|
+
if (currentValue.value && typeof currentValue.value === 'string') {
|
|
56
|
+
console.log('currentValue.value', currentValue.value)
|
|
55
57
|
// 和 fetchDataById 中的 requestId 逻辑保持一致
|
|
56
58
|
const entityId = currentValue.value.split('@R@')[0]
|
|
57
59
|
router.push(
|