dfish-widget 1.0.63 → 1.0.64
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/lib/index.esm.js +32 -35
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -7056,6 +7056,9 @@ var script$A = {
|
|
|
7056
7056
|
isFocusTarget(el) {
|
|
7057
7057
|
// dao
|
|
7058
7058
|
},
|
|
7059
|
+
getInputValue(mv) {
|
|
7060
|
+
return mv
|
|
7061
|
+
},
|
|
7059
7062
|
// @original: 检测表单是否有修改,对照参考的值为初始值
|
|
7060
7063
|
isModified(original) {
|
|
7061
7064
|
let dv = original ? this.defaultValue : this.modifiedValue;
|
|
@@ -7064,7 +7067,7 @@ var script$A = {
|
|
|
7064
7067
|
if (mv == null) mv = '';
|
|
7065
7068
|
if (dv == mv)
|
|
7066
7069
|
return false
|
|
7067
|
-
return
|
|
7070
|
+
return this.getInputValue(dv) != this.getInputValue(mv)
|
|
7068
7071
|
},
|
|
7069
7072
|
// @original: 设置为true,修改初始值
|
|
7070
7073
|
saveModified(original) {
|
|
@@ -7216,7 +7219,7 @@ var script$A = {
|
|
|
7216
7219
|
return r
|
|
7217
7220
|
},
|
|
7218
7221
|
input_value() {
|
|
7219
|
-
return this.x.modelValue
|
|
7222
|
+
return this.getInputValue(this.x.modelValue)
|
|
7220
7223
|
},
|
|
7221
7224
|
input_name() {
|
|
7222
7225
|
return this.x.name
|
|
@@ -7359,6 +7362,10 @@ var script$z = {
|
|
|
7359
7362
|
this.parentTrigger('change', v);
|
|
7360
7363
|
}
|
|
7361
7364
|
},
|
|
7365
|
+
getInputValue(v) {
|
|
7366
|
+
// 如果没有定义value,必须返回空字符串。因为当<input type="checkbox">没有value属性时,它的表单值会变成"on"
|
|
7367
|
+
return v == null ? '' : v
|
|
7368
|
+
},
|
|
7362
7369
|
parentTrigger(e, v) {
|
|
7363
7370
|
if (this.pubParent && this.pubParent.watchValue != v) {
|
|
7364
7371
|
this.pubParent.watchValue = v;
|
|
@@ -7399,21 +7406,13 @@ var script$z = {
|
|
|
7399
7406
|
this.onbasechange(e);
|
|
7400
7407
|
},
|
|
7401
7408
|
isModified(original) {
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
} else {
|
|
7405
|
-
let c = original ? this.defaultChecked : this.modifiedChecked;
|
|
7406
|
-
return c == this.isChecked
|
|
7407
|
-
}
|
|
7409
|
+
let c = original ? this.defaultChecked : this.modifiedChecked;
|
|
7410
|
+
return c != this.isChecked
|
|
7408
7411
|
},
|
|
7409
7412
|
saveModified(original) {
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
this.modifiedChecked = this.isChecked;
|
|
7414
|
-
if (original) {
|
|
7415
|
-
this.defaultChecked = this.modifiedChecked;
|
|
7416
|
-
}
|
|
7413
|
+
this.modifiedChecked = this.isChecked;
|
|
7414
|
+
if (original) {
|
|
7415
|
+
this.defaultChecked = this.modifiedChecked;
|
|
7417
7416
|
}
|
|
7418
7417
|
},
|
|
7419
7418
|
snapElem() {
|
|
@@ -7490,10 +7489,6 @@ var script$z = {
|
|
|
7490
7489
|
input_name() {
|
|
7491
7490
|
return this.x.name || (this.pubParent && this.pubParent.x.name)
|
|
7492
7491
|
},
|
|
7493
|
-
input_value() {
|
|
7494
|
-
// 如果没有定义value,必须返回空字符串。因为当<input type="checkbox">没有value属性时,它的表单值会变成"on"
|
|
7495
|
-
return this.x.value == null ? '' : this.x.value
|
|
7496
|
-
},
|
|
7497
7492
|
input_prop() {
|
|
7498
7493
|
return {
|
|
7499
7494
|
indeterminate: this.indeterminate,
|
|
@@ -10264,6 +10259,9 @@ const suffixHooks = {
|
|
|
10264
10259
|
this.$emit('update:modelValue', v);
|
|
10265
10260
|
this.trigger('change', v);
|
|
10266
10261
|
},
|
|
10262
|
+
getInputValue(v) {
|
|
10263
|
+
return v.length == 0 ? '' : JSON.stringify(v)
|
|
10264
|
+
},
|
|
10267
10265
|
getFileTypes() {
|
|
10268
10266
|
let t = this.x.fileTypes;
|
|
10269
10267
|
if (fileTypesAlias[t]) {
|
|
@@ -10526,8 +10524,7 @@ const suffixHooks = {
|
|
|
10526
10524
|
}
|
|
10527
10525
|
},
|
|
10528
10526
|
input_value() {
|
|
10529
|
-
|
|
10530
|
-
return v.length == 0 ? '' : JSON.stringify(v)
|
|
10527
|
+
return this.getInputValue(this.val())
|
|
10531
10528
|
},
|
|
10532
10529
|
errorTipTarget() {
|
|
10533
10530
|
return this.$refs.uploadbbr || this
|
|
@@ -11454,6 +11451,10 @@ var script$8 = {
|
|
|
11454
11451
|
mixins: [script$9],
|
|
11455
11452
|
props: ['picker', 'clearable'],
|
|
11456
11453
|
methods: {
|
|
11454
|
+
// implement
|
|
11455
|
+
getInputValue(v) {
|
|
11456
|
+
return v && typeof v === 'object' ? JSON.stringify(v) : v == null ? '' : v
|
|
11457
|
+
},
|
|
11457
11458
|
click(e) {
|
|
11458
11459
|
if (this.$slots.default) {
|
|
11459
11460
|
this.showDrop = !this.showDrop;
|
|
@@ -11502,10 +11503,6 @@ var script$8 = {
|
|
|
11502
11503
|
hasVal() {
|
|
11503
11504
|
return this.input_text
|
|
11504
11505
|
},
|
|
11505
|
-
input_value() {
|
|
11506
|
-
let v = this.x.modelValue;
|
|
11507
|
-
return v && typeof v === 'object' ? JSON.stringify(v) : v == null ? '' : v
|
|
11508
|
-
},
|
|
11509
11506
|
input_text() {
|
|
11510
11507
|
let v = this.x.modelValue;
|
|
11511
11508
|
if (v && typeof v === 'string') {
|
|
@@ -11617,6 +11614,7 @@ var script$5 = {
|
|
|
11617
11614
|
}
|
|
11618
11615
|
},
|
|
11619
11616
|
methods: {
|
|
11617
|
+
// implement
|
|
11620
11618
|
watchModelValue(v, ov) {
|
|
11621
11619
|
this.clear();
|
|
11622
11620
|
const or = ov && ov.map ? ov.map(n => n.value).join(',') : '';
|
|
@@ -11625,6 +11623,9 @@ var script$5 = {
|
|
|
11625
11623
|
this.trigger('change', v);
|
|
11626
11624
|
}
|
|
11627
11625
|
},
|
|
11626
|
+
getInputValue(mv) {
|
|
11627
|
+
return typeof mv === 'string' ? mv : $$1.array(mv).map(v => v.value).join(',')
|
|
11628
|
+
},
|
|
11628
11629
|
addVal(v) {
|
|
11629
11630
|
let mv;
|
|
11630
11631
|
if (this.x.multiple) {
|
|
@@ -11860,9 +11861,6 @@ var script$5 = {
|
|
|
11860
11861
|
hasVal() {
|
|
11861
11862
|
return this.input_value
|
|
11862
11863
|
},
|
|
11863
|
-
input_value() {
|
|
11864
|
-
return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(v => v.value).join(',')
|
|
11865
|
-
},
|
|
11866
11864
|
input_title() {
|
|
11867
11865
|
return typeof this.x.modelValue === 'string' ? '' : $$1.array(this.x.modelValue).map(v => v.text).join(', ')
|
|
11868
11866
|
},
|
|
@@ -11926,6 +11924,9 @@ var script$4 = {
|
|
|
11926
11924
|
strict: true
|
|
11927
11925
|
}
|
|
11928
11926
|
},
|
|
11927
|
+
getInputValue(mv) {
|
|
11928
|
+
return typeof mv === 'string' ? mv : $$1.array(mv).map(v => v.value).join(',')
|
|
11929
|
+
},
|
|
11929
11930
|
initOptions(v) {
|
|
11930
11931
|
if (v == null) v = this.x.modelValue;
|
|
11931
11932
|
if (v && typeof v !== 'string') {
|
|
@@ -12321,9 +12322,6 @@ var script$4 = {
|
|
|
12321
12322
|
hasVal() {
|
|
12322
12323
|
return this.input_value
|
|
12323
12324
|
},
|
|
12324
|
-
input_value() {
|
|
12325
|
-
return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(v => v.value).join(',')
|
|
12326
|
-
},
|
|
12327
12325
|
input_title() {
|
|
12328
12326
|
return typeof this.x.modelValue === 'string' ? '' : $$1.array(this.x.modelValue).map(v => v.text || v.value).join(', ')
|
|
12329
12327
|
},
|
|
@@ -12624,6 +12622,9 @@ var script$1 = {
|
|
|
12624
12622
|
mixins: [script$A],
|
|
12625
12623
|
props: ['vertical'],
|
|
12626
12624
|
methods: {
|
|
12625
|
+
getInputValue(mv) {
|
|
12626
|
+
return mv == null ? '' : typeof mv === 'object' ? JSON.stringify(mv) : mv
|
|
12627
|
+
},
|
|
12627
12628
|
html_input() {
|
|
12628
12629
|
return [
|
|
12629
12630
|
this.html_input_hidden(),
|
|
@@ -12642,10 +12643,6 @@ var script$1 = {
|
|
|
12642
12643
|
}
|
|
12643
12644
|
}
|
|
12644
12645
|
},
|
|
12645
|
-
input_value() {
|
|
12646
|
-
let mv = this.x.modelValue;
|
|
12647
|
-
return mv == null ? '' : typeof mv === 'object' ? JSON.stringify(mv) : mv
|
|
12648
|
-
},
|
|
12649
12646
|
html_class() {
|
|
12650
12647
|
return [{
|
|
12651
12648
|
'z-vertical': this.x.vertical,
|