dfish-widget 0.1.349 → 0.1.350
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 +16 -21
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -244,7 +244,7 @@ var loc = {
|
|
|
244
244
|
if (a) {
|
|
245
245
|
a = a.replace(/\{(\d+)([^\d]+)?\}/g, function ($0, $1, $2) {
|
|
246
246
|
var d = args[parseFloat($1)];
|
|
247
|
-
return d == null || d
|
|
247
|
+
return d == null || d === '' ? '' : $2 ? d + $2 : d;
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -795,6 +795,7 @@ var _snaptype = {
|
|
|
795
795
|
b: ['bb'],
|
|
796
796
|
l: ['ll'],
|
|
797
797
|
r: ['rr'],
|
|
798
|
+
c: ['cc'],
|
|
798
799
|
top: ['tt'],
|
|
799
800
|
bottom: ['bb'],
|
|
800
801
|
left: ['ll'],
|
|
@@ -1030,7 +1031,7 @@ var snap = function snap(a, b, c, d, e, f, u) {
|
|
|
1030
1031
|
}
|
|
1031
1032
|
|
|
1032
1033
|
if (e) {
|
|
1033
|
-
// 自适应位置
|
|
1034
|
+
// 自适应位置
|
|
1034
1035
|
var l = o.left,
|
|
1035
1036
|
r = o.right,
|
|
1036
1037
|
b = o.bottom,
|
|
@@ -4527,7 +4528,7 @@ var script$14 = {
|
|
|
4527
4528
|
} else if (d) {
|
|
4528
4529
|
return d.isWidget ? d.snapElem() : d;
|
|
4529
4530
|
} else {
|
|
4530
|
-
return this.x.local
|
|
4531
|
+
return this.x.local ? this.getLocalElem() : this.defaultSnapTargetElem;
|
|
4531
4532
|
}
|
|
4532
4533
|
},
|
|
4533
4534
|
snapCls: function snapCls(a) {
|
|
@@ -4734,6 +4735,11 @@ var script$14 = {
|
|
|
4734
4735
|
var o = this.getOptions();
|
|
4735
4736
|
return o && o.args;
|
|
4736
4737
|
},
|
|
4738
|
+
defaultSnapTargetElem: function defaultSnapTargetElem() {//implement
|
|
4739
|
+
},
|
|
4740
|
+
defaultSnapPosition: function defaultSnapPosition() {
|
|
4741
|
+
return 'cc';
|
|
4742
|
+
},
|
|
4737
4743
|
html_class: function html_class() {
|
|
4738
4744
|
return ['w-vertical', this.animateClass, this.snapClass, {
|
|
4739
4745
|
'z-hide': this.isDeactivated,
|
|
@@ -6349,12 +6355,12 @@ var _valid_err = function _valid_err(v) {
|
|
|
6349
6355
|
var c, d, e;
|
|
6350
6356
|
if (k.valid && (e = k.valid(v))) return e;
|
|
6351
6357
|
if ((c = this.vv('required')) && (k.required ? k.required(v) : !v)) return this.formErr('required');
|
|
6352
|
-
if ((c = this.vv('minLength')) && c > 0 && v && (k.minLength ? k.minLength(v) : $$1.strLen(v) < c)) return this.formErr('minLength', [c]);
|
|
6353
|
-
if ((c = this.vv('maxLength')) && c > 0 && v && (k.maxLength ? k.maxLength(v) : (d = $$1.strLen(v)) > c)) return this.formErr('maxLength', [d - c]);
|
|
6354
|
-
if ((c = this.vv('minValue')) && v && (k.minValue ? k.minValue(v) : $$1.isNumber(c) ? $$1.number(v) < $$1.number(c) : v < c)) return this.formErr('minValue', [c]);
|
|
6355
|
-
if ((c = this.vv('maxValue')) && v && (k.maxValue ? k.maxValue(v) : $$1.isNumber(c) ? $$1.number(v) > $$1.number(c) : v > c)) return this.formErr('maxValue', [c]);
|
|
6356
|
-
if ((c = this.vv('minSize')) && c > 0 && v && (k.minSize ? k.minSize(v) : v.split(',').length < $$1.number(c))) return this.formErr('minSize', [c]);
|
|
6357
|
-
if ((c = this.vv('maxSize')) && c > 0 && v && (k.maxSize ? k.maxSize(v) : v.split(',').length > $$1.number(c))) return this.formErr('maxSize', [c]);
|
|
6358
|
+
if ((c = this.vv('minLength')) != null && c !== '' && c > 0 && v && (k.minLength ? k.minLength(v) : $$1.strLen(v) < c)) return this.formErr('minLength', [c]);
|
|
6359
|
+
if ((c = this.vv('maxLength')) != null && c !== '' && c > 0 && v && (k.maxLength ? k.maxLength(v) : (d = $$1.strLen(v)) > c)) return this.formErr('maxLength', [d - c]);
|
|
6360
|
+
if ((c = this.vv('minValue')) != null && c !== '' && v && (k.minValue ? k.minValue(v) : $$1.isNumber(c) ? $$1.number(v) < $$1.number(c) : v < c)) return this.formErr('minValue', [c]);
|
|
6361
|
+
if ((c = this.vv('maxValue')) != null && c !== '' && v && (k.maxValue ? k.maxValue(v) : $$1.isNumber(c) ? $$1.number(v) > $$1.number(c) : v > c)) return this.formErr('maxValue', [c]);
|
|
6362
|
+
if ((c = this.vv('minSize')) != null && c !== '' && c > 0 && v && (k.minSize ? k.minSize(v) : v.split(',').length < $$1.number(c))) return this.formErr('minSize', [c]);
|
|
6363
|
+
if ((c = this.vv('maxSize')) != null && c !== '' && c > 0 && v && (k.maxSize ? k.maxSize(v) : v.split(',').length > $$1.number(c))) return this.formErr('maxSize', [c]);
|
|
6358
6364
|
if ((c = this.vv('pattern')) && v && (k.pattern ? k.pattern(c) : typeof c === 'string' ? !$$1.eval("".concat(c, ".test(v)"), {
|
|
6359
6365
|
v: v
|
|
6360
6366
|
}) : !c.test(v))) return this.formErr('pattern');
|
|
@@ -6433,7 +6439,7 @@ var script$z = {
|
|
|
6433
6439
|
name: this.x.name,
|
|
6434
6440
|
code: b,
|
|
6435
6441
|
label: t,
|
|
6436
|
-
text: this.rules[b] && this.rules[b].text || $$1.loc.ps.apply(null, [$$1.loc.form[b === 'required' && !t ? 'complete_required' : b], t || ''].concat(c
|
|
6442
|
+
text: this.rules[b] && this.rules[b].text || $$1.loc.ps.apply(null, [$$1.loc.form[b === 'required' && !t ? 'complete_required' : b], t || ''].concat(c != null && c !== '' ? c : [])) || ''
|
|
6437
6443
|
};
|
|
6438
6444
|
},
|
|
6439
6445
|
warn: function warn(a) {
|
|
@@ -10071,11 +10077,6 @@ var script$a = {
|
|
|
10071
10077
|
$$1.close(this.tip_uid);
|
|
10072
10078
|
this.tip_uid = null;
|
|
10073
10079
|
}
|
|
10074
|
-
} else if (u) {
|
|
10075
|
-
this.showTip({
|
|
10076
|
-
text: $$1.loc.form[r < v ? 'step_max_value' : 'step_min_value'],
|
|
10077
|
-
independent: true
|
|
10078
|
-
});
|
|
10079
10080
|
}
|
|
10080
10081
|
},
|
|
10081
10082
|
isFocusTarget: function isFocusTarget(el) {
|
|
@@ -10110,12 +10111,6 @@ var script$a = {
|
|
|
10110
10111
|
var _this63 = this;
|
|
10111
10112
|
|
|
10112
10113
|
return {
|
|
10113
|
-
minValue: function minValue(v) {
|
|
10114
|
-
return $$1.number(v) < $$1.number(_this63.vv('minValue'));
|
|
10115
|
-
},
|
|
10116
|
-
maxValue: function maxValue(v) {
|
|
10117
|
-
return $$1.number(v) > $$1.number(_this63.vv('maxValue'));
|
|
10118
|
-
},
|
|
10119
10114
|
compare: function compare(v, c, d) {
|
|
10120
10115
|
return !$$1.eval('v' + (_this63.x.compare.mode || '==') + 'd', {
|
|
10121
10116
|
v: v,
|