af-mobile-client-vue3 1.2.18 → 1.2.19
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/package.json +1 -1
- package/src/components/data/XCellList/index.vue +49 -11
- package/src/components/data/XCellListFilter/index.vue +87 -16
- package/src/components/data/XForm/index.vue +67 -28
- package/src/components/data/XFormItem/index.vue +271 -213
- package/src/components/data/XOlMap/index.vue +4 -3
- package/src/components/data/XOlMap/types.ts +2 -0
- package/src/components/data/XReportGrid/XReportDemo.vue +33 -33
- package/src/components/data/XReportGrid/print.js +184 -184
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/component/XCellListView/index.vue +126 -127
- package/src/views/component/XFormGroupView/index.vue +4 -7
- package/vite.config.ts +2 -2
|
@@ -12,7 +12,6 @@ import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
|
12
12
|
import { searchToListOption, searchToOption } from '@af-mobile-client-vue3/services/v3Api'
|
|
13
13
|
import { useUserStore } from '@af-mobile-client-vue3/stores/modules/user'
|
|
14
14
|
import { getDict } from '@af-mobile-client-vue3/utils/dictUtil'
|
|
15
|
-
import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
|
|
16
15
|
import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
|
|
17
16
|
import { areaList } from '@vant/area-data'
|
|
18
17
|
import dayjs from 'dayjs/esm/index'
|
|
@@ -20,6 +19,7 @@ import { debounce } from 'lodash-es'
|
|
|
20
19
|
import {
|
|
21
20
|
Area as VanArea,
|
|
22
21
|
Calendar as VanCalendar,
|
|
22
|
+
Cascader as VanCascader,
|
|
23
23
|
Checkbox as VanCheckbox,
|
|
24
24
|
CheckboxGroup as vanCheckboxGroup,
|
|
25
25
|
DatePicker as VanDatePicker,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
Switch as VanSwitch,
|
|
36
36
|
TimePicker as VanTimePicker,
|
|
37
37
|
} from 'vant'
|
|
38
|
-
import { computed, defineEmits,
|
|
38
|
+
import { computed, defineEmits, defineModel, getCurrentInstance, onBeforeMount, ref, watch } from 'vue'
|
|
39
39
|
|
|
40
40
|
const props = defineProps({
|
|
41
41
|
attr: {
|
|
@@ -73,6 +73,7 @@ const props = defineProps({
|
|
|
73
73
|
type: Object,
|
|
74
74
|
default: () => {},
|
|
75
75
|
},
|
|
76
|
+
// 用 defineModel 替代 modelValue/emit
|
|
76
77
|
modelValue: {
|
|
77
78
|
type: [String, Number, Boolean, Array, Object],
|
|
78
79
|
default: undefined,
|
|
@@ -91,7 +92,18 @@ const props = defineProps({
|
|
|
91
92
|
|
|
92
93
|
})
|
|
93
94
|
|
|
94
|
-
const emits = defineEmits(['
|
|
95
|
+
const emits = defineEmits(['setForm'])
|
|
96
|
+
|
|
97
|
+
// 用 defineModel 替代 modelValue/emit
|
|
98
|
+
const modelData = defineModel<string | number | boolean | any[] | Record<string, any>>()
|
|
99
|
+
|
|
100
|
+
// 获取字典
|
|
101
|
+
interface OptionItem {
|
|
102
|
+
label: string
|
|
103
|
+
value: any
|
|
104
|
+
children?: OptionItem[]
|
|
105
|
+
}
|
|
106
|
+
|
|
95
107
|
// 判断并初始化防抖函数
|
|
96
108
|
let debouncedUserLinkFunc: (() => void) | null = null
|
|
97
109
|
let debouncedDepLinkFunc: (() => void) | null = null
|
|
@@ -101,7 +113,6 @@ const { attr, form, mode, serviceName, getDataParams, columnsField } = props
|
|
|
101
113
|
const calendarShow = ref(false)
|
|
102
114
|
const option = ref([])
|
|
103
115
|
const pickerValue = ref(undefined)
|
|
104
|
-
const datePickerValue = ref(undefined)
|
|
105
116
|
const timePickerValue = ref(undefined)
|
|
106
117
|
const area = ref<any>(undefined)
|
|
107
118
|
const showPicker = ref(false)
|
|
@@ -109,16 +120,8 @@ const showDatePicker = ref(false)
|
|
|
109
120
|
const showTimePicker = ref(false)
|
|
110
121
|
const showArea = ref(false)
|
|
111
122
|
const errorMessage = ref('')
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
// 输入-非查询
|
|
115
|
-
const formInputDefaultValue = ref('')
|
|
116
|
-
// 输入-查询
|
|
117
|
-
const queryInputDefaultValue = ref('')
|
|
118
|
-
// 选择-非查询
|
|
119
|
-
const formSelectDefaultValue = ref([])
|
|
120
|
-
// 选择-查询
|
|
121
|
-
const querySelectDefaultValue = ref([])
|
|
123
|
+
const showTreeSelect = ref(false)
|
|
124
|
+
const treeValue = ref('')
|
|
122
125
|
|
|
123
126
|
// 登录信息 (可以在配置的动态函数中使用 this.setupState 获取到当前组件内的全部函数和变量 例:this.setupState.userState)
|
|
124
127
|
const userState = useUserStore().getLogin()
|
|
@@ -136,9 +139,9 @@ const currInst = getCurrentInstance()
|
|
|
136
139
|
|
|
137
140
|
// 配置中心->表单项变更触发函数
|
|
138
141
|
const dataChangeFunc = debounce(async () => {
|
|
139
|
-
if (attr.dataChangeFunc)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
if (attr.dataChangeFunc) {
|
|
143
|
+
await executeStrFunctionByContext(currInst, attr.dataChangeFunc, [form, val => modelData.value = val, attr, null, mode])
|
|
144
|
+
}
|
|
142
145
|
}, 500)
|
|
143
146
|
|
|
144
147
|
// 配置中心->表单项展示函数
|
|
@@ -156,58 +159,120 @@ const showFormItemFunc = debounce(async () => {
|
|
|
156
159
|
}
|
|
157
160
|
}, 500)
|
|
158
161
|
|
|
159
|
-
//
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
case 'area':
|
|
178
|
-
case 'citySelect':
|
|
179
|
-
case 'calendar':
|
|
180
|
-
case 'textarea':
|
|
181
|
-
case 'intervalPicker':
|
|
182
|
-
case 'input':
|
|
183
|
-
case 'select':
|
|
184
|
-
if (mode === '查询')
|
|
185
|
-
return props.modelValue !== undefined ? props.modelValue : queryInputDefaultValue.value
|
|
186
|
-
else
|
|
187
|
-
return props.modelValue !== undefined ? props.modelValue : formInputDefaultValue.value
|
|
188
|
-
case 'stepper':
|
|
189
|
-
return props.modelValue !== undefined ? props.modelValue : 1
|
|
190
|
-
case 'rangePicker':
|
|
191
|
-
if (props.modelValue && Array.isArray(props.modelValue) && props.modelValue.length > 1)
|
|
192
|
-
return `${props.modelValue[0]} ~ ${props.modelValue[1]}`
|
|
162
|
+
// 监听 props.modelValue 的变化
|
|
163
|
+
// watch(() => props.modelValue, (newVal) => {
|
|
164
|
+
// console.log('props.modelValue===', props.modelValue)
|
|
165
|
+
// })
|
|
166
|
+
|
|
167
|
+
/* function getDeafultValue(){
|
|
168
|
+
console.log('attr===', attr)
|
|
169
|
+
if (attr.type === 'radio' || attr.type === 'rate' || attr.type === 'slider' || attr.type === 'area' || attr.type === 'citySelect' || attr.type === 'calendar' || attr.type === 'textarea' || attr.type === 'intervalPicker' || attr.type === 'input' || attr.type === 'select') {
|
|
170
|
+
if (attr.formDefault)
|
|
171
|
+
localValue.value = attr.formDefault
|
|
172
|
+
if (attr.queryFormDefault)
|
|
173
|
+
localValue.value = attr.queryFormDefault
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (attr.type === 'checkbox' || attr.type === 'uploader' || attr.type === 'file' || attr.type === 'image' || attr.type === 'datePicker' || attr.type === 'timePicker') {
|
|
177
|
+
if (attr.formDefault) {
|
|
178
|
+
if (attr.type === 'checkbox' || attr.type === 'image' || attr.type === 'file')
|
|
179
|
+
formSelectDefaultValue.value = attr.formDefault
|
|
193
180
|
else
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
181
|
+
formSelectDefaultValue.value.push(attr.formDefault)
|
|
182
|
+
}
|
|
183
|
+
if (attr.queryFormDefault) {
|
|
184
|
+
// console.log(querySelectDefaultValue.value)
|
|
185
|
+
querySelectDefaultValue.value.push(...attr.queryFormDefault)
|
|
186
|
+
// querySelectDefaultValue.value = attr.queryFormDefault
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (attr.type === 'rangePicker') {
|
|
191
|
+
if (attr.formDefault)
|
|
192
|
+
formSelectDefaultValue.value = attr.formDefault
|
|
193
|
+
if (attr.queryFormDefault) {
|
|
194
|
+
const dateArray = getRangeByType(attr.queryFormDefault, true)
|
|
195
|
+
pickerValue.value = `${dateArray[0]} ~ ${dateArray[1]}`
|
|
196
|
+
querySelectDefaultValue.value = pickerValue.value
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
} */
|
|
200
|
+
/**
|
|
201
|
+
* 检测是否传入了有效的值
|
|
202
|
+
* @returns any
|
|
203
|
+
*/
|
|
204
|
+
function checkModel(val = props.modelValue) {
|
|
205
|
+
if (val === null || val === undefined || val === '')
|
|
206
|
+
return false
|
|
207
|
+
if (Array.isArray(val))
|
|
208
|
+
return val.length > 0
|
|
209
|
+
return true
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* 获取表单项的默认值
|
|
213
|
+
* @returns any
|
|
214
|
+
*/
|
|
215
|
+
function getDefaultValue() {
|
|
216
|
+
const val = props.modelValue
|
|
217
|
+
|
|
218
|
+
// 如果有有效值,直接返回
|
|
219
|
+
if (checkModel(val)) {
|
|
220
|
+
return val
|
|
199
221
|
}
|
|
222
|
+
|
|
223
|
+
// 根据类型获取默认值
|
|
224
|
+
const getDefaultByType = () => {
|
|
225
|
+
const def = mode !== '查询' ? attr.formDefault : attr.queryFormDefault
|
|
226
|
+
|
|
227
|
+
// 数组类型默认值
|
|
228
|
+
const arrayTypes = ['uploader', 'checkbox', 'file', 'area', 'image', 'treeSelect']
|
|
229
|
+
if (arrayTypes.includes(attr.type)) {
|
|
230
|
+
return def !== undefined ? def : []
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// 特殊类型默认值
|
|
234
|
+
const specialDefaults = {
|
|
235
|
+
switch: false,
|
|
236
|
+
stepper: 1,
|
|
237
|
+
addressSearch: val,
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (specialDefaults[attr.type] !== undefined) {
|
|
241
|
+
return specialDefaults[attr.type]
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// 日期时间类型
|
|
245
|
+
const dateTypes = ['rangePicker', 'yearPicker', 'monthPicker', 'yearRangePicker', 'monthRangePicker', 'datePicker', 'timePicker']
|
|
246
|
+
if (dateTypes.includes(attr.type)) {
|
|
247
|
+
return getDateRange({
|
|
248
|
+
type: attr.type,
|
|
249
|
+
formDefault: attr.formDefault ?? '',
|
|
250
|
+
queryFormDefault: attr.queryFormDefault ?? '',
|
|
251
|
+
queryType: attr.queryType,
|
|
252
|
+
queryValueFormat: attr.queryValueFormat,
|
|
253
|
+
name: attr.name ?? '',
|
|
254
|
+
}) ?? []
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// 其他类型(字符串、数字等)
|
|
258
|
+
return def ?? ''
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return getDefaultByType()
|
|
200
262
|
}
|
|
201
263
|
|
|
264
|
+
// 初始化日期组件初始值,组件自定义格式显示值和实际值(日期相关初始化都在此函数中操作)
|
|
202
265
|
function getDateRange({
|
|
203
266
|
type,
|
|
204
267
|
formDefault: defaultValue,
|
|
268
|
+
queryFormDefault,
|
|
205
269
|
queryType,
|
|
206
270
|
queryValueFormat: defaultFormat,
|
|
207
271
|
name,
|
|
208
272
|
}: {
|
|
209
273
|
type: string
|
|
210
274
|
formDefault: string
|
|
275
|
+
queryFormDefault: string
|
|
211
276
|
queryType?: string
|
|
212
277
|
queryValueFormat?: string
|
|
213
278
|
name: string
|
|
@@ -220,87 +285,58 @@ function getDateRange({
|
|
|
220
285
|
datePicker: 'YYYY-MM-DD HH:mm:ss',
|
|
221
286
|
rangePicker: 'YYYY-MM-DD HH:mm:ss',
|
|
222
287
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
return undefined
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (['monthPicker', 'yearPicker', 'datePicker'].includes(type)) {
|
|
250
|
-
if (queryType === 'BETWEEN') {
|
|
251
|
-
return [start, end]
|
|
252
|
-
}
|
|
253
|
-
if (name.includes('开始') || name.includes('起始')) {
|
|
254
|
-
return start
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
return end
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
else if (['rangePicker', 'yearRangePicker', 'monthRangePicker'].includes(type)) {
|
|
261
|
-
return [start, end]
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
return [start, end]
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// 改用 ref,并设置初始值
|
|
268
|
-
const localValue = ref(getDefaultValue())
|
|
269
|
-
|
|
270
|
-
// 监听 props.modelValue 的变化
|
|
271
|
-
watch(() => props.modelValue, (newVal) => {
|
|
272
|
-
// 如果是文件上传类型,需要特殊处理
|
|
273
|
-
if (attr.type === 'image' || attr.type === 'file') {
|
|
274
|
-
localValue.value = Array.isArray(newVal) ? newVal : []
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
if (attr.type === 'rangePicker') {
|
|
278
|
-
console.log('newVal', newVal)
|
|
279
|
-
pickerValue.value = newVal !== undefined ? `${newVal[0]} ~ ${newVal[1]}` : getDefaultValue()
|
|
288
|
+
if (mode) {
|
|
289
|
+
const format = defaultFormat || formatMap[type]
|
|
290
|
+
const val = mode === '查询' ? queryFormDefault : defaultValue
|
|
291
|
+
let start: string, end: string
|
|
292
|
+
switch (val) {
|
|
293
|
+
case 'curYear':
|
|
294
|
+
start = dayjs().startOf('year').format(format)
|
|
295
|
+
end = dayjs().endOf('year').format(format)
|
|
296
|
+
break
|
|
297
|
+
case 'curMonth':
|
|
298
|
+
start = dayjs().startOf('month').format(format)
|
|
299
|
+
end = dayjs().endOf('month').format(format)
|
|
300
|
+
break
|
|
301
|
+
case 'curDay':
|
|
302
|
+
start = dayjs().startOf('day').format(format)
|
|
303
|
+
end = dayjs().endOf('day').format(format)
|
|
304
|
+
break
|
|
305
|
+
case 'curTime':
|
|
306
|
+
start = dayjs().format(format)
|
|
307
|
+
end = dayjs().format(format)
|
|
308
|
+
break
|
|
309
|
+
default:
|
|
310
|
+
return undefined
|
|
280
311
|
}
|
|
281
|
-
|
|
282
|
-
|
|
312
|
+
if (['monthPicker', 'yearPicker', 'datePicker'].includes(type)) {
|
|
313
|
+
if (mode !== '查询') {
|
|
314
|
+
if (queryType === 'BETWEEN') {
|
|
315
|
+
return [start, end]
|
|
316
|
+
}
|
|
317
|
+
if (name.includes('开始') || name.includes('起始')) {
|
|
318
|
+
return start
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
return end
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
return start
|
|
326
|
+
}
|
|
283
327
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
328
|
+
// rangePicker组件表单显示的值
|
|
329
|
+
if (mode === '查询' && type === 'rangePicker') {
|
|
330
|
+
pickerValue.value = `${start} ~ ${end}`
|
|
287
331
|
}
|
|
288
|
-
|
|
289
|
-
})
|
|
290
|
-
|
|
291
|
-
// 监听 localValue 的变化
|
|
292
|
-
watch(localValue, (newVal) => {
|
|
293
|
-
if (attr.type === 'image' || attr.type === 'file') {
|
|
294
|
-
// 确保上传组件的值始终是数组
|
|
295
|
-
const value = Array.isArray(newVal) ? newVal : []
|
|
296
|
-
emits('update:modelValue', value)
|
|
332
|
+
return mode !== '查询' ? start : [start, end]
|
|
297
333
|
}
|
|
298
334
|
else {
|
|
299
|
-
|
|
335
|
+
return undefined
|
|
300
336
|
}
|
|
301
|
-
|
|
302
|
-
})
|
|
337
|
+
}
|
|
303
338
|
|
|
339
|
+
// 删除 localValue 相关
|
|
304
340
|
// 监听 props.form 的变化
|
|
305
341
|
watch(
|
|
306
342
|
() => props.form,
|
|
@@ -316,7 +352,7 @@ watch(
|
|
|
316
352
|
function updateFile(files, _index) {
|
|
317
353
|
// 处理文件数据
|
|
318
354
|
// 更新本地值
|
|
319
|
-
|
|
355
|
+
modelData.value = files.map((file) => {
|
|
320
356
|
const newFile = { ...file }
|
|
321
357
|
if (newFile.content)
|
|
322
358
|
delete newFile.content
|
|
@@ -452,6 +488,7 @@ function formTypeCheck(attr, value) {
|
|
|
452
488
|
|
|
453
489
|
onBeforeMount(() => {
|
|
454
490
|
init()
|
|
491
|
+
modelData.value = getDefaultValue()
|
|
455
492
|
showFormItemFunc()
|
|
456
493
|
dataChangeFunc()
|
|
457
494
|
if (attr?.keyName?.toString()?.startsWith('search@根据表单项[') && attr?.keyName?.toString().endsWith(']联动人员'))
|
|
@@ -487,7 +524,7 @@ const placeholder = computed(() => {
|
|
|
487
524
|
const formatDate = date => `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`
|
|
488
525
|
|
|
489
526
|
function onCalendarConfirm(values) {
|
|
490
|
-
|
|
527
|
+
modelData.value = [formatDate(values[0]), formatDate(values[1])]
|
|
491
528
|
pickerValue.value = `${formatDate(values[0])} ~ ${formatDate(values[1])}`
|
|
492
529
|
calendarShow.value = false
|
|
493
530
|
}
|
|
@@ -541,36 +578,6 @@ function init() {
|
|
|
541
578
|
initRadioValue()
|
|
542
579
|
}
|
|
543
580
|
}
|
|
544
|
-
if (attr.type === 'radio' || attr.type === 'rate' || attr.type === 'slider' || attr.type === 'area' || attr.type === 'citySelect' || attr.type === 'calendar' || attr.type === 'textarea' || attr.type === 'intervalPicker' || attr.type === 'input' || attr.type === 'select') {
|
|
545
|
-
if (attr.formDefault)
|
|
546
|
-
formInputDefaultValue.value = attr.formDefault
|
|
547
|
-
if (attr.queryFormDefault)
|
|
548
|
-
queryInputDefaultValue.value = attr.queryFormDefault
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
if (attr.type === 'checkbox' || attr.type === 'uploader' || attr.type === 'file' || attr.type === 'image' || attr.type === 'datePicker' || attr.type === 'timePicker') {
|
|
552
|
-
if (attr.formDefault) {
|
|
553
|
-
if (attr.type === 'checkbox' || attr.type === 'image' || attr.type === 'file')
|
|
554
|
-
formSelectDefaultValue.value = attr.formDefault
|
|
555
|
-
else
|
|
556
|
-
formSelectDefaultValue.value.push(attr.formDefault)
|
|
557
|
-
}
|
|
558
|
-
if (attr.queryFormDefault) {
|
|
559
|
-
// console.log(querySelectDefaultValue.value)
|
|
560
|
-
querySelectDefaultValue.value.push(...attr.queryFormDefault)
|
|
561
|
-
// querySelectDefaultValue.value = attr.queryFormDefault
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (attr.type === 'rangePicker') {
|
|
566
|
-
if (attr.formDefault)
|
|
567
|
-
formSelectDefaultValue.value = attr.formDefault
|
|
568
|
-
if (attr.queryFormDefault) {
|
|
569
|
-
const dateArray = getRangeByType(attr.queryFormDefault, true)
|
|
570
|
-
pickerValue.value = `${dateArray[0]} ~ ${dateArray[1]}`
|
|
571
|
-
querySelectDefaultValue.value = pickerValue.value
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
581
|
}
|
|
575
582
|
|
|
576
583
|
function getDataCallback(res) {
|
|
@@ -608,11 +615,11 @@ async function updateResOptions(type) {
|
|
|
608
615
|
}
|
|
609
616
|
|
|
610
617
|
function initRadioValue() {
|
|
611
|
-
if ((mode === '新增' || mode === '修改') && attr.type === 'radio' && !
|
|
618
|
+
if ((mode === '新增' || mode === '修改') && attr.type === 'radio' && !props.modelValue) {
|
|
612
619
|
if (attr.keys && attr.keys.length > 0)
|
|
613
|
-
|
|
620
|
+
modelData.value = attr.keys[0].value
|
|
614
621
|
else if (option.value && option.value.length > 0)
|
|
615
|
-
|
|
622
|
+
modelData.value = option.value[0].value
|
|
616
623
|
}
|
|
617
624
|
}
|
|
618
625
|
|
|
@@ -630,16 +637,16 @@ function getData(value, callback) {
|
|
|
630
637
|
}
|
|
631
638
|
}
|
|
632
639
|
|
|
640
|
+
// 已废弃 不进行维护
|
|
633
641
|
function onPickerConfirm({ selectedOptions }) {
|
|
634
642
|
showPicker.value = false
|
|
635
|
-
|
|
636
|
-
emits('update:modelValue', [selectedOptions[0].text])
|
|
643
|
+
modelData.value = selectedOptions[0].text
|
|
637
644
|
}
|
|
638
645
|
|
|
639
646
|
// 日期时间选择数据
|
|
640
|
-
const dateTimePickerValue = ref(
|
|
647
|
+
const dateTimePickerValue = ref<any>({})
|
|
641
648
|
function showDataTimePicker() {
|
|
642
|
-
if (props.modelValue
|
|
649
|
+
if (props.modelValue && typeof props.modelValue === 'string') {
|
|
643
650
|
// 拆分日期和时间
|
|
644
651
|
const [dateStr, timeStr] = props.modelValue.split(' ')
|
|
645
652
|
// 拆分日期部分
|
|
@@ -654,7 +661,7 @@ function showDataTimePicker() {
|
|
|
654
661
|
}
|
|
655
662
|
else {
|
|
656
663
|
dateTimePickerValue.value = {
|
|
657
|
-
date:
|
|
664
|
+
date: formatDate(new Date()).split('-'),
|
|
658
665
|
time: ['00', '00', '00'],
|
|
659
666
|
}
|
|
660
667
|
}
|
|
@@ -663,30 +670,32 @@ function showDataTimePicker() {
|
|
|
663
670
|
|
|
664
671
|
function onDatePickerConfirm({ selectedValues }) {
|
|
665
672
|
showDatePicker.value = false
|
|
666
|
-
|
|
673
|
+
modelData.value = selectedValues.join('-')
|
|
667
674
|
}
|
|
668
675
|
|
|
676
|
+
// 已废弃 不进行维护
|
|
669
677
|
function onTimePickerConfirm({ selectedValues }) {
|
|
670
678
|
showTimePicker.value = false
|
|
671
679
|
timePickerValue.value = selectedValues.join(':')
|
|
672
|
-
|
|
680
|
+
modelData.value = timePickerValue.value
|
|
673
681
|
}
|
|
674
682
|
|
|
683
|
+
// 没人用到本次先不动。后续需要看这个组件需要怎么使用
|
|
675
684
|
function onAreaConfirm({ selectedOptions }) {
|
|
676
685
|
area.value = `${selectedOptions[0].text}-${selectedOptions[1].text}-${selectedOptions[2].text}`
|
|
677
686
|
showArea.value = false
|
|
678
|
-
|
|
687
|
+
modelData.value = [{
|
|
679
688
|
province: selectedOptions[0].text,
|
|
680
689
|
city: selectedOptions[1].text,
|
|
681
690
|
district: selectedOptions[2].text,
|
|
682
|
-
}]
|
|
691
|
+
}]
|
|
683
692
|
}
|
|
684
693
|
|
|
685
694
|
function onDateTimePickerConfirm() {
|
|
686
695
|
showDatePicker.value = false
|
|
687
696
|
const dateStr = dateTimePickerValue.value.date.join('-')
|
|
688
697
|
const timeStr = dateTimePickerValue.value.time.join(':')
|
|
689
|
-
|
|
698
|
+
modelData.value = `${dateStr} ${timeStr}`
|
|
690
699
|
}
|
|
691
700
|
|
|
692
701
|
function onPickerCancel() {
|
|
@@ -716,10 +725,29 @@ function handleAddressConfirm(location) {
|
|
|
716
725
|
[attr.model]: location.address,
|
|
717
726
|
}
|
|
718
727
|
// 更新表单数据
|
|
719
|
-
|
|
720
|
-
emits('set-form', formData)
|
|
728
|
+
emits('setForm', formData)
|
|
721
729
|
showAddressPicker.value = false
|
|
722
730
|
}
|
|
731
|
+
|
|
732
|
+
// 重置方法,供父组件调用
|
|
733
|
+
function reset() {
|
|
734
|
+
modelData.value = null
|
|
735
|
+
errorMessage.value = ''
|
|
736
|
+
treeValue.value = null
|
|
737
|
+
area.value = null
|
|
738
|
+
pickerValue.value = null
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
defineExpose({
|
|
742
|
+
reset,
|
|
743
|
+
})
|
|
744
|
+
|
|
745
|
+
// 级联选择完成事件
|
|
746
|
+
function onTreeSelectFinish(value) {
|
|
747
|
+
treeValue.value = value.value
|
|
748
|
+
modelData.value = [value.value]
|
|
749
|
+
showTreeSelect.value = false
|
|
750
|
+
}
|
|
723
751
|
</script>
|
|
724
752
|
|
|
725
753
|
<template>
|
|
@@ -731,10 +759,10 @@ function handleAddressConfirm(location) {
|
|
|
731
759
|
:label="labelData"
|
|
732
760
|
:label-align="labelAlign"
|
|
733
761
|
:input-align="attr.inputAlign ? attr.inputAlign : 'right'"
|
|
734
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
762
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
735
763
|
>
|
|
736
764
|
<template #input>
|
|
737
|
-
<VanSwitch v-model="
|
|
765
|
+
<VanSwitch v-model="modelData" />
|
|
738
766
|
</template>
|
|
739
767
|
</VanField>
|
|
740
768
|
|
|
@@ -745,7 +773,7 @@ function handleAddressConfirm(location) {
|
|
|
745
773
|
:label="labelData"
|
|
746
774
|
>
|
|
747
775
|
<template #input>
|
|
748
|
-
<VanCheckbox v-model="
|
|
776
|
+
<VanCheckbox v-model="modelData" shape="square" />
|
|
749
777
|
</template>
|
|
750
778
|
</VanField> -->
|
|
751
779
|
|
|
@@ -761,7 +789,7 @@ function handleAddressConfirm(location) {
|
|
|
761
789
|
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
762
790
|
>
|
|
763
791
|
<template #input>
|
|
764
|
-
<van-checkbox-group v-model="
|
|
792
|
+
<van-checkbox-group v-model="modelData as any[]" direction="horizontal" shape="square" :disabled="readonly">
|
|
765
793
|
<VanCheckbox v-for="(item, index) in option" :key="index" style="padding: 2px" :name="item[columnsField.value]" :shape="rules?.[attr.model].shape" :value="item[columnsField.value]">
|
|
766
794
|
{{ item[columnsField.text] }}
|
|
767
795
|
</VanCheckbox>
|
|
@@ -778,7 +806,7 @@ function handleAddressConfirm(location) {
|
|
|
778
806
|
>
|
|
779
807
|
<template #input>
|
|
780
808
|
<XGridDropOption
|
|
781
|
-
v-model="(
|
|
809
|
+
v-model="(modelData as string[])"
|
|
782
810
|
:column-num="labelData ? 3 : 4"
|
|
783
811
|
:multiple="true"
|
|
784
812
|
:columns="option"
|
|
@@ -787,8 +815,8 @@ function handleAddressConfirm(location) {
|
|
|
787
815
|
</VanField>
|
|
788
816
|
<!-- 下拉 -->
|
|
789
817
|
<XMultiSelect
|
|
790
|
-
v-
|
|
791
|
-
v-model="
|
|
818
|
+
v-if="attr.showMode === 'select' && mode === '查询'"
|
|
819
|
+
v-model="modelData"
|
|
792
820
|
:label="labelData"
|
|
793
821
|
:readonly="readonly"
|
|
794
822
|
:placeholder="placeholder"
|
|
@@ -809,7 +837,7 @@ function handleAddressConfirm(location) {
|
|
|
809
837
|
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
810
838
|
>
|
|
811
839
|
<template #input>
|
|
812
|
-
<VanRadioGroup v-model="
|
|
840
|
+
<VanRadioGroup v-model="modelData" direction="horizontal" :disabled="readonly">
|
|
813
841
|
<VanRadio v-for="(item, index) in option" :key="index" style="padding: 2px" :name="item[columnsField.value]" :value="item[columnsField.value]">
|
|
814
842
|
{{ item[columnsField.text] }}
|
|
815
843
|
</VanRadio>
|
|
@@ -829,7 +857,7 @@ function handleAddressConfirm(location) {
|
|
|
829
857
|
>
|
|
830
858
|
<template #input>
|
|
831
859
|
<XGridDropOption
|
|
832
|
-
v-model="(
|
|
860
|
+
v-model="(modelData as string)"
|
|
833
861
|
:column-num="labelData ? 3 : 4"
|
|
834
862
|
:columns="option"
|
|
835
863
|
/>
|
|
@@ -843,10 +871,10 @@ function handleAddressConfirm(location) {
|
|
|
843
871
|
:label="labelData"
|
|
844
872
|
:label-align="labelAlign"
|
|
845
873
|
:input-align="attr.inputAlign ? attr.inputAlign : 'center'"
|
|
846
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
874
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
847
875
|
>
|
|
848
876
|
<template #input>
|
|
849
|
-
<VanStepper v-model="
|
|
877
|
+
<VanStepper v-model="modelData" :disabled="readonly" />
|
|
850
878
|
</template>
|
|
851
879
|
</VanField>
|
|
852
880
|
|
|
@@ -857,10 +885,10 @@ function handleAddressConfirm(location) {
|
|
|
857
885
|
:label="labelData"
|
|
858
886
|
:label-align="labelAlign"
|
|
859
887
|
:input-align="attr.inputAlign ? attr.inputAlign : 'center'"
|
|
860
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
888
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
861
889
|
>
|
|
862
890
|
<template #input>
|
|
863
|
-
<VanRate v-model="
|
|
891
|
+
<VanRate v-model="modelData as number" :size="25" :readonly="readonly" void-color="#eee" void-icon="star" color="#ffd21e" />
|
|
864
892
|
</template>
|
|
865
893
|
</VanField>
|
|
866
894
|
|
|
@@ -871,10 +899,10 @@ function handleAddressConfirm(location) {
|
|
|
871
899
|
:label="labelData"
|
|
872
900
|
:label-align="labelAlign"
|
|
873
901
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
874
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
902
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
875
903
|
>
|
|
876
904
|
<template #input>
|
|
877
|
-
<VanSlider v-model="
|
|
905
|
+
<VanSlider v-model="modelData as number" :readonly="readonly" />
|
|
878
906
|
</template>
|
|
879
907
|
</VanField>
|
|
880
908
|
|
|
@@ -885,13 +913,13 @@ function handleAddressConfirm(location) {
|
|
|
885
913
|
:label="labelData"
|
|
886
914
|
:label-align="labelAlign"
|
|
887
915
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
888
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
916
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
889
917
|
>
|
|
890
918
|
<template #input>
|
|
891
919
|
<!-- <van-uploader v-model="localValue" /> -->
|
|
892
920
|
<Uploader
|
|
893
921
|
upload-mode="server"
|
|
894
|
-
:image-list="(
|
|
922
|
+
:image-list="(modelData as any[])"
|
|
895
923
|
authority="admin"
|
|
896
924
|
@update-file-list="updateFile"
|
|
897
925
|
/>
|
|
@@ -905,12 +933,12 @@ function handleAddressConfirm(location) {
|
|
|
905
933
|
:label="labelData"
|
|
906
934
|
:label-align="labelAlign"
|
|
907
935
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
908
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
936
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
909
937
|
>
|
|
910
938
|
<template #input>
|
|
911
939
|
<ImageUploader
|
|
912
940
|
upload-mode="server"
|
|
913
|
-
:image-list="(
|
|
941
|
+
:image-list="(modelData as any[])"
|
|
914
942
|
authority="admin"
|
|
915
943
|
:attr="attr"
|
|
916
944
|
@update-file-list="updateFile"
|
|
@@ -918,7 +946,7 @@ function handleAddressConfirm(location) {
|
|
|
918
946
|
</template>
|
|
919
947
|
</VanField>
|
|
920
948
|
|
|
921
|
-
<!-- 选择器 -->
|
|
949
|
+
<!-- 选择器 琉璃中不存在,不进行维护后续将删除 -->
|
|
922
950
|
<VanField
|
|
923
951
|
v-if="attr.type === 'picker' && showItem"
|
|
924
952
|
v-model="pickerValue"
|
|
@@ -929,12 +957,12 @@ function handleAddressConfirm(location) {
|
|
|
929
957
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
930
958
|
readonly
|
|
931
959
|
is-link
|
|
932
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
960
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
933
961
|
@click="readonly ? null : showPicker = true"
|
|
934
962
|
/>
|
|
935
963
|
<VanPopup v-model:show="showPicker" round position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
936
964
|
<VanPicker
|
|
937
|
-
v-model="(
|
|
965
|
+
v-model="(modelData as Numeric[])"
|
|
938
966
|
:title="attr.name"
|
|
939
967
|
:columns="attr.selectKey"
|
|
940
968
|
:readonly="readonly"
|
|
@@ -957,7 +985,7 @@ function handleAddressConfirm(location) {
|
|
|
957
985
|
:label-align="labelAlign"
|
|
958
986
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
959
987
|
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
960
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
988
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
961
989
|
@click="calendarShow = true"
|
|
962
990
|
/>
|
|
963
991
|
<VanCalendar
|
|
@@ -973,7 +1001,7 @@ function handleAddressConfirm(location) {
|
|
|
973
1001
|
<!-- 日期选择-非查询 -->
|
|
974
1002
|
<VanField
|
|
975
1003
|
v-if="(attr.type === 'datePicker' || attr.type === 'rangePicker') && mode !== '查询' && showItem"
|
|
976
|
-
v-model="(
|
|
1004
|
+
v-model="(modelData as string | number)"
|
|
977
1005
|
name="datePicker"
|
|
978
1006
|
:label="labelData"
|
|
979
1007
|
:label-align="labelAlign"
|
|
@@ -981,7 +1009,7 @@ function handleAddressConfirm(location) {
|
|
|
981
1009
|
readonly
|
|
982
1010
|
:is-link="true"
|
|
983
1011
|
:placeholder="placeholder"
|
|
984
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1012
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
985
1013
|
@click="readonly ? null : showDataTimePicker()"
|
|
986
1014
|
/>
|
|
987
1015
|
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
@@ -1010,7 +1038,7 @@ function handleAddressConfirm(location) {
|
|
|
1010
1038
|
<!-- 日期选择-查询 -->
|
|
1011
1039
|
<VanField
|
|
1012
1040
|
v-if="attr.type === 'datePicker' && mode === '查询' && showItem"
|
|
1013
|
-
v-model="(
|
|
1041
|
+
v-model="(modelData as string | number)"
|
|
1014
1042
|
name="datePicker"
|
|
1015
1043
|
:label="labelData"
|
|
1016
1044
|
:label-align="labelAlign"
|
|
@@ -1018,7 +1046,7 @@ function handleAddressConfirm(location) {
|
|
|
1018
1046
|
readonly
|
|
1019
1047
|
:is-link="true"
|
|
1020
1048
|
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
1021
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1049
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1022
1050
|
@click="showDatePicker = true"
|
|
1023
1051
|
/>
|
|
1024
1052
|
<VanPopup v-model:show="showDatePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
@@ -1044,7 +1072,7 @@ function handleAddressConfirm(location) {
|
|
|
1044
1072
|
</VanPickerGroup>
|
|
1045
1073
|
</VanPopup>
|
|
1046
1074
|
|
|
1047
|
-
<!-- 时间选择 -->
|
|
1075
|
+
<!-- 时间选择 --该配置未在pc找到不进行维护 后续将删除 -->
|
|
1048
1076
|
<VanField
|
|
1049
1077
|
v-if="attr.type === 'timePicker' && showItem"
|
|
1050
1078
|
v-model="timePickerValue"
|
|
@@ -1060,7 +1088,7 @@ function handleAddressConfirm(location) {
|
|
|
1060
1088
|
/>
|
|
1061
1089
|
<VanPopup v-model:show="showTimePicker" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
1062
1090
|
<VanTimePicker
|
|
1063
|
-
v-model="
|
|
1091
|
+
v-model="modelData as string[]"
|
|
1064
1092
|
:title="attr.name"
|
|
1065
1093
|
:columns-type="attr.columnsType ? attr.columnsType : ['hour', 'minute', 'second']"
|
|
1066
1094
|
:min-time="attr.minTime ? attr.minTime : '00:00:00'"
|
|
@@ -1087,7 +1115,7 @@ function handleAddressConfirm(location) {
|
|
|
1087
1115
|
/>
|
|
1088
1116
|
<VanPopup v-model:show="showArea" position="bottom" teleport="body" overlay-class="date-picker-overlay">
|
|
1089
1117
|
<VanArea
|
|
1090
|
-
v-model="
|
|
1118
|
+
v-model="modelData as string" :title="attr.name" :area-list="areaList"
|
|
1091
1119
|
@confirm="onAreaConfirm"
|
|
1092
1120
|
@cancel="showArea = false"
|
|
1093
1121
|
/>
|
|
@@ -1096,20 +1124,20 @@ function handleAddressConfirm(location) {
|
|
|
1096
1124
|
<!-- 单选下拉列表 -->
|
|
1097
1125
|
<XSelect
|
|
1098
1126
|
v-if="attr.type === 'select' && showItem"
|
|
1099
|
-
v-model="
|
|
1127
|
+
v-model="modelData"
|
|
1100
1128
|
:label="labelData"
|
|
1101
1129
|
:readonly="readonly"
|
|
1102
1130
|
clearable
|
|
1103
1131
|
:placeholder="placeholder"
|
|
1104
1132
|
:columns="option"
|
|
1105
1133
|
:option="attr.option ? attr.option : columnsField"
|
|
1106
|
-
:rules="[{ required: attr.rule.required === 'true', message:
|
|
1134
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1107
1135
|
/>
|
|
1108
1136
|
|
|
1109
1137
|
<!-- 文本区域 -->
|
|
1110
1138
|
<VanField
|
|
1111
1139
|
v-if="attr.type === 'textarea' && showItem"
|
|
1112
|
-
v-model="(
|
|
1140
|
+
v-model="(modelData as string)"
|
|
1113
1141
|
rows="3"
|
|
1114
1142
|
autosize
|
|
1115
1143
|
:label="labelData"
|
|
@@ -1126,7 +1154,7 @@ function handleAddressConfirm(location) {
|
|
|
1126
1154
|
<!-- 文本输入框 -->
|
|
1127
1155
|
<VanField
|
|
1128
1156
|
v-if="(attr.type === 'input' || attr.type === 'intervalPicker') && showItem"
|
|
1129
|
-
v-model="
|
|
1157
|
+
v-model="modelData"
|
|
1130
1158
|
:label="labelData"
|
|
1131
1159
|
:label-align="labelAlign"
|
|
1132
1160
|
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
@@ -1137,13 +1165,13 @@ function handleAddressConfirm(location) {
|
|
|
1137
1165
|
:error-message="errorMessage"
|
|
1138
1166
|
:clearable="attr.clearable"
|
|
1139
1167
|
:rules="[{ required: attr.rule.required === 'true', message: `请填写${attr.name}` }]"
|
|
1140
|
-
@blur="() => formTypeCheck(attr,
|
|
1168
|
+
@blur="() => formTypeCheck(attr, modelData as string)"
|
|
1141
1169
|
/>
|
|
1142
1170
|
|
|
1143
1171
|
<!-- 地址选择器 -->
|
|
1144
1172
|
<VanField
|
|
1145
1173
|
v-if="attr.type === 'addressSearch' && showItem"
|
|
1146
|
-
v-model="
|
|
1174
|
+
v-model="modelData as string"
|
|
1147
1175
|
name="addressSearch"
|
|
1148
1176
|
:label="labelData"
|
|
1149
1177
|
:label-align="labelAlign"
|
|
@@ -1167,6 +1195,36 @@ function handleAddressConfirm(location) {
|
|
|
1167
1195
|
@confirm="handleAddressConfirm"
|
|
1168
1196
|
/>
|
|
1169
1197
|
</VanPopup>
|
|
1198
|
+
|
|
1199
|
+
<!-- pc的树形选择框————》 手机端采用 Cascader 级联选择 -->
|
|
1200
|
+
<VanField
|
|
1201
|
+
v-if="attr.type === 'treeSelect' && showItem"
|
|
1202
|
+
v-model="treeValue"
|
|
1203
|
+
name="treeSelect"
|
|
1204
|
+
:label="labelData"
|
|
1205
|
+
:label-align="labelAlign"
|
|
1206
|
+
:input-align="attr.inputAlign ? attr.inputAlign : 'left'"
|
|
1207
|
+
readonly
|
|
1208
|
+
is-link
|
|
1209
|
+
:placeholder="attr.placeholder ? attr.placeholder : `请选择${attr.name}`"
|
|
1210
|
+
:rules="[{ required: attr.rule.required === 'true', message: `请选择${attr.name}` }]"
|
|
1211
|
+
@click="readonly ? null : showTreeSelect = true"
|
|
1212
|
+
/>
|
|
1213
|
+
<VanPopup
|
|
1214
|
+
v-model:show="showTreeSelect"
|
|
1215
|
+
position="bottom"
|
|
1216
|
+
teleport="body"
|
|
1217
|
+
overlay-class="date-picker-overlay"
|
|
1218
|
+
>
|
|
1219
|
+
<VanCascader
|
|
1220
|
+
:options="option"
|
|
1221
|
+
:field-names="attr.customFieldName ? attr.customFieldName : { text: 'label', value: 'value', children: 'children' }"
|
|
1222
|
+
:title="attr.name"
|
|
1223
|
+
:closeable="true"
|
|
1224
|
+
@close="showTreeSelect = false"
|
|
1225
|
+
@finish="onTreeSelectFinish"
|
|
1226
|
+
/>
|
|
1227
|
+
</VanPopup>
|
|
1170
1228
|
</div>
|
|
1171
1229
|
</template>
|
|
1172
1230
|
|