dfish-widget 0.1.356 → 0.1.360
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/css/style.css +1 -1
- package/lib/index.esm.js +174 -139
- 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
|
@@ -202,7 +202,7 @@ var loc = {
|
|
|
202
202
|
jigsaw_required: '请完成滑块验证',
|
|
203
203
|
jigsaw_errorimg: '图片数据异常',
|
|
204
204
|
upload_loading: '正在上传,请稍候..',
|
|
205
|
-
upload_invalid_file: '
|
|
205
|
+
upload_invalid_file: '存在无效文件',
|
|
206
206
|
no_files: '<没有文件>',
|
|
207
207
|
upload_error: '(上传失败)',
|
|
208
208
|
upload_limit: '上传数量超过上限(最多{0}个)',
|
|
@@ -2084,10 +2084,10 @@ $$1.confirm = function (text, yes, no, cover) {
|
|
|
2084
2084
|
};
|
|
2085
2085
|
|
|
2086
2086
|
$$1.directiveHooks = {
|
|
2087
|
-
colspan: function colspan(el, v) {
|
|
2087
|
+
colspan: function colspan(el, v, n) {
|
|
2088
2088
|
el.style.gridColumn = !v || v == -1 ? '' : "span ".concat(v);
|
|
2089
2089
|
},
|
|
2090
|
-
rowspan: function rowspan(el, v) {
|
|
2090
|
+
rowspan: function rowspan(el, v, n) {
|
|
2091
2091
|
el.style.gridRow = !v || v == -1 ? '' : "span ".concat(v);
|
|
2092
2092
|
}
|
|
2093
2093
|
};
|
|
@@ -2132,7 +2132,7 @@ window.addEventListener('unhandledrejection', function (event) {
|
|
|
2132
2132
|
});
|
|
2133
2133
|
var bindCache = {};
|
|
2134
2134
|
var script$1m = {
|
|
2135
|
-
props: ['id', 'data', 'template', 'preload', 'width', 'height', '
|
|
2135
|
+
props: ['id', 'data', 'template', 'preload', 'width', 'height', 'colspan', 'rowspan', 'on', 'tip', 'ownproperty', 'orientUid', 'templateWrapper', 'preloadWrapper'],
|
|
2136
2136
|
beforeCreate: function beforeCreate() {
|
|
2137
2137
|
this.isWidget = true;
|
|
2138
2138
|
|
|
@@ -2147,7 +2147,6 @@ var script$1m = {
|
|
|
2147
2147
|
created: function created() {
|
|
2148
2148
|
var _this3 = this;
|
|
2149
2149
|
|
|
2150
|
-
//if (this.$options.name=='w-dialog') console.log(this.templateWrapper, this.preloadWrapper, this.$attrs.class, this.isEntity)
|
|
2151
2150
|
var propsEntity = !(this.template || this.preload);
|
|
2152
2151
|
var dftopt = !this.ownproperty && propsEntity && this.getDefaultOption(this.$attrs.class);
|
|
2153
2152
|
var dftoptEntity = !(dftopt.template || dftopt.preload);
|
|
@@ -2448,14 +2447,12 @@ var script$1m = {
|
|
|
2448
2447
|
html_attrs: function html_attrs() {
|
|
2449
2448
|
return _objectSpread(_objectSpread({
|
|
2450
2449
|
id: this.uid,
|
|
2451
|
-
class: [this.$options.name, this.html_class, this.x.class],
|
|
2450
|
+
class: ['w-w', this.$options.name, this.html_class, this.x.class],
|
|
2452
2451
|
style: [{
|
|
2453
2452
|
width: this.x.width && $$1.unitSize(this.x.width),
|
|
2454
2453
|
height: this.x.height && $$1.unitSize(this.x.height),
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
maxWidth: this.x.maxWidth && $$1.unitSize(this.x.maxWidth),
|
|
2458
|
-
maxHeight: this.x.maxHeight && $$1.unitSize(this.x.maxHeight)
|
|
2454
|
+
'--w-grid-colspan': !this.x.colspan || this.x.colspan == -1 ? null : "span ".concat(this.x.colspan),
|
|
2455
|
+
'--w-grid-rowspan': !this.x.rowspan || this.x.rowspan == -1 ? null : "span ".concat(this.x.rowspan)
|
|
2459
2456
|
}, this.html_style, this.x.style]
|
|
2460
2457
|
}, this.x.on && $$1.lodash.mapKeys($$1.lodash.omitBy(this.x.on, function (v, k) {
|
|
2461
2458
|
return k.includes(':');
|
|
@@ -5598,7 +5595,7 @@ var script$Q = {
|
|
|
5598
5595
|
},
|
|
5599
5596
|
data: function data() {
|
|
5600
5597
|
return {
|
|
5601
|
-
|
|
5598
|
+
rows: null
|
|
5602
5599
|
};
|
|
5603
5600
|
},
|
|
5604
5601
|
methods: {
|
|
@@ -5628,7 +5625,7 @@ var script$Q = {
|
|
|
5628
5625
|
}
|
|
5629
5626
|
}
|
|
5630
5627
|
|
|
5631
|
-
this.
|
|
5628
|
+
this.rows = {};
|
|
5632
5629
|
return h$1('div', {
|
|
5633
5630
|
class: 'w-table-tbl-wrap'
|
|
5634
5631
|
}, h$1('table', {
|
|
@@ -5815,7 +5812,7 @@ var script$O = {
|
|
|
5815
5812
|
},
|
|
5816
5813
|
html_slots: function html_slots() {
|
|
5817
5814
|
var ri = this.rowIndex;
|
|
5818
|
-
var rs = this.pubParent.
|
|
5815
|
+
var rs = this.pubParent.rows;
|
|
5819
5816
|
var ci = 0;
|
|
5820
5817
|
return this.slots_children().map(function (td) {
|
|
5821
5818
|
if (rs[ri] && rs[ri][ci]) {
|
|
@@ -6018,7 +6015,7 @@ var script$L = {
|
|
|
6018
6015
|
'grid-template-columns': cols,
|
|
6019
6016
|
'grid-template-rows': rows,
|
|
6020
6017
|
'gap': this.x.gap ? $$1.unitSize(this.x.gap) : '',
|
|
6021
|
-
'--w-grid-
|
|
6018
|
+
'--w-grid-colspan': dc == -1 || dc == null ? '' : "span ".concat(dc)
|
|
6022
6019
|
};
|
|
6023
6020
|
}
|
|
6024
6021
|
}
|
|
@@ -9664,6 +9661,34 @@ var script$f = {
|
|
|
9664
9661
|
}
|
|
9665
9662
|
},
|
|
9666
9663
|
computed: {
|
|
9664
|
+
validHooks: function validHooks() {
|
|
9665
|
+
var _this57 = this;
|
|
9666
|
+
|
|
9667
|
+
return {
|
|
9668
|
+
valid: function valid(v) {
|
|
9669
|
+
var _iterator5 = _createForOfIteratorHelper(_this57.list),
|
|
9670
|
+
_step5;
|
|
9671
|
+
|
|
9672
|
+
try {
|
|
9673
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
9674
|
+
var item = _step5.value;
|
|
9675
|
+
|
|
9676
|
+
if (item.loading) {
|
|
9677
|
+
return _this57.formErr('upload_loading');
|
|
9678
|
+
}
|
|
9679
|
+
|
|
9680
|
+
if (item.error) {
|
|
9681
|
+
return _this57.formErr('upload_invalid_file');
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
} catch (err) {
|
|
9685
|
+
_iterator5.e(err);
|
|
9686
|
+
} finally {
|
|
9687
|
+
_iterator5.f();
|
|
9688
|
+
}
|
|
9689
|
+
}
|
|
9690
|
+
};
|
|
9691
|
+
},
|
|
9667
9692
|
input_value: function input_value() {
|
|
9668
9693
|
var v = this.val();
|
|
9669
9694
|
return v.length == 0 ? '' : JSON.stringify(v);
|
|
@@ -9682,11 +9707,11 @@ var script$f = {
|
|
|
9682
9707
|
};
|
|
9683
9708
|
},
|
|
9684
9709
|
html_on: function html_on() {
|
|
9685
|
-
var
|
|
9710
|
+
var _this58 = this;
|
|
9686
9711
|
|
|
9687
9712
|
return {
|
|
9688
9713
|
onclick: function onclick() {
|
|
9689
|
-
return
|
|
9714
|
+
return _this58.warn(false);
|
|
9690
9715
|
}
|
|
9691
9716
|
};
|
|
9692
9717
|
}
|
|
@@ -9706,30 +9731,30 @@ var script$e = {
|
|
|
9706
9731
|
this.provideUpload.clickItem(e, this.item);
|
|
9707
9732
|
},
|
|
9708
9733
|
createImageThumbnail: function createImageThumbnail() {
|
|
9709
|
-
var
|
|
9734
|
+
var _this59 = this;
|
|
9710
9735
|
|
|
9711
9736
|
var r = new FileReader();
|
|
9712
9737
|
|
|
9713
9738
|
r.onload = function (e) {
|
|
9714
|
-
if (
|
|
9715
|
-
|
|
9739
|
+
if (_this59.item.loaded) return;
|
|
9740
|
+
_this59.dataURL = e.target.result;
|
|
9716
9741
|
};
|
|
9717
9742
|
|
|
9718
9743
|
r.readAsDataURL(this.item.file);
|
|
9719
9744
|
},
|
|
9720
9745
|
createVideoThumbnail: function createVideoThumbnail() {
|
|
9721
|
-
var
|
|
9746
|
+
var _this60 = this;
|
|
9722
9747
|
|
|
9723
9748
|
var video = document.createElement('video');
|
|
9724
9749
|
video.addEventListener('loadeddata', function () {
|
|
9725
9750
|
setTimeout(function () {
|
|
9726
|
-
if (
|
|
9751
|
+
if (_this60.item.loaded) return;
|
|
9727
9752
|
var cvs = document.createElement('canvas');
|
|
9728
9753
|
var ctx = cvs.getContext('2d');
|
|
9729
9754
|
cvs.width = video.videoWidth;
|
|
9730
9755
|
cvs.height = video.videoHeight;
|
|
9731
9756
|
ctx.drawImage(video, 0, 0);
|
|
9732
|
-
|
|
9757
|
+
_this60.dataURL = cvs.toDataURL('image/png');
|
|
9733
9758
|
video.pause();
|
|
9734
9759
|
$$1.q(video).remove();
|
|
9735
9760
|
}, 150);
|
|
@@ -9784,14 +9809,14 @@ var script$e = {
|
|
|
9784
9809
|
}
|
|
9785
9810
|
},
|
|
9786
9811
|
mounted: function mounted() {
|
|
9787
|
-
var
|
|
9812
|
+
var _this61 = this;
|
|
9788
9813
|
|
|
9789
9814
|
if (!this.item.loaded && this.item.file) {
|
|
9790
9815
|
this.upload.isVideo(this.item) ? this.createVideoThumbnail() : this.upload.isImage(this.item) ? this.createImageThumbnail() : null;
|
|
9791
9816
|
this.$watch(function () {
|
|
9792
|
-
return
|
|
9817
|
+
return _this61.item.progress;
|
|
9793
9818
|
}, function (v) {
|
|
9794
|
-
return
|
|
9819
|
+
return _this61.setProgress(v);
|
|
9795
9820
|
}, {
|
|
9796
9821
|
immediate: true
|
|
9797
9822
|
});
|
|
@@ -9888,7 +9913,7 @@ var script$d = {
|
|
|
9888
9913
|
});
|
|
9889
9914
|
},
|
|
9890
9915
|
html_input_button: function html_input_button() {
|
|
9891
|
-
var
|
|
9916
|
+
var _this62 = this;
|
|
9892
9917
|
|
|
9893
9918
|
return h$1(script$I, {
|
|
9894
9919
|
ref: 'uploadbbr',
|
|
@@ -9896,16 +9921,16 @@ var script$d = {
|
|
|
9896
9921
|
gap: 10
|
|
9897
9922
|
}, {
|
|
9898
9923
|
default: function _default() {
|
|
9899
|
-
return [
|
|
9924
|
+
return [_this62.$slots.button ? _this62.$slots.button() : h$1(script$$, {
|
|
9900
9925
|
ref: 'uploadbutton',
|
|
9901
9926
|
title: $$1.loc.form.choose_image,
|
|
9902
9927
|
icon: '.f-i .f-i-plus',
|
|
9903
9928
|
class: 'w-mediaupload-button',
|
|
9904
9929
|
style: {
|
|
9905
|
-
width: $$1.unitSize(
|
|
9906
|
-
height: $$1.unitSize(
|
|
9930
|
+
width: $$1.unitSize(_this62.x.thumbnailWidth),
|
|
9931
|
+
height: $$1.unitSize(_this62.x.thumbnailHeight)
|
|
9907
9932
|
},
|
|
9908
|
-
onclick:
|
|
9933
|
+
onclick: _this62.chooseFile
|
|
9909
9934
|
})];
|
|
9910
9935
|
}
|
|
9911
9936
|
});
|
|
@@ -10087,7 +10112,7 @@ var script$a = {
|
|
|
10087
10112
|
return this.$refs.btns && this.$refs.btns.contains(el);
|
|
10088
10113
|
},
|
|
10089
10114
|
html_button: function html_button() {
|
|
10090
|
-
var
|
|
10115
|
+
var _this63 = this;
|
|
10091
10116
|
|
|
10092
10117
|
return h$1('div', {
|
|
10093
10118
|
class: 'w-spinner-step w-input-bbr f-flex-column f-oh',
|
|
@@ -10096,14 +10121,14 @@ var script$a = {
|
|
|
10096
10121
|
class: 'w-spinner-step-btn f-rel',
|
|
10097
10122
|
disabled: this.x.disabled,
|
|
10098
10123
|
onclick: function onclick(e) {
|
|
10099
|
-
return
|
|
10124
|
+
return _this63.stepBy(1);
|
|
10100
10125
|
},
|
|
10101
10126
|
innerHTML: '<i class="f-abs-center f-i f-i-caret-up"></i>'
|
|
10102
10127
|
}), h$1('button', {
|
|
10103
10128
|
class: 'w-spinner-step-btn f-rel',
|
|
10104
10129
|
disabled: this.x.disabled,
|
|
10105
10130
|
onclick: function onclick(e) {
|
|
10106
|
-
return
|
|
10131
|
+
return _this63.stepBy(-1);
|
|
10107
10132
|
},
|
|
10108
10133
|
innerHTML: '<i class="f-abs-center f-i f-i-caret-down"></i>'
|
|
10109
10134
|
})]);
|
|
@@ -10111,24 +10136,24 @@ var script$a = {
|
|
|
10111
10136
|
},
|
|
10112
10137
|
computed: {
|
|
10113
10138
|
validHooks: function validHooks() {
|
|
10114
|
-
var
|
|
10139
|
+
var _this64 = this;
|
|
10115
10140
|
|
|
10116
10141
|
return {
|
|
10117
10142
|
compare: function compare(v, c, d) {
|
|
10118
|
-
return !$$1.eval('v' + (
|
|
10143
|
+
return !$$1.eval('v' + (_this64.x.compare.mode || '==') + 'd', {
|
|
10119
10144
|
v: v,
|
|
10120
10145
|
d: d
|
|
10121
10146
|
});
|
|
10122
10147
|
},
|
|
10123
10148
|
valid: function valid(v) {
|
|
10124
|
-
|
|
10149
|
+
_this64.x.format && (v = v.replace(RegExp(_this64.x.format.separator || ',', 'g'), ''));
|
|
10125
10150
|
|
|
10126
10151
|
if (v) {
|
|
10127
|
-
if (isNaN(v) || /\s/.test(v)) return
|
|
10128
|
-
var d =
|
|
10129
|
-
if (!d && ~v.indexOf('.')) return
|
|
10130
|
-
if (d && d > 0 && $$1.strFrom(v, '.').length > d) return
|
|
10131
|
-
if (
|
|
10152
|
+
if (isNaN(v) || /\s/.test(v)) return _this64.formErr('number_invalid');
|
|
10153
|
+
var d = _this64.x.decimal;
|
|
10154
|
+
if (!d && ~v.indexOf('.')) return _this64.formErr('number_integer');
|
|
10155
|
+
if (d && d > 0 && $$1.strFrom(v, '.').length > d) return _this64.formErr('number_decimal_digit', [d]);
|
|
10156
|
+
if (_this64.provideRangeParent) return _this64.provideRangeParent.validHooks.valid();
|
|
10132
10157
|
}
|
|
10133
10158
|
}
|
|
10134
10159
|
};
|
|
@@ -10199,7 +10224,7 @@ var script$9 = {
|
|
|
10199
10224
|
};
|
|
10200
10225
|
},
|
|
10201
10226
|
html_button: function html_button() {
|
|
10202
|
-
var
|
|
10227
|
+
var _this65 = this;
|
|
10203
10228
|
|
|
10204
10229
|
var r = [];
|
|
10205
10230
|
if (!this.x.noButton) r.push(h$1('button', {
|
|
@@ -10216,28 +10241,28 @@ var script$9 = {
|
|
|
10216
10241
|
autoHide: true,
|
|
10217
10242
|
snap: {
|
|
10218
10243
|
target: function target() {
|
|
10219
|
-
return
|
|
10244
|
+
return _this65.snapElem();
|
|
10220
10245
|
},
|
|
10221
10246
|
position: 'v',
|
|
10222
10247
|
indent: 1
|
|
10223
10248
|
},
|
|
10224
10249
|
on: {
|
|
10225
10250
|
close: function close() {
|
|
10226
|
-
|
|
10251
|
+
_this65.showDrop = false, _this65.currentDate = null;
|
|
10227
10252
|
}
|
|
10228
10253
|
}
|
|
10229
10254
|
}, {
|
|
10230
10255
|
default: function _default() {
|
|
10231
10256
|
return h$1(script$q, _objectSpread(_objectSpread({
|
|
10232
10257
|
pad: true,
|
|
10233
|
-
current:
|
|
10234
|
-
value:
|
|
10235
|
-
format:
|
|
10236
|
-
},
|
|
10237
|
-
success:
|
|
10258
|
+
current: _this65.currentDate || _this65.x.modelValue || '',
|
|
10259
|
+
value: _this65.x.modelValue,
|
|
10260
|
+
format: _this65.x.format
|
|
10261
|
+
}, _this65.getPeriod()), {}, {
|
|
10262
|
+
success: _this65.calendarCallback,
|
|
10238
10263
|
on: {
|
|
10239
10264
|
'click:item': function clickItem(e, item) {
|
|
10240
|
-
return
|
|
10265
|
+
return _this65.currentDate = item.value;
|
|
10241
10266
|
}
|
|
10242
10267
|
}
|
|
10243
10268
|
}));
|
|
@@ -10250,46 +10275,46 @@ var script$9 = {
|
|
|
10250
10275
|
},
|
|
10251
10276
|
computed: {
|
|
10252
10277
|
validHooks: function validHooks() {
|
|
10253
|
-
var
|
|
10278
|
+
var _this66 = this;
|
|
10254
10279
|
|
|
10255
10280
|
return {
|
|
10256
10281
|
minValue: function minValue(v) {
|
|
10257
|
-
return $$1.dateParse(v,
|
|
10282
|
+
return $$1.dateParse(v, _this66.x.format) < $$1.dateParse(_this66.vv('minValue'), _this66.x.format);
|
|
10258
10283
|
},
|
|
10259
10284
|
maxValue: function maxValue(v) {
|
|
10260
|
-
return $$1.dateParse(v,
|
|
10285
|
+
return $$1.dateParse(v, _this66.x.format) > $$1.dateParse(_this66.vv('maxValue'), _this66.x.format);
|
|
10261
10286
|
},
|
|
10262
10287
|
compare: function compare(v, c, d) {
|
|
10263
|
-
if (
|
|
10264
|
-
var f = (
|
|
10265
|
-
v = $$1.dateFormat($$1.dateParse(v,
|
|
10288
|
+
if (_this66.x.format && c.x.format) {
|
|
10289
|
+
var f = (_this66.x.format.length > c.x.format.length ? _this66 : c).x.format;
|
|
10290
|
+
v = $$1.dateFormat($$1.dateParse(v, _this66.x.format), f);
|
|
10266
10291
|
d = $$1.dateFormat($$1.dateParse(d, c.x.format), f);
|
|
10267
10292
|
}
|
|
10268
10293
|
|
|
10269
|
-
return !$$1.eval('v' + (
|
|
10294
|
+
return !$$1.eval('v' + (_this66.x.compare.mode || '==') + 'd', {
|
|
10270
10295
|
v: v,
|
|
10271
10296
|
d: d
|
|
10272
10297
|
});
|
|
10273
10298
|
},
|
|
10274
10299
|
valid: function valid(v) {
|
|
10275
|
-
if (
|
|
10300
|
+
if (_this66.x.multiple) return;
|
|
10276
10301
|
|
|
10277
10302
|
if (v) {
|
|
10278
10303
|
var _c4 = v;
|
|
10279
|
-
var d = $$1.dateParse(_c4,
|
|
10304
|
+
var d = $$1.dateParse(_c4, _this66.x.format);
|
|
10280
10305
|
var y = d.getFullYear();
|
|
10281
10306
|
var m = 9999;
|
|
10282
10307
|
var n = 1000;
|
|
10283
|
-
if (y > m || y < n) return
|
|
10308
|
+
if (y > m || y < n) return _this66.formErr('time_exceed', [n, m]);
|
|
10284
10309
|
|
|
10285
|
-
if (_c4 != $$1.dateFormat(d,
|
|
10286
|
-
return
|
|
10310
|
+
if (_c4 != $$1.dateFormat(d, _this66.x.format)) {
|
|
10311
|
+
return _this66.formErr('time_format', [$$1.dateFormat(d, _this66.x.format)]);
|
|
10287
10312
|
}
|
|
10288
10313
|
}
|
|
10289
10314
|
|
|
10290
|
-
if (
|
|
10291
|
-
if (
|
|
10292
|
-
if (
|
|
10315
|
+
if (_this66.vv('beforeNow') && v && v > $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('beforeNow', [_this66.x.beforeNow]);
|
|
10316
|
+
if (_this66.vv('afterNow') && v && v < $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('afterNow', [_this66.x.afterNow]);
|
|
10317
|
+
if (_this66.provideRangeParent) return _this66.provideRangeParent.validHooks.valid();
|
|
10293
10318
|
}
|
|
10294
10319
|
};
|
|
10295
10320
|
},
|
|
@@ -10337,7 +10362,7 @@ var script$8 = {
|
|
|
10337
10362
|
return this.input_text;
|
|
10338
10363
|
},
|
|
10339
10364
|
html_input: function html_input() {
|
|
10340
|
-
var
|
|
10365
|
+
var _this67 = this;
|
|
10341
10366
|
|
|
10342
10367
|
var t = this.input_text;
|
|
10343
10368
|
var p = this.input_placeholder;
|
|
@@ -10356,14 +10381,14 @@ var script$8 = {
|
|
|
10356
10381
|
autoHide: true,
|
|
10357
10382
|
snap: {
|
|
10358
10383
|
target: function target() {
|
|
10359
|
-
return
|
|
10384
|
+
return _this67.el('main');
|
|
10360
10385
|
},
|
|
10361
10386
|
position: 'v',
|
|
10362
10387
|
indent: 1
|
|
10363
10388
|
},
|
|
10364
10389
|
on: {
|
|
10365
10390
|
close: function close() {
|
|
10366
|
-
return
|
|
10391
|
+
return _this67.showDrop = false;
|
|
10367
10392
|
}
|
|
10368
10393
|
}
|
|
10369
10394
|
}, this.$slots)];
|
|
@@ -10377,7 +10402,7 @@ var script$8 = {
|
|
|
10377
10402
|
},
|
|
10378
10403
|
computed: {
|
|
10379
10404
|
input_text: function input_text() {
|
|
10380
|
-
var
|
|
10405
|
+
var _this68 = this;
|
|
10381
10406
|
|
|
10382
10407
|
var r = [];
|
|
10383
10408
|
var s = this.slots_children();
|
|
@@ -10387,7 +10412,7 @@ var script$8 = {
|
|
|
10387
10412
|
return n.props.value == v;
|
|
10388
10413
|
});
|
|
10389
10414
|
if (i > -1) r.push(i);
|
|
10390
|
-
if (!
|
|
10415
|
+
if (!_this68.x.multiple) return false;
|
|
10391
10416
|
});
|
|
10392
10417
|
return r.sort().map(function (v) {
|
|
10393
10418
|
return s[v].props.text;
|
|
@@ -10508,24 +10533,24 @@ var script$5 = {
|
|
|
10508
10533
|
},
|
|
10509
10534
|
computed: {
|
|
10510
10535
|
validHooks: function validHooks() {
|
|
10511
|
-
var
|
|
10536
|
+
var _this69 = this;
|
|
10512
10537
|
|
|
10513
10538
|
return {
|
|
10514
10539
|
valid: function valid() {
|
|
10515
|
-
var f =
|
|
10540
|
+
var f = _this69.forms();
|
|
10516
10541
|
|
|
10517
10542
|
if (f.length > 1) {
|
|
10518
10543
|
var v1 = f[0] && f[0].formVal();
|
|
10519
10544
|
var v2 = f[1] && f[1].formVal();
|
|
10520
10545
|
|
|
10521
|
-
var _c5 =
|
|
10546
|
+
var _c5 = _this69.x.compare || '<=';
|
|
10522
10547
|
|
|
10523
10548
|
if (v1 && v2) {
|
|
10524
10549
|
if (!$$1.eval("v1 ".concat(_c5, " v2"), {
|
|
10525
10550
|
v1: v1,
|
|
10526
10551
|
v2: v2
|
|
10527
10552
|
})) {
|
|
10528
|
-
return
|
|
10553
|
+
return _this69.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
|
|
10529
10554
|
}
|
|
10530
10555
|
}
|
|
10531
10556
|
}
|
|
@@ -10533,11 +10558,11 @@ var script$5 = {
|
|
|
10533
10558
|
};
|
|
10534
10559
|
},
|
|
10535
10560
|
html_on: function html_on() {
|
|
10536
|
-
var
|
|
10561
|
+
var _this70 = this;
|
|
10537
10562
|
|
|
10538
10563
|
return {
|
|
10539
10564
|
onclick: function onclick(e) {
|
|
10540
|
-
return
|
|
10565
|
+
return _this70.warnClass = '';
|
|
10541
10566
|
}
|
|
10542
10567
|
};
|
|
10543
10568
|
}
|
|
@@ -10592,7 +10617,7 @@ var script$4 = {
|
|
|
10592
10617
|
this.warn(false);
|
|
10593
10618
|
},
|
|
10594
10619
|
oninput: function oninput(e) {
|
|
10595
|
-
var
|
|
10620
|
+
var _this71 = this;
|
|
10596
10621
|
|
|
10597
10622
|
var v = e.target.value;
|
|
10598
10623
|
this.sensor_text = v;
|
|
@@ -10602,9 +10627,9 @@ var script$4 = {
|
|
|
10602
10627
|
this.suggest(false);
|
|
10603
10628
|
} else {
|
|
10604
10629
|
this.sug_timer = setTimeout(function () {
|
|
10605
|
-
|
|
10630
|
+
_this71.suggest(true);
|
|
10606
10631
|
|
|
10607
|
-
|
|
10632
|
+
_this71.trigger(e, v);
|
|
10608
10633
|
}, 500);
|
|
10609
10634
|
}
|
|
10610
10635
|
},
|
|
@@ -10651,7 +10676,7 @@ var script$4 = {
|
|
|
10651
10676
|
return this.input_title;
|
|
10652
10677
|
},
|
|
10653
10678
|
html_options: function html_options() {
|
|
10654
|
-
var
|
|
10679
|
+
var _this72 = this;
|
|
10655
10680
|
|
|
10656
10681
|
var m = this.x.modelValue;
|
|
10657
10682
|
|
|
@@ -10662,22 +10687,22 @@ var script$4 = {
|
|
|
10662
10687
|
'z-forbid': v.forbid
|
|
10663
10688
|
}],
|
|
10664
10689
|
onclick: function onclick(e) {
|
|
10665
|
-
return
|
|
10690
|
+
return _this72.clickItem(e, v);
|
|
10666
10691
|
}
|
|
10667
10692
|
}, [h$1('div', {
|
|
10668
10693
|
class: 'w-combobox-option-text f-line-1',
|
|
10669
10694
|
title: v.text
|
|
10670
|
-
}, v.text),
|
|
10695
|
+
}, v.text), _this72.isNormal && h$1('div', {
|
|
10671
10696
|
class: 'w-combobox-option-close f-i f-i-close',
|
|
10672
10697
|
onclick: function onclick(e) {
|
|
10673
|
-
return
|
|
10698
|
+
return _this72.clickClose(e, v);
|
|
10674
10699
|
}
|
|
10675
10700
|
})]);
|
|
10676
10701
|
});
|
|
10677
10702
|
}
|
|
10678
10703
|
},
|
|
10679
10704
|
html_var: function html_var() {
|
|
10680
|
-
var
|
|
10705
|
+
var _this73 = this;
|
|
10681
10706
|
|
|
10682
10707
|
return h$1('div', {
|
|
10683
10708
|
class: 'w-combobox-input-wrap'
|
|
@@ -10694,15 +10719,15 @@ var script$4 = {
|
|
|
10694
10719
|
onkeydown: this.onkeydown,
|
|
10695
10720
|
placeholder: this.input_value ? null : this.input_placeholder,
|
|
10696
10721
|
onfocus: function onfocus(e) {
|
|
10697
|
-
|
|
10722
|
+
_this73.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
|
|
10698
10723
|
},
|
|
10699
10724
|
onblur: function onblur(e) {
|
|
10700
|
-
return
|
|
10725
|
+
return _this73.isFocus = false;
|
|
10701
10726
|
}
|
|
10702
10727
|
})]);
|
|
10703
10728
|
},
|
|
10704
10729
|
html_input: function html_input() {
|
|
10705
|
-
var
|
|
10730
|
+
var _this74 = this;
|
|
10706
10731
|
|
|
10707
10732
|
return [this.html_input_hidden(), h$1('div', {
|
|
10708
10733
|
class: 'w-combobox-list f-flex-1 f-flex f-oh f-height'
|
|
@@ -10715,14 +10740,14 @@ var script$4 = {
|
|
|
10715
10740
|
autoHide: true,
|
|
10716
10741
|
snap: {
|
|
10717
10742
|
target: function target() {
|
|
10718
|
-
return
|
|
10743
|
+
return _this74.el('main');
|
|
10719
10744
|
},
|
|
10720
10745
|
position: 'v',
|
|
10721
10746
|
indent: 1
|
|
10722
10747
|
},
|
|
10723
10748
|
on: {
|
|
10724
10749
|
close: function close() {
|
|
10725
|
-
return
|
|
10750
|
+
return _this74.showSuggest = false;
|
|
10726
10751
|
}
|
|
10727
10752
|
}
|
|
10728
10753
|
}, this.$slots))];
|
|
@@ -10750,6 +10775,15 @@ var script$4 = {
|
|
|
10750
10775
|
}
|
|
10751
10776
|
},
|
|
10752
10777
|
computed: {
|
|
10778
|
+
validHooks: function validHooks() {
|
|
10779
|
+
var _this75 = this;
|
|
10780
|
+
|
|
10781
|
+
return {
|
|
10782
|
+
valid: function valid(v) {
|
|
10783
|
+
if (_this75.$refs.input.value) return _this75.formErr('invalid_option');
|
|
10784
|
+
}
|
|
10785
|
+
};
|
|
10786
|
+
},
|
|
10753
10787
|
input_value: function input_value() {
|
|
10754
10788
|
return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(function (v) {
|
|
10755
10789
|
return v.value;
|
|
@@ -10772,12 +10806,12 @@ var script$4 = {
|
|
|
10772
10806
|
}
|
|
10773
10807
|
},
|
|
10774
10808
|
mounted: function mounted() {
|
|
10775
|
-
var
|
|
10809
|
+
var _this76 = this;
|
|
10776
10810
|
|
|
10777
10811
|
if (this.isEntity && this.$refs.sensor) {
|
|
10778
10812
|
new ResizeObserver(function () {
|
|
10779
|
-
if (
|
|
10780
|
-
|
|
10813
|
+
if (_this76.$refs.sensor) {
|
|
10814
|
+
_this76.sensor_width = _this76.$refs.sensor.offsetWidth + 'px';
|
|
10781
10815
|
}
|
|
10782
10816
|
}).observe(this.$refs.sensor);
|
|
10783
10817
|
}
|
|
@@ -10790,13 +10824,13 @@ var script$3 = {
|
|
|
10790
10824
|
emits: ['input', 'dblclick:item'],
|
|
10791
10825
|
props: ['multiple', 'picker', 'dropWidth', 'separator', 'strict', 'br'],
|
|
10792
10826
|
created: function created() {
|
|
10793
|
-
var
|
|
10827
|
+
var _this77 = this;
|
|
10794
10828
|
|
|
10795
10829
|
this.$watch(function () {
|
|
10796
|
-
return
|
|
10830
|
+
return _this77.x.modelValue;
|
|
10797
10831
|
}, function (v) {
|
|
10798
|
-
if (
|
|
10799
|
-
|
|
10832
|
+
if (_this77.isEntity && !_this77.isFocus) {
|
|
10833
|
+
_this77.initOptions(v);
|
|
10800
10834
|
}
|
|
10801
10835
|
});
|
|
10802
10836
|
},
|
|
@@ -10880,7 +10914,7 @@ var script$3 = {
|
|
|
10880
10914
|
this.warn(false);
|
|
10881
10915
|
},
|
|
10882
10916
|
input: function input(a) {
|
|
10883
|
-
var
|
|
10917
|
+
var _this78 = this;
|
|
10884
10918
|
|
|
10885
10919
|
this.currOpt = a;
|
|
10886
10920
|
var v = a.innerText.replace(/^[\s,]+|[\s,]+$/g, '');
|
|
@@ -10890,9 +10924,9 @@ var script$3 = {
|
|
|
10890
10924
|
this.suggest(false);
|
|
10891
10925
|
} else {
|
|
10892
10926
|
this.sug_timer = setTimeout(function () {
|
|
10893
|
-
|
|
10927
|
+
_this78.suggest(true);
|
|
10894
10928
|
|
|
10895
|
-
|
|
10929
|
+
_this78.trigger(new Event('input'), v);
|
|
10896
10930
|
}, 500);
|
|
10897
10931
|
}
|
|
10898
10932
|
},
|
|
@@ -10908,7 +10942,7 @@ var script$3 = {
|
|
|
10908
10942
|
return this.$refs.inp;
|
|
10909
10943
|
},
|
|
10910
10944
|
fixStyle: function fixStyle() {
|
|
10911
|
-
var
|
|
10945
|
+
var _this79 = this;
|
|
10912
10946
|
|
|
10913
10947
|
var c = $$1.rngElement();
|
|
10914
10948
|
var g = false;
|
|
@@ -10983,7 +11017,7 @@ var script$3 = {
|
|
|
10983
11017
|
|
|
10984
11018
|
t.split(p).forEach(function (s) {
|
|
10985
11019
|
if (_h4 = $$1.strTrim(s)) {
|
|
10986
|
-
g =
|
|
11020
|
+
g = _this79.param(_h4);
|
|
10987
11021
|
|
|
10988
11022
|
_d.push('<u' + (g ? ' class=_o data-value="' + g.value + '"' + (g.forbid ? ' data-forbid' : '') : '') + '>' + _h4 + '</u>');
|
|
10989
11023
|
|
|
@@ -11049,11 +11083,11 @@ var script$3 = {
|
|
|
11049
11083
|
if (typeof c === 'function') c(this);else this.cmd(c, this.formVal());
|
|
11050
11084
|
},
|
|
11051
11085
|
addStore: function addStore(m) {
|
|
11052
|
-
var
|
|
11086
|
+
var _this80 = this;
|
|
11053
11087
|
|
|
11054
11088
|
if (m && typeof m !== 'string') {
|
|
11055
11089
|
var _r6 = $$1.array(m).filter(function (v) {
|
|
11056
|
-
return !
|
|
11090
|
+
return !_this80.store.find(function (s) {
|
|
11057
11091
|
return s.value == v.value;
|
|
11058
11092
|
});
|
|
11059
11093
|
});
|
|
@@ -11133,7 +11167,7 @@ var script$3 = {
|
|
|
11133
11167
|
return this.input_title;
|
|
11134
11168
|
},
|
|
11135
11169
|
html_options: function html_options(v) {
|
|
11136
|
-
var
|
|
11170
|
+
var _this81 = this;
|
|
11137
11171
|
|
|
11138
11172
|
var p = this.x.separator || ',';
|
|
11139
11173
|
if (v == null) v = this.x.modelValue;
|
|
@@ -11144,7 +11178,7 @@ var script$3 = {
|
|
|
11144
11178
|
$$1.lodash.each(b, function (o, i) {
|
|
11145
11179
|
_r7.push('<u' + (o.value ? ' class=_o data-value="' + o.value + '"' : '') + (o.forbid ? ' data-forbid' : '') + '>' + o.text + '</u>');
|
|
11146
11180
|
|
|
11147
|
-
if (!
|
|
11181
|
+
if (!_this81.x.multiple) return false;
|
|
11148
11182
|
|
|
11149
11183
|
_r7.push('<i>' + p + '</i>');
|
|
11150
11184
|
});
|
|
@@ -11152,7 +11186,7 @@ var script$3 = {
|
|
|
11152
11186
|
}
|
|
11153
11187
|
},
|
|
11154
11188
|
html_var: function html_var() {
|
|
11155
|
-
var
|
|
11189
|
+
var _this82 = this;
|
|
11156
11190
|
|
|
11157
11191
|
return h$1('div', {
|
|
11158
11192
|
class: 'w-linkbox-input f-flex-1',
|
|
@@ -11163,15 +11197,15 @@ var script$3 = {
|
|
|
11163
11197
|
onclick: this.onclick,
|
|
11164
11198
|
ondblclick: this.ondblclick,
|
|
11165
11199
|
onfocus: function onfocus(e) {
|
|
11166
|
-
|
|
11200
|
+
_this82.isFocus = true;
|
|
11167
11201
|
},
|
|
11168
11202
|
onblur: function onblur(e) {
|
|
11169
|
-
|
|
11203
|
+
_this82.isFocus = false;
|
|
11170
11204
|
}
|
|
11171
11205
|
});
|
|
11172
11206
|
},
|
|
11173
11207
|
html_input: function html_input() {
|
|
11174
|
-
var
|
|
11208
|
+
var _this83 = this;
|
|
11175
11209
|
|
|
11176
11210
|
var p = this.input_placeholder;
|
|
11177
11211
|
return [this.html_input_hidden(), this.html_var(), h$1('div', {
|
|
@@ -11185,14 +11219,14 @@ var script$3 = {
|
|
|
11185
11219
|
autoHide: true,
|
|
11186
11220
|
snap: {
|
|
11187
11221
|
target: function target() {
|
|
11188
|
-
return
|
|
11222
|
+
return _this83.el('main');
|
|
11189
11223
|
},
|
|
11190
11224
|
position: 'v',
|
|
11191
11225
|
indent: 1
|
|
11192
11226
|
},
|
|
11193
11227
|
on: {
|
|
11194
11228
|
close: function close() {
|
|
11195
|
-
return
|
|
11229
|
+
return _this83.showSuggest = false;
|
|
11196
11230
|
}
|
|
11197
11231
|
}
|
|
11198
11232
|
}, this.$slots)];
|
|
@@ -11221,12 +11255,12 @@ var script$3 = {
|
|
|
11221
11255
|
},
|
|
11222
11256
|
computed: {
|
|
11223
11257
|
validHooks: function validHooks() {
|
|
11224
|
-
var
|
|
11258
|
+
var _this84 = this;
|
|
11225
11259
|
|
|
11226
11260
|
return {
|
|
11227
11261
|
valid: function valid(v) {
|
|
11228
|
-
if (
|
|
11229
|
-
return
|
|
11262
|
+
if (_this84.x.strict && $$1.q('u:not([data-value])').length > 0) {
|
|
11263
|
+
return _this84.formErr('invalid_option');
|
|
11230
11264
|
}
|
|
11231
11265
|
}
|
|
11232
11266
|
};
|
|
@@ -11254,15 +11288,15 @@ var script$3 = {
|
|
|
11254
11288
|
}
|
|
11255
11289
|
},
|
|
11256
11290
|
mounted: function mounted() {
|
|
11257
|
-
var
|
|
11291
|
+
var _this85 = this;
|
|
11258
11292
|
|
|
11259
11293
|
if (this.isEntity) {
|
|
11260
11294
|
this.initOptions();
|
|
11261
11295
|
this.inp().addEventListener('compositionstart', function () {
|
|
11262
|
-
|
|
11296
|
+
_this85.imeMode = true;
|
|
11263
11297
|
});
|
|
11264
11298
|
this.inp().addEventListener('compositionend', function () {
|
|
11265
|
-
|
|
11299
|
+
_this85.imeMode = false;
|
|
11266
11300
|
});
|
|
11267
11301
|
}
|
|
11268
11302
|
}
|
|
@@ -11378,7 +11412,7 @@ var script$1 = {
|
|
|
11378
11412
|
this.setThumbLeft();
|
|
11379
11413
|
},
|
|
11380
11414
|
error: function error(text, timeout, fn) {
|
|
11381
|
-
var
|
|
11415
|
+
var _this86 = this;
|
|
11382
11416
|
|
|
11383
11417
|
if (!text) text = '';
|
|
11384
11418
|
this.isError = true;
|
|
@@ -11390,12 +11424,12 @@ var script$1 = {
|
|
|
11390
11424
|
this.text = text + "(".concat(timeout / 1000, ")");
|
|
11391
11425
|
var timer = setInterval(function () {
|
|
11392
11426
|
timeout -= 1000;
|
|
11393
|
-
|
|
11427
|
+
_this86.text = text + "(".concat(timeout / 1000, ")");
|
|
11394
11428
|
|
|
11395
11429
|
if (timeout <= 0) {
|
|
11396
11430
|
clearInterval(timer);
|
|
11397
11431
|
|
|
11398
|
-
|
|
11432
|
+
_this86.reset();
|
|
11399
11433
|
|
|
11400
11434
|
fn && fn();
|
|
11401
11435
|
}
|
|
@@ -11431,7 +11465,7 @@ var script$1 = {
|
|
|
11431
11465
|
$$1.close(this.dropper);
|
|
11432
11466
|
},
|
|
11433
11467
|
dragstart: function dragstart(e) {
|
|
11434
|
-
var
|
|
11468
|
+
var _this87 = this;
|
|
11435
11469
|
|
|
11436
11470
|
if (!this.isNormal || this.locked) return;
|
|
11437
11471
|
this.warn(false);
|
|
@@ -11446,16 +11480,16 @@ var script$1 = {
|
|
|
11446
11480
|
var c = $$1.eventX(e);
|
|
11447
11481
|
var l = $$1.numRange(f + c - x, 0, w - g);
|
|
11448
11482
|
a.style.left = l + 'px';
|
|
11449
|
-
|
|
11450
|
-
|
|
11483
|
+
_this87.$refs.track.style.width = l + g + 'px';
|
|
11484
|
+
_this87.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
|
|
11451
11485
|
|
|
11452
|
-
|
|
11486
|
+
_this87.el().classList.add('z-drag');
|
|
11453
11487
|
}, function (e) {
|
|
11454
11488
|
a.dispatchEvent(new Event('drop'));
|
|
11455
11489
|
}, e);
|
|
11456
11490
|
},
|
|
11457
11491
|
mouseenter: function mouseenter(e) {
|
|
11458
|
-
var
|
|
11492
|
+
var _this88 = this;
|
|
11459
11493
|
|
|
11460
11494
|
if (this.dropper || !this.x.big || this.isSuccess || this.locked) return;
|
|
11461
11495
|
this.warn(false);
|
|
@@ -11473,13 +11507,13 @@ var script$1 = {
|
|
|
11473
11507
|
context: this,
|
|
11474
11508
|
snap: {
|
|
11475
11509
|
target: function target() {
|
|
11476
|
-
return
|
|
11510
|
+
return _this88.el('main');
|
|
11477
11511
|
},
|
|
11478
11512
|
position: 'v'
|
|
11479
11513
|
},
|
|
11480
11514
|
on: {
|
|
11481
11515
|
close: function close() {
|
|
11482
|
-
return
|
|
11516
|
+
return _this88.dropper = null;
|
|
11483
11517
|
}
|
|
11484
11518
|
}
|
|
11485
11519
|
});
|
|
@@ -11522,12 +11556,12 @@ var script$1 = {
|
|
|
11522
11556
|
},
|
|
11523
11557
|
computed: {
|
|
11524
11558
|
validHooks: function validHooks() {
|
|
11525
|
-
var
|
|
11559
|
+
var _this89 = this;
|
|
11526
11560
|
|
|
11527
11561
|
return {
|
|
11528
11562
|
valid: function valid(v) {
|
|
11529
|
-
if (!
|
|
11530
|
-
return
|
|
11563
|
+
if (!_this89.isSuccess) {
|
|
11564
|
+
return _this89.formErr('jigsaw_required');
|
|
11531
11565
|
}
|
|
11532
11566
|
}
|
|
11533
11567
|
};
|
|
@@ -11586,18 +11620,19 @@ $$1.install = function (Vue) {
|
|
|
11586
11620
|
//注册组件
|
|
11587
11621
|
components.forEach(function (c) {
|
|
11588
11622
|
return Vue.component(c.name, c);
|
|
11589
|
-
}); //注册指令
|
|
11623
|
+
}); // //注册指令
|
|
11590
11624
|
|
|
11591
|
-
Vue.directive('dfish', {
|
|
11592
|
-
created: function created(el, binding) {
|
|
11593
|
-
var a = binding.arg;
|
|
11594
|
-
$$1.directiveHooks[a] && $$1.directiveHooks[a](el, binding.value);
|
|
11595
|
-
}
|
|
11596
|
-
});
|
|
11597
11625
|
directives.forEach(function (v) {
|
|
11598
11626
|
Vue.directive(v, {
|
|
11599
|
-
created: function created(el, binding) {
|
|
11600
|
-
|
|
11627
|
+
created: function created(el, binding, vnode) {
|
|
11628
|
+
if ($$1.directiveHooks[v]) {
|
|
11629
|
+
if (!vnode.key) {
|
|
11630
|
+
// v-for循环内,如果vnode没有key,节点不会重新渲染,导致指令也不更新
|
|
11631
|
+
vnode.key = vnode.props && vnode.props['w-key'] || $$1.uid();
|
|
11632
|
+
}
|
|
11633
|
+
|
|
11634
|
+
$$1.directiveHooks[v](el, binding.value, vnode);
|
|
11635
|
+
}
|
|
11601
11636
|
}
|
|
11602
11637
|
});
|
|
11603
11638
|
});
|