wui-components-v2 1.1.66 → 1.1.68

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.
@@ -69,16 +69,26 @@ function initFormData() {
69
69
  const models: { [key: string]: any } = {}
70
70
  props.fieldGroup?.fields.forEach((item: Fields) => {
71
71
  // 树、多选
72
- if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'tree-entity-select' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'multiselect') {
73
- return (models[item.sourceId] = (props.entity && props.entity[item.sourceId]?.split(',')) || item.transDefaultValue || [])
72
+ if (
73
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'tree-entity-select' ||
74
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'multiselect'
75
+ ) {
76
+ return (models[item.sourceId] =
77
+ (props.entity && props.entity[item.sourceId]?.split(',')) || item.transDefaultValue || [])
74
78
  }
75
79
 
76
80
  if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relselect') {
77
- return (models[item.sourceId] = (props.entity && props.entity[item.sourceId]?.split('@,@')) || (item.transDefaultValue && item.transDefaultValue?.split('@,@')) || [])
81
+ return (models[item.sourceId] =
82
+ (props.entity && props.entity[item.sourceId]?.split('@,@')) ||
83
+ (item.transDefaultValue && item.transDefaultValue?.split('@,@')) ||
84
+ [])
78
85
  }
79
86
 
80
87
  // 文件
81
- if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relfile') {
88
+ if (
89
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' ||
90
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relfile'
91
+ ) {
82
92
  if (props.entity && typeof props.entity[item.sourceId] === 'object') {
83
93
  return (models[item.sourceId] = [props.entity[item.sourceId]])
84
94
  }
@@ -99,8 +109,14 @@ function initFormData() {
99
109
  }
100
110
 
101
111
  // 时间
102
- if (ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date') {
103
- return (models[item.sourceId] = (props.entity && dayjs(props.entity[item.sourceId]).valueOf()) || (item.transDefaultValue && dayjs(item.transDefaultValue).valueOf()) || null)
112
+ if (
113
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime' ||
114
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date'
115
+ ) {
116
+ return (models[item.sourceId] =
117
+ (props.entity && dayjs(props.entity[item.sourceId]).valueOf()) ||
118
+ (item.transDefaultValue && dayjs(item.transDefaultValue).valueOf()) ||
119
+ null)
104
120
  }
105
121
 
106
122
  // 评分
@@ -241,7 +257,10 @@ function submit() {
241
257
  if (item.sourceId === key) {
242
258
  if (ControlTypeSupportor.getControlType(item) === 'file') {
243
259
  data[key] = toRaw(model.value[key][0])
244
- } else if (ControlTypeSupportor.getControlType(item) === 'relselect' || ControlTypeSupportor.getControlType(item) === 'tree-entity-select') {
260
+ } else if (
261
+ ControlTypeSupportor.getControlType(item) === 'relselect' ||
262
+ ControlTypeSupportor.getControlType(item) === 'tree-entity-select'
263
+ ) {
245
264
  if (Array.isArray(model.value[key])) {
246
265
  data[key] = model.value[key].join('@,@')
247
266
  } else {
@@ -278,47 +297,185 @@ defineExpose({
278
297
  <addAddressPage v-if="props?.smartPaste" v-model="model" :group="props.fieldGroup" />
279
298
  <view v-for="item in fields" :key="item.sourceId">
280
299
  <view v-show="!item.title?.includes('y') && !item.hidden">
281
- <wd-form-item v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'text'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
282
- <wd-input v-model="model[item.sourceId]" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :placeholder="`请输入${item.title}`" :class="{ 'disabled-input': item.disabled || item.rowEditType === 'readonly' }" />
300
+ <wd-form-item
301
+ v-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'text'"
302
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
303
+ :prop="item.sourceId"
304
+ :title="item.title"
305
+ >
306
+ <wd-input
307
+ v-model="model[item.sourceId]"
308
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
309
+ :clearable="!item.disabled"
310
+ :placeholder="`请输入${item.title}`"
311
+ :class="{ 'disabled-input': item.disabled || item.rowEditType === 'readonly' }"
312
+ />
283
313
  </wd-form-item>
284
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'decimal'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
285
- <wd-input v-model="model[item.sourceId]" type="number" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :placeholder="`请输入${item.title}`" />
314
+ <wd-form-item
315
+ v-else-if="
316
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'decimal'
317
+ "
318
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
319
+ :prop="item.sourceId"
320
+ :title="item.title"
321
+ >
322
+ <wd-input
323
+ v-model="model[item.sourceId]"
324
+ type="number"
325
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
326
+ :clearable="!item.disabled"
327
+ :placeholder="`请输入${item.title}`"
328
+ />
286
329
  </wd-form-item>
287
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'password'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
288
- <wd-input v-model="model[item.sourceId]" show-password :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :placeholder="`请输入${item.title}`" />
330
+ <wd-form-item
331
+ v-else-if="
332
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'password'
333
+ "
334
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
335
+ :prop="item.sourceId"
336
+ :title="item.title"
337
+ >
338
+ <wd-input
339
+ v-model="model[item.sourceId]"
340
+ show-password
341
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
342
+ :clearable="!item.disabled"
343
+ :placeholder="`请输入${item.title}`"
344
+ />
289
345
  </wd-form-item>
290
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'textarea'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
291
- <wd-textarea v-model="model[item.sourceId]" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :placeholder="`请输入${item.title}`" auto-height />
346
+ <wd-form-item
347
+ v-else-if="
348
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'textarea'
349
+ "
350
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
351
+ :prop="item.sourceId"
352
+ :title="item.title"
353
+ >
354
+ <wd-textarea
355
+ v-model="model[item.sourceId]"
356
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
357
+ :clearable="!item.disabled"
358
+ :placeholder="`请输入${item.title}`"
359
+ auto-height
360
+ />
292
361
  </wd-form-item>
293
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'select'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title" :style="{ display: item.title?.includes('y') ? 'none' : null }">
294
- <customSelectPicker v-model="model[item.sourceId]" :placeholder="`请选择${item.title}`" :columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])" type="radio" />
362
+ <wd-form-item
363
+ v-else-if="
364
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'select'
365
+ "
366
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
367
+ :prop="item.sourceId"
368
+ :title="item.title"
369
+ :style="{ display: item.title?.includes('y') ? 'none' : null }"
370
+ >
371
+ <customSelectPicker
372
+ v-model="model[item.sourceId]"
373
+ :placeholder="`请选择${item.title}`"
374
+ :columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])"
375
+ type="radio"
376
+ />
295
377
  </wd-form-item>
296
378
  <wd-form-item
297
- v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relselect-extdis'"
379
+ v-else-if="
380
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) ===
381
+ 'relselect-extdis'
382
+ "
298
383
  :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
299
384
  :prop="item.sourceId"
300
385
  :title="item.title"
301
386
  :style="{ display: item.title?.includes('y') ? 'none' : null }"
302
387
  >
303
- <userChoose v-model="model[item.sourceId]" :placeholder="`请选择${item.title}`" :source-id="item.sourceId" :title="item.title" :add-event="addEvent" :ext-control-type="item.extControlType" />
388
+ <userChoose
389
+ v-model="model[item.sourceId]"
390
+ :placeholder="`请选择${item.title}`"
391
+ :source-id="item.sourceId"
392
+ :title="item.title"
393
+ :add-event="addEvent"
394
+ :ext-control-type="item.extControlType"
395
+ />
304
396
  </wd-form-item>
305
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'multiselect'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
306
- <customSelectPicker v-model="model[item.sourceId]" :placeholder="`请选择${item.title}`" :columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])" type="checkbox" />
397
+ <wd-form-item
398
+ v-else-if="
399
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'multiselect'
400
+ "
401
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
402
+ :prop="item.sourceId"
403
+ :title="item.title"
404
+ >
405
+ <customSelectPicker
406
+ v-model="model[item.sourceId]"
407
+ :placeholder="`请选择${item.title}`"
408
+ :columns="enumColumn && formatSelectColumns(enumColumn[item.mstrucId])"
409
+ type="checkbox"
410
+ />
307
411
  </wd-form-item>
308
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
309
- <customDatePicker v-model="model[item.sourceId]" type="date" :clearable="!item.disabled" :placeholder="`请选择${item.title}`" />
412
+ <wd-form-item
413
+ v-else-if="
414
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date'
415
+ "
416
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
417
+ :prop="item.sourceId"
418
+ :title="item.title"
419
+ >
420
+ <customDatePicker
421
+ v-model="model[item.sourceId]"
422
+ type="date"
423
+ :clearable="!item.disabled"
424
+ :placeholder="`请选择${item.title}`"
425
+ />
310
426
  </wd-form-item>
311
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
312
- <customDatePicker v-model="model[item.sourceId]" type="datetime" :clearable="!item.disabled" :placeholder="`请选择${item.title}`" />
427
+ <wd-form-item
428
+ v-else-if="
429
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'datetime'
430
+ "
431
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
432
+ :prop="item.sourceId"
433
+ :title="item.title"
434
+ >
435
+ <customDatePicker
436
+ v-model="model[item.sourceId]"
437
+ type="datetime"
438
+ :clearable="!item.disabled"
439
+ :placeholder="`请选择${item.title}`"
440
+ />
313
441
  </wd-form-item>
314
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'time'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
315
- <customDatePicker v-model="model[item.sourceId]" type="time" use-second :clearable="!item.disabled" :placeholder="`请选择${item.title}`" />
442
+ <wd-form-item
443
+ v-else-if="
444
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'time'
445
+ "
446
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
447
+ :prop="item.sourceId"
448
+ :title="item.title"
449
+ >
450
+ <customDatePicker
451
+ v-model="model[item.sourceId]"
452
+ type="time"
453
+ use-second
454
+ :clearable="!item.disabled"
455
+ :placeholder="`请选择${item.title}`"
456
+ />
316
457
  </wd-form-item>
317
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date-YY'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
318
- <customDatePicker v-model="model[item.sourceId]" type="year" use-second :clearable="!item.disabled" :placeholder="`请选择${item.title}`" />
458
+ <wd-form-item
459
+ v-else-if="
460
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'date-YY'
461
+ "
462
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
463
+ :prop="item.sourceId"
464
+ :title="item.title"
465
+ >
466
+ <customDatePicker
467
+ v-model="model[item.sourceId]"
468
+ type="year"
469
+ use-second
470
+ :clearable="!item.disabled"
471
+ :placeholder="`请选择${item.title}`"
472
+ />
319
473
  </wd-form-item>
320
474
  <wd-form-item
321
- v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relfile'"
475
+ v-else-if="
476
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'file' ||
477
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relfile'
478
+ "
322
479
  :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
323
480
  :prop="item.sourceId"
324
481
  :title="item.title"
@@ -346,41 +503,122 @@ defineExpose({
346
503
  />
347
504
  </wd-form-item>
348
505
  <wd-form-item
349
- v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relselect'"
506
+ v-else-if="
507
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relselect'
508
+ "
350
509
  :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
351
510
  :prop="item.sourceId"
352
511
  :title="item.title"
353
512
  :style="{ display: item.title?.includes('y') ? 'none' : null }"
354
513
  >
355
- <WuiSelectPopup v-model="model[item.sourceId]" :source-id="item.sourceId" :title="item.title" :ext-control-type="Number(item.max) === 1 ? 'relselect' : 'ss'" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :default-select-first="!!item.defaultSelectFirst" />
514
+ <WuiSelectPopup
515
+ v-model="model[item.sourceId]"
516
+ :source-id="item.sourceId"
517
+ :title="item.title"
518
+ :ext-control-type="Number(item.max) === 1 ? 'relselect' : 'ss'"
519
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
520
+ :clearable="!item.disabled"
521
+ :default-select-first="!!item.defaultSelectFirst"
522
+ />
356
523
  </wd-form-item>
357
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'relselectvalue'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
358
- <WuiSelectPopup v-model="model[item.sourceId]" :source-id="item.sourceId" :title="item.title" :ext-control-type="item.extControlType" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :default-select-first="!!item.defaultSelectFirst" />
524
+ <wd-form-item
525
+ v-else-if="
526
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) ===
527
+ 'relselectvalue'
528
+ "
529
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
530
+ :prop="item.sourceId"
531
+ :title="item.title"
532
+ >
533
+ <WuiSelectPopup
534
+ v-model="model[item.sourceId]"
535
+ :source-id="item.sourceId"
536
+ :title="item.title"
537
+ :ext-control-type="item.extControlType"
538
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
539
+ :clearable="!item.disabled"
540
+ :default-select-first="!!item.defaultSelectFirst"
541
+ />
359
542
  </wd-form-item>
360
543
  <wd-form-item
361
- v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'tree-entity-select' || ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'table-entity-select'"
544
+ v-else-if="
545
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) ===
546
+ 'tree-entity-select' ||
547
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) ===
548
+ 'table-entity-select'
549
+ "
362
550
  :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
363
551
  :prop="item.sourceId"
364
552
  :title="item.title"
365
553
  >
366
- <WuiSelectPopup v-model="model[item.sourceId]" :source-id="item.sourceId" :title="item.title" :ext-control-type="Number(item.max) === 1 ? 'relselect' : 'ss'" :readonly="item.disabled || item.rowEditType === 'readonly'" :clearable="!item.disabled" :default-select-first="!!item.defaultSelectFirst" fold-card-model="complex" />
554
+ <WuiSelectPopup
555
+ v-model="model[item.sourceId]"
556
+ :source-id="item.sourceId"
557
+ :title="item.title"
558
+ :ext-control-type="Number(item.max) === 1 ? 'relselect' : 'ss'"
559
+ :readonly="item.disabled || item.rowEditType === 'readonly'"
560
+ :clearable="!item.disabled"
561
+ :default-select-first="!!item.defaultSelectFirst"
562
+ fold-card-model="complex"
563
+ />
367
564
  </wd-form-item>
368
565
  <!-- done -->
369
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'int'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
566
+ <wd-form-item
567
+ v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'int'"
568
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
569
+ :prop="item.sourceId"
570
+ :title="item.title"
571
+ >
370
572
  <view style="text-align: left">
371
- <wd-input-number v-model="model[item.sourceId]" :disabled="item.disabled || item.rowEditType === 'readonly'" :min="Number(item.min || 0)" :max="Number(item.max || Infinity)" />
573
+ <wd-input-number
574
+ v-model="model[item.sourceId]"
575
+ :disabled="item.disabled || item.rowEditType === 'readonly'"
576
+ :min="Number(item.min || 0)"
577
+ :max="Number(item.max || Infinity)"
578
+ />
372
579
  </view>
373
580
  </wd-form-item>
374
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'QRCode'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
581
+ <wd-form-item
582
+ v-else-if="
583
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'QRCode'
584
+ "
585
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
586
+ :prop="item.sourceId"
587
+ :title="item.title"
588
+ >
375
589
  <scanInput v-model="model[item.sourceId]" :disabled="item.disabled || item.rowEditType === 'readonly'" />
376
590
  </wd-form-item>
377
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'progress'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
378
- <wd-rate v-model="model[item.sourceId]" :disabled="item.disabled || item.rowEditType === 'readonly'" />
591
+ <wd-form-item
592
+ v-else-if="
593
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'progress'
594
+ "
595
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
596
+ :prop="item.sourceId"
597
+ :title="item.title"
598
+ >
599
+ <wd-rate
600
+ allow-half
601
+ v-model="model[item.sourceId]"
602
+ :disabled="item.disabled || item.rowEditType === 'readonly'"
603
+ />
379
604
  </wd-form-item>
380
605
  <!-- done -->
381
- <wd-form-item v-else-if="ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'yes-no-switch'" :class="{ 'no-border-top': fields.indexOf(item) === 0 }" :prop="item.sourceId" :title="item.title">
606
+ <wd-form-item
607
+ v-else-if="
608
+ ControlTypeSupportor.getControlType(item, props.entity && props.entity[item.sourceId]) === 'yes-no-switch'
609
+ "
610
+ :class="{ 'no-border-top': fields.indexOf(item) === 0 }"
611
+ :prop="item.sourceId"
612
+ :title="item.title"
613
+ >
382
614
  <view style="text-align: left">
383
- <wd-switch v-model="model[item.sourceId]" size="16" :disabled="item.disabled || item.rowEditType === 'readonly'" active-value="是" inactive-value="否" />
615
+ <wd-switch
616
+ v-model="model[item.sourceId]"
617
+ size="16"
618
+ :disabled="item.disabled || item.rowEditType === 'readonly'"
619
+ active-value="是"
620
+ inactive-value="否"
621
+ />
384
622
  </view>
385
623
  </wd-form-item>
386
624
  </view>
@@ -30,7 +30,7 @@ function openVideo(uitem: any) {
30
30
  function isControlType(item: Columns): string {
31
31
  return ControlTypeSupportor.getControlType(
32
32
  { ...item, hidden: false, disabled: false, defaultValue: '', transDefaultValue: '', required: false },
33
- props.data.fieldMap[item.sourceId]
33
+ props.data.fieldMap?.[item.sourceId] || ''
34
34
  )
35
35
  }
36
36
  </script>
@@ -113,7 +113,7 @@ function handleSubmit() {
113
113
  placeholder="请输入密码"
114
114
  :rules="[{ required: true, message: '请填写密码' }]"
115
115
  />
116
- <view class="p-4 pb-0 pt-0">
116
+ <view class="p-4 pb-0 pt-0 dark:bg-[#1b1b1e]">
117
117
  <wd-checkbox v-model="model.remember" shape="square">记住密码</wd-checkbox>
118
118
  </view>
119
119
  </wd-cell-group>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wui-components-v2",
3
- "version": "1.1.66",
3
+ "version": "1.1.68",
4
4
  "description": "wui 组件库",
5
5
  "author": "wgxshh",
6
6
  "license": "MIT",