wui-components-v2 1.1.84 → 1.1.85
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/add-address-page/add-address-page.vue +4 -2
- package/components/custom-date-picker/custom-date-picker.vue +4 -3
- package/components/custom-select-picker/custom-select-picker.vue +11 -3
- package/components/form-control/form-control.vue +9 -1
- package/components/user-choose/user-choose.vue +3 -0
- package/components/wui-select-popup/wui-select-popup.vue +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="rounded-md mb-3">
|
|
3
3
|
<view class="rounded-md shadow-md dark:bg-[#252530] pb-3">
|
|
4
|
-
<wd-textarea v-model="personDetail" placeholder="「粘贴识别」或输入文本,智能拆分、姓名、电话和地址" />
|
|
4
|
+
<wd-textarea v-model="personDetail" :readonly="readonly" placeholder="「粘贴识别」或输入文本,智能拆分、姓名、电话和地址" />
|
|
5
5
|
<view class="flex justify-end align-center px-3">
|
|
6
|
-
<view class="px-3 text-white bg-[#007AFF] rounded-md py-1 text-sm box-border" @click="identifyingFn">
|
|
6
|
+
<view v-if="!readonly" class="px-3 text-white bg-[#007AFF] rounded-md py-1 text-sm box-border" @click="identifyingFn">
|
|
7
7
|
智能识别
|
|
8
8
|
</view>
|
|
9
9
|
</view>
|
|
@@ -20,6 +20,7 @@ defineOptions({
|
|
|
20
20
|
})
|
|
21
21
|
const props = defineProps<{
|
|
22
22
|
group: any
|
|
23
|
+
readonly?: boolean
|
|
23
24
|
}>()
|
|
24
25
|
const model = defineModel<any>()
|
|
25
26
|
const personDetail = ref('')
|
|
@@ -29,6 +30,7 @@ const form = ref(null)
|
|
|
29
30
|
* @description: 智能识别
|
|
30
31
|
*/
|
|
31
32
|
function identifyingFn() {
|
|
33
|
+
if (props.readonly) return
|
|
32
34
|
if (!personDetail.value) {
|
|
33
35
|
toast.info('请输入内容')
|
|
34
36
|
return
|
|
@@ -13,6 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
type: { type: String, default: 'date' },
|
|
14
14
|
min: String,
|
|
15
15
|
max: String,
|
|
16
|
+
readonly: { type: Boolean, default: false },
|
|
16
17
|
})
|
|
17
18
|
|
|
18
19
|
const emit = defineEmits<{
|
|
@@ -64,9 +65,9 @@ console.log('labelText', props)
|
|
|
64
65
|
|
|
65
66
|
<template>
|
|
66
67
|
<div class="flex items-center justify-between">
|
|
67
|
-
<wd-input v-model="labelText" readonly :placeholder="placeholder" class="flex-1" @click="open = true" />
|
|
68
|
-
<wd-icon v-if="labelText" name="close-circle" size="16px" @click="clear" />
|
|
69
|
-
<wd-icon v-else name="right" size="16px" @click="clear" />
|
|
68
|
+
<wd-input v-model="labelText" readonly :placeholder="placeholder" class="flex-1" @click="!readonly && (open = true)" />
|
|
69
|
+
<wd-icon v-if="!readonly && labelText" name="close-circle" size="16px" @click="clear" />
|
|
70
|
+
<wd-icon v-else-if="!readonly" name="right" size="16px" @click="clear" />
|
|
70
71
|
</div>
|
|
71
72
|
|
|
72
73
|
<wd-calendar
|
|
@@ -14,6 +14,7 @@ const props = defineProps({
|
|
|
14
14
|
labelKey: { type: String, default: 'label' },
|
|
15
15
|
valueKey: { type: String, default: 'value' },
|
|
16
16
|
type: { type: String, default: 'radio' },
|
|
17
|
+
readonly: { type: Boolean, default: false },
|
|
17
18
|
})
|
|
18
19
|
|
|
19
20
|
const emit = defineEmits<{
|
|
@@ -63,9 +64,15 @@ const labelText = computed(() => {
|
|
|
63
64
|
|
|
64
65
|
<template>
|
|
65
66
|
<div class="flex items-center justify-between">
|
|
66
|
-
<wd-input
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
<wd-input
|
|
68
|
+
v-model="labelText"
|
|
69
|
+
readonly
|
|
70
|
+
:placeholder="placeholder"
|
|
71
|
+
class="flex-1"
|
|
72
|
+
@click="!readonly && (open = true)"
|
|
73
|
+
/>
|
|
74
|
+
<wd-icon v-if="!readonly && labelText" name="close-circle" size="16px" @click="clear" />
|
|
75
|
+
<wd-icon v-else-if="!readonly" name="right" size="16px" @click="clear" />
|
|
69
76
|
</div>
|
|
70
77
|
|
|
71
78
|
<wd-select-picker
|
|
@@ -76,6 +83,7 @@ const labelText = computed(() => {
|
|
|
76
83
|
value-key="value"
|
|
77
84
|
class="custom-select-picker"
|
|
78
85
|
:type="type as any"
|
|
86
|
+
:readonly="readonly"
|
|
79
87
|
/>
|
|
80
88
|
</template>
|
|
81
89
|
|
|
@@ -111,7 +111,7 @@ function initFormData() {
|
|
|
111
111
|
|
|
112
112
|
// 时间
|
|
113
113
|
if (
|
|
114
|
-
ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === '
|
|
114
|
+
ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'eetime' ||
|
|
115
115
|
ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date'
|
|
116
116
|
) {
|
|
117
117
|
return (models[item.sourceId] =
|
|
@@ -623,6 +623,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
623
623
|
:placeholder="`请选择${item.title}`"
|
|
624
624
|
:columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])"
|
|
625
625
|
type="radio"
|
|
626
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
626
627
|
/>
|
|
627
628
|
</wd-form-item>
|
|
628
629
|
<wd-form-item
|
|
@@ -642,6 +643,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
642
643
|
:title="item.title"
|
|
643
644
|
:add-event="addEvent"
|
|
644
645
|
:ext-control-type="item.extControlType"
|
|
646
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
645
647
|
/>
|
|
646
648
|
</wd-form-item>
|
|
647
649
|
<wd-form-item
|
|
@@ -657,6 +659,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
657
659
|
:placeholder="`请选择${item.title}`"
|
|
658
660
|
:columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])"
|
|
659
661
|
type="checkbox"
|
|
662
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
660
663
|
/>
|
|
661
664
|
</wd-form-item>
|
|
662
665
|
<wd-form-item
|
|
@@ -672,6 +675,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
672
675
|
type="date"
|
|
673
676
|
:clearable="!item.disabled"
|
|
674
677
|
:placeholder="`请选择${item.title}`"
|
|
678
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
675
679
|
/>
|
|
676
680
|
</wd-form-item>
|
|
677
681
|
<wd-form-item
|
|
@@ -688,6 +692,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
688
692
|
type="datetime"
|
|
689
693
|
:clearable="!item.disabled"
|
|
690
694
|
:placeholder="`请选择${item.title}`"
|
|
695
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
691
696
|
/>
|
|
692
697
|
</wd-form-item>
|
|
693
698
|
<wd-form-item
|
|
@@ -704,6 +709,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
704
709
|
use-second
|
|
705
710
|
:clearable="!item.disabled"
|
|
706
711
|
:placeholder="`请选择${item.title}`"
|
|
712
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
707
713
|
/>
|
|
708
714
|
</wd-form-item>
|
|
709
715
|
<wd-form-item
|
|
@@ -720,6 +726,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
720
726
|
use-second
|
|
721
727
|
:clearable="!item.disabled"
|
|
722
728
|
:placeholder="`请选择${item.title}`"
|
|
729
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
723
730
|
/>
|
|
724
731
|
</wd-form-item>
|
|
725
732
|
<wd-form-item
|
|
@@ -736,6 +743,7 @@ console.log('clearValueMap', clearValueMap)
|
|
|
736
743
|
use-second
|
|
737
744
|
:clearable="!item.disabled"
|
|
738
745
|
:placeholder="`请选择${item.title}`"
|
|
746
|
+
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
739
747
|
/>
|
|
740
748
|
</wd-form-item>
|
|
741
749
|
<wd-form-item
|
|
@@ -31,6 +31,7 @@ const props = defineProps({
|
|
|
31
31
|
sourceId: String,
|
|
32
32
|
title: String,
|
|
33
33
|
extControlType: String,
|
|
34
|
+
readonly: { type: Boolean, default: false },
|
|
34
35
|
})
|
|
35
36
|
|
|
36
37
|
const emit = defineEmits<{
|
|
@@ -49,6 +50,7 @@ const showValue = reactive({
|
|
|
49
50
|
const EVENT_NAME = `userChooseSelected_${generateHighResolutionID()}`
|
|
50
51
|
|
|
51
52
|
const addUser = () => {
|
|
53
|
+
if (props.readonly) return
|
|
52
54
|
const addEvent = generateHighResolutionID()
|
|
53
55
|
// 当前已有数据时,跳转到编辑页面
|
|
54
56
|
if (currentValue.value && typeof currentValue.value === 'string') {
|
|
@@ -69,6 +71,7 @@ const addUser = () => {
|
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
const toAddressList = () => {
|
|
74
|
+
if (props.readonly) return
|
|
72
75
|
uni.navigateTo({
|
|
73
76
|
url: `/pages/select-list/index?sourceId=${props.sourceId}&title=${props.title}&extControlType=${props.extControlType}&selectEvent=${EVENT_NAME}`,
|
|
74
77
|
})
|
|
@@ -425,8 +425,8 @@ console.log(props, 'props')
|
|
|
425
425
|
|
|
426
426
|
<!-- 右侧箭头 -->
|
|
427
427
|
<view class="cell-arrow">
|
|
428
|
-
<wd-icon v-if="clearable && displayValue" name="close-circle" size="16px" @click.stop="clear" />
|
|
429
|
-
<wd-icon name="right"
|
|
428
|
+
<wd-icon v-if="clearable && !readonly && displayValue" name="close-circle" size="16px" @click.stop="clear" />
|
|
429
|
+
<wd-icon v-else-if="!readonly" name="right" size="16px"></wd-icon>
|
|
430
430
|
</view>
|
|
431
431
|
</view>
|
|
432
432
|
|