dfish-widget 0.1.359 → 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 +154 -117
- 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}个)',
|
|
@@ -9661,6 +9661,34 @@ var script$f = {
|
|
|
9661
9661
|
}
|
|
9662
9662
|
},
|
|
9663
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
|
+
},
|
|
9664
9692
|
input_value: function input_value() {
|
|
9665
9693
|
var v = this.val();
|
|
9666
9694
|
return v.length == 0 ? '' : JSON.stringify(v);
|
|
@@ -9679,11 +9707,11 @@ var script$f = {
|
|
|
9679
9707
|
};
|
|
9680
9708
|
},
|
|
9681
9709
|
html_on: function html_on() {
|
|
9682
|
-
var
|
|
9710
|
+
var _this58 = this;
|
|
9683
9711
|
|
|
9684
9712
|
return {
|
|
9685
9713
|
onclick: function onclick() {
|
|
9686
|
-
return
|
|
9714
|
+
return _this58.warn(false);
|
|
9687
9715
|
}
|
|
9688
9716
|
};
|
|
9689
9717
|
}
|
|
@@ -9703,30 +9731,30 @@ var script$e = {
|
|
|
9703
9731
|
this.provideUpload.clickItem(e, this.item);
|
|
9704
9732
|
},
|
|
9705
9733
|
createImageThumbnail: function createImageThumbnail() {
|
|
9706
|
-
var
|
|
9734
|
+
var _this59 = this;
|
|
9707
9735
|
|
|
9708
9736
|
var r = new FileReader();
|
|
9709
9737
|
|
|
9710
9738
|
r.onload = function (e) {
|
|
9711
|
-
if (
|
|
9712
|
-
|
|
9739
|
+
if (_this59.item.loaded) return;
|
|
9740
|
+
_this59.dataURL = e.target.result;
|
|
9713
9741
|
};
|
|
9714
9742
|
|
|
9715
9743
|
r.readAsDataURL(this.item.file);
|
|
9716
9744
|
},
|
|
9717
9745
|
createVideoThumbnail: function createVideoThumbnail() {
|
|
9718
|
-
var
|
|
9746
|
+
var _this60 = this;
|
|
9719
9747
|
|
|
9720
9748
|
var video = document.createElement('video');
|
|
9721
9749
|
video.addEventListener('loadeddata', function () {
|
|
9722
9750
|
setTimeout(function () {
|
|
9723
|
-
if (
|
|
9751
|
+
if (_this60.item.loaded) return;
|
|
9724
9752
|
var cvs = document.createElement('canvas');
|
|
9725
9753
|
var ctx = cvs.getContext('2d');
|
|
9726
9754
|
cvs.width = video.videoWidth;
|
|
9727
9755
|
cvs.height = video.videoHeight;
|
|
9728
9756
|
ctx.drawImage(video, 0, 0);
|
|
9729
|
-
|
|
9757
|
+
_this60.dataURL = cvs.toDataURL('image/png');
|
|
9730
9758
|
video.pause();
|
|
9731
9759
|
$$1.q(video).remove();
|
|
9732
9760
|
}, 150);
|
|
@@ -9781,14 +9809,14 @@ var script$e = {
|
|
|
9781
9809
|
}
|
|
9782
9810
|
},
|
|
9783
9811
|
mounted: function mounted() {
|
|
9784
|
-
var
|
|
9812
|
+
var _this61 = this;
|
|
9785
9813
|
|
|
9786
9814
|
if (!this.item.loaded && this.item.file) {
|
|
9787
9815
|
this.upload.isVideo(this.item) ? this.createVideoThumbnail() : this.upload.isImage(this.item) ? this.createImageThumbnail() : null;
|
|
9788
9816
|
this.$watch(function () {
|
|
9789
|
-
return
|
|
9817
|
+
return _this61.item.progress;
|
|
9790
9818
|
}, function (v) {
|
|
9791
|
-
return
|
|
9819
|
+
return _this61.setProgress(v);
|
|
9792
9820
|
}, {
|
|
9793
9821
|
immediate: true
|
|
9794
9822
|
});
|
|
@@ -9885,7 +9913,7 @@ var script$d = {
|
|
|
9885
9913
|
});
|
|
9886
9914
|
},
|
|
9887
9915
|
html_input_button: function html_input_button() {
|
|
9888
|
-
var
|
|
9916
|
+
var _this62 = this;
|
|
9889
9917
|
|
|
9890
9918
|
return h$1(script$I, {
|
|
9891
9919
|
ref: 'uploadbbr',
|
|
@@ -9893,16 +9921,16 @@ var script$d = {
|
|
|
9893
9921
|
gap: 10
|
|
9894
9922
|
}, {
|
|
9895
9923
|
default: function _default() {
|
|
9896
|
-
return [
|
|
9924
|
+
return [_this62.$slots.button ? _this62.$slots.button() : h$1(script$$, {
|
|
9897
9925
|
ref: 'uploadbutton',
|
|
9898
9926
|
title: $$1.loc.form.choose_image,
|
|
9899
9927
|
icon: '.f-i .f-i-plus',
|
|
9900
9928
|
class: 'w-mediaupload-button',
|
|
9901
9929
|
style: {
|
|
9902
|
-
width: $$1.unitSize(
|
|
9903
|
-
height: $$1.unitSize(
|
|
9930
|
+
width: $$1.unitSize(_this62.x.thumbnailWidth),
|
|
9931
|
+
height: $$1.unitSize(_this62.x.thumbnailHeight)
|
|
9904
9932
|
},
|
|
9905
|
-
onclick:
|
|
9933
|
+
onclick: _this62.chooseFile
|
|
9906
9934
|
})];
|
|
9907
9935
|
}
|
|
9908
9936
|
});
|
|
@@ -10084,7 +10112,7 @@ var script$a = {
|
|
|
10084
10112
|
return this.$refs.btns && this.$refs.btns.contains(el);
|
|
10085
10113
|
},
|
|
10086
10114
|
html_button: function html_button() {
|
|
10087
|
-
var
|
|
10115
|
+
var _this63 = this;
|
|
10088
10116
|
|
|
10089
10117
|
return h$1('div', {
|
|
10090
10118
|
class: 'w-spinner-step w-input-bbr f-flex-column f-oh',
|
|
@@ -10093,14 +10121,14 @@ var script$a = {
|
|
|
10093
10121
|
class: 'w-spinner-step-btn f-rel',
|
|
10094
10122
|
disabled: this.x.disabled,
|
|
10095
10123
|
onclick: function onclick(e) {
|
|
10096
|
-
return
|
|
10124
|
+
return _this63.stepBy(1);
|
|
10097
10125
|
},
|
|
10098
10126
|
innerHTML: '<i class="f-abs-center f-i f-i-caret-up"></i>'
|
|
10099
10127
|
}), h$1('button', {
|
|
10100
10128
|
class: 'w-spinner-step-btn f-rel',
|
|
10101
10129
|
disabled: this.x.disabled,
|
|
10102
10130
|
onclick: function onclick(e) {
|
|
10103
|
-
return
|
|
10131
|
+
return _this63.stepBy(-1);
|
|
10104
10132
|
},
|
|
10105
10133
|
innerHTML: '<i class="f-abs-center f-i f-i-caret-down"></i>'
|
|
10106
10134
|
})]);
|
|
@@ -10108,24 +10136,24 @@ var script$a = {
|
|
|
10108
10136
|
},
|
|
10109
10137
|
computed: {
|
|
10110
10138
|
validHooks: function validHooks() {
|
|
10111
|
-
var
|
|
10139
|
+
var _this64 = this;
|
|
10112
10140
|
|
|
10113
10141
|
return {
|
|
10114
10142
|
compare: function compare(v, c, d) {
|
|
10115
|
-
return !$$1.eval('v' + (
|
|
10143
|
+
return !$$1.eval('v' + (_this64.x.compare.mode || '==') + 'd', {
|
|
10116
10144
|
v: v,
|
|
10117
10145
|
d: d
|
|
10118
10146
|
});
|
|
10119
10147
|
},
|
|
10120
10148
|
valid: function valid(v) {
|
|
10121
|
-
|
|
10149
|
+
_this64.x.format && (v = v.replace(RegExp(_this64.x.format.separator || ',', 'g'), ''));
|
|
10122
10150
|
|
|
10123
10151
|
if (v) {
|
|
10124
|
-
if (isNaN(v) || /\s/.test(v)) return
|
|
10125
|
-
var d =
|
|
10126
|
-
if (!d && ~v.indexOf('.')) return
|
|
10127
|
-
if (d && d > 0 && $$1.strFrom(v, '.').length > d) return
|
|
10128
|
-
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();
|
|
10129
10157
|
}
|
|
10130
10158
|
}
|
|
10131
10159
|
};
|
|
@@ -10196,7 +10224,7 @@ var script$9 = {
|
|
|
10196
10224
|
};
|
|
10197
10225
|
},
|
|
10198
10226
|
html_button: function html_button() {
|
|
10199
|
-
var
|
|
10227
|
+
var _this65 = this;
|
|
10200
10228
|
|
|
10201
10229
|
var r = [];
|
|
10202
10230
|
if (!this.x.noButton) r.push(h$1('button', {
|
|
@@ -10213,28 +10241,28 @@ var script$9 = {
|
|
|
10213
10241
|
autoHide: true,
|
|
10214
10242
|
snap: {
|
|
10215
10243
|
target: function target() {
|
|
10216
|
-
return
|
|
10244
|
+
return _this65.snapElem();
|
|
10217
10245
|
},
|
|
10218
10246
|
position: 'v',
|
|
10219
10247
|
indent: 1
|
|
10220
10248
|
},
|
|
10221
10249
|
on: {
|
|
10222
10250
|
close: function close() {
|
|
10223
|
-
|
|
10251
|
+
_this65.showDrop = false, _this65.currentDate = null;
|
|
10224
10252
|
}
|
|
10225
10253
|
}
|
|
10226
10254
|
}, {
|
|
10227
10255
|
default: function _default() {
|
|
10228
10256
|
return h$1(script$q, _objectSpread(_objectSpread({
|
|
10229
10257
|
pad: true,
|
|
10230
|
-
current:
|
|
10231
|
-
value:
|
|
10232
|
-
format:
|
|
10233
|
-
},
|
|
10234
|
-
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,
|
|
10235
10263
|
on: {
|
|
10236
10264
|
'click:item': function clickItem(e, item) {
|
|
10237
|
-
return
|
|
10265
|
+
return _this65.currentDate = item.value;
|
|
10238
10266
|
}
|
|
10239
10267
|
}
|
|
10240
10268
|
}));
|
|
@@ -10247,46 +10275,46 @@ var script$9 = {
|
|
|
10247
10275
|
},
|
|
10248
10276
|
computed: {
|
|
10249
10277
|
validHooks: function validHooks() {
|
|
10250
|
-
var
|
|
10278
|
+
var _this66 = this;
|
|
10251
10279
|
|
|
10252
10280
|
return {
|
|
10253
10281
|
minValue: function minValue(v) {
|
|
10254
|
-
return $$1.dateParse(v,
|
|
10282
|
+
return $$1.dateParse(v, _this66.x.format) < $$1.dateParse(_this66.vv('minValue'), _this66.x.format);
|
|
10255
10283
|
},
|
|
10256
10284
|
maxValue: function maxValue(v) {
|
|
10257
|
-
return $$1.dateParse(v,
|
|
10285
|
+
return $$1.dateParse(v, _this66.x.format) > $$1.dateParse(_this66.vv('maxValue'), _this66.x.format);
|
|
10258
10286
|
},
|
|
10259
10287
|
compare: function compare(v, c, d) {
|
|
10260
|
-
if (
|
|
10261
|
-
var f = (
|
|
10262
|
-
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);
|
|
10263
10291
|
d = $$1.dateFormat($$1.dateParse(d, c.x.format), f);
|
|
10264
10292
|
}
|
|
10265
10293
|
|
|
10266
|
-
return !$$1.eval('v' + (
|
|
10294
|
+
return !$$1.eval('v' + (_this66.x.compare.mode || '==') + 'd', {
|
|
10267
10295
|
v: v,
|
|
10268
10296
|
d: d
|
|
10269
10297
|
});
|
|
10270
10298
|
},
|
|
10271
10299
|
valid: function valid(v) {
|
|
10272
|
-
if (
|
|
10300
|
+
if (_this66.x.multiple) return;
|
|
10273
10301
|
|
|
10274
10302
|
if (v) {
|
|
10275
10303
|
var _c4 = v;
|
|
10276
|
-
var d = $$1.dateParse(_c4,
|
|
10304
|
+
var d = $$1.dateParse(_c4, _this66.x.format);
|
|
10277
10305
|
var y = d.getFullYear();
|
|
10278
10306
|
var m = 9999;
|
|
10279
10307
|
var n = 1000;
|
|
10280
|
-
if (y > m || y < n) return
|
|
10308
|
+
if (y > m || y < n) return _this66.formErr('time_exceed', [n, m]);
|
|
10281
10309
|
|
|
10282
|
-
if (_c4 != $$1.dateFormat(d,
|
|
10283
|
-
return
|
|
10310
|
+
if (_c4 != $$1.dateFormat(d, _this66.x.format)) {
|
|
10311
|
+
return _this66.formErr('time_format', [$$1.dateFormat(d, _this66.x.format)]);
|
|
10284
10312
|
}
|
|
10285
10313
|
}
|
|
10286
10314
|
|
|
10287
|
-
if (
|
|
10288
|
-
if (
|
|
10289
|
-
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();
|
|
10290
10318
|
}
|
|
10291
10319
|
};
|
|
10292
10320
|
},
|
|
@@ -10334,7 +10362,7 @@ var script$8 = {
|
|
|
10334
10362
|
return this.input_text;
|
|
10335
10363
|
},
|
|
10336
10364
|
html_input: function html_input() {
|
|
10337
|
-
var
|
|
10365
|
+
var _this67 = this;
|
|
10338
10366
|
|
|
10339
10367
|
var t = this.input_text;
|
|
10340
10368
|
var p = this.input_placeholder;
|
|
@@ -10353,14 +10381,14 @@ var script$8 = {
|
|
|
10353
10381
|
autoHide: true,
|
|
10354
10382
|
snap: {
|
|
10355
10383
|
target: function target() {
|
|
10356
|
-
return
|
|
10384
|
+
return _this67.el('main');
|
|
10357
10385
|
},
|
|
10358
10386
|
position: 'v',
|
|
10359
10387
|
indent: 1
|
|
10360
10388
|
},
|
|
10361
10389
|
on: {
|
|
10362
10390
|
close: function close() {
|
|
10363
|
-
return
|
|
10391
|
+
return _this67.showDrop = false;
|
|
10364
10392
|
}
|
|
10365
10393
|
}
|
|
10366
10394
|
}, this.$slots)];
|
|
@@ -10374,7 +10402,7 @@ var script$8 = {
|
|
|
10374
10402
|
},
|
|
10375
10403
|
computed: {
|
|
10376
10404
|
input_text: function input_text() {
|
|
10377
|
-
var
|
|
10405
|
+
var _this68 = this;
|
|
10378
10406
|
|
|
10379
10407
|
var r = [];
|
|
10380
10408
|
var s = this.slots_children();
|
|
@@ -10384,7 +10412,7 @@ var script$8 = {
|
|
|
10384
10412
|
return n.props.value == v;
|
|
10385
10413
|
});
|
|
10386
10414
|
if (i > -1) r.push(i);
|
|
10387
|
-
if (!
|
|
10415
|
+
if (!_this68.x.multiple) return false;
|
|
10388
10416
|
});
|
|
10389
10417
|
return r.sort().map(function (v) {
|
|
10390
10418
|
return s[v].props.text;
|
|
@@ -10505,24 +10533,24 @@ var script$5 = {
|
|
|
10505
10533
|
},
|
|
10506
10534
|
computed: {
|
|
10507
10535
|
validHooks: function validHooks() {
|
|
10508
|
-
var
|
|
10536
|
+
var _this69 = this;
|
|
10509
10537
|
|
|
10510
10538
|
return {
|
|
10511
10539
|
valid: function valid() {
|
|
10512
|
-
var f =
|
|
10540
|
+
var f = _this69.forms();
|
|
10513
10541
|
|
|
10514
10542
|
if (f.length > 1) {
|
|
10515
10543
|
var v1 = f[0] && f[0].formVal();
|
|
10516
10544
|
var v2 = f[1] && f[1].formVal();
|
|
10517
10545
|
|
|
10518
|
-
var _c5 =
|
|
10546
|
+
var _c5 = _this69.x.compare || '<=';
|
|
10519
10547
|
|
|
10520
10548
|
if (v1 && v2) {
|
|
10521
10549
|
if (!$$1.eval("v1 ".concat(_c5, " v2"), {
|
|
10522
10550
|
v1: v1,
|
|
10523
10551
|
v2: v2
|
|
10524
10552
|
})) {
|
|
10525
|
-
return
|
|
10553
|
+
return _this69.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
|
|
10526
10554
|
}
|
|
10527
10555
|
}
|
|
10528
10556
|
}
|
|
@@ -10530,11 +10558,11 @@ var script$5 = {
|
|
|
10530
10558
|
};
|
|
10531
10559
|
},
|
|
10532
10560
|
html_on: function html_on() {
|
|
10533
|
-
var
|
|
10561
|
+
var _this70 = this;
|
|
10534
10562
|
|
|
10535
10563
|
return {
|
|
10536
10564
|
onclick: function onclick(e) {
|
|
10537
|
-
return
|
|
10565
|
+
return _this70.warnClass = '';
|
|
10538
10566
|
}
|
|
10539
10567
|
};
|
|
10540
10568
|
}
|
|
@@ -10589,7 +10617,7 @@ var script$4 = {
|
|
|
10589
10617
|
this.warn(false);
|
|
10590
10618
|
},
|
|
10591
10619
|
oninput: function oninput(e) {
|
|
10592
|
-
var
|
|
10620
|
+
var _this71 = this;
|
|
10593
10621
|
|
|
10594
10622
|
var v = e.target.value;
|
|
10595
10623
|
this.sensor_text = v;
|
|
@@ -10599,9 +10627,9 @@ var script$4 = {
|
|
|
10599
10627
|
this.suggest(false);
|
|
10600
10628
|
} else {
|
|
10601
10629
|
this.sug_timer = setTimeout(function () {
|
|
10602
|
-
|
|
10630
|
+
_this71.suggest(true);
|
|
10603
10631
|
|
|
10604
|
-
|
|
10632
|
+
_this71.trigger(e, v);
|
|
10605
10633
|
}, 500);
|
|
10606
10634
|
}
|
|
10607
10635
|
},
|
|
@@ -10648,7 +10676,7 @@ var script$4 = {
|
|
|
10648
10676
|
return this.input_title;
|
|
10649
10677
|
},
|
|
10650
10678
|
html_options: function html_options() {
|
|
10651
|
-
var
|
|
10679
|
+
var _this72 = this;
|
|
10652
10680
|
|
|
10653
10681
|
var m = this.x.modelValue;
|
|
10654
10682
|
|
|
@@ -10659,22 +10687,22 @@ var script$4 = {
|
|
|
10659
10687
|
'z-forbid': v.forbid
|
|
10660
10688
|
}],
|
|
10661
10689
|
onclick: function onclick(e) {
|
|
10662
|
-
return
|
|
10690
|
+
return _this72.clickItem(e, v);
|
|
10663
10691
|
}
|
|
10664
10692
|
}, [h$1('div', {
|
|
10665
10693
|
class: 'w-combobox-option-text f-line-1',
|
|
10666
10694
|
title: v.text
|
|
10667
|
-
}, v.text),
|
|
10695
|
+
}, v.text), _this72.isNormal && h$1('div', {
|
|
10668
10696
|
class: 'w-combobox-option-close f-i f-i-close',
|
|
10669
10697
|
onclick: function onclick(e) {
|
|
10670
|
-
return
|
|
10698
|
+
return _this72.clickClose(e, v);
|
|
10671
10699
|
}
|
|
10672
10700
|
})]);
|
|
10673
10701
|
});
|
|
10674
10702
|
}
|
|
10675
10703
|
},
|
|
10676
10704
|
html_var: function html_var() {
|
|
10677
|
-
var
|
|
10705
|
+
var _this73 = this;
|
|
10678
10706
|
|
|
10679
10707
|
return h$1('div', {
|
|
10680
10708
|
class: 'w-combobox-input-wrap'
|
|
@@ -10691,15 +10719,15 @@ var script$4 = {
|
|
|
10691
10719
|
onkeydown: this.onkeydown,
|
|
10692
10720
|
placeholder: this.input_value ? null : this.input_placeholder,
|
|
10693
10721
|
onfocus: function onfocus(e) {
|
|
10694
|
-
|
|
10722
|
+
_this73.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
|
|
10695
10723
|
},
|
|
10696
10724
|
onblur: function onblur(e) {
|
|
10697
|
-
return
|
|
10725
|
+
return _this73.isFocus = false;
|
|
10698
10726
|
}
|
|
10699
10727
|
})]);
|
|
10700
10728
|
},
|
|
10701
10729
|
html_input: function html_input() {
|
|
10702
|
-
var
|
|
10730
|
+
var _this74 = this;
|
|
10703
10731
|
|
|
10704
10732
|
return [this.html_input_hidden(), h$1('div', {
|
|
10705
10733
|
class: 'w-combobox-list f-flex-1 f-flex f-oh f-height'
|
|
@@ -10712,14 +10740,14 @@ var script$4 = {
|
|
|
10712
10740
|
autoHide: true,
|
|
10713
10741
|
snap: {
|
|
10714
10742
|
target: function target() {
|
|
10715
|
-
return
|
|
10743
|
+
return _this74.el('main');
|
|
10716
10744
|
},
|
|
10717
10745
|
position: 'v',
|
|
10718
10746
|
indent: 1
|
|
10719
10747
|
},
|
|
10720
10748
|
on: {
|
|
10721
10749
|
close: function close() {
|
|
10722
|
-
return
|
|
10750
|
+
return _this74.showSuggest = false;
|
|
10723
10751
|
}
|
|
10724
10752
|
}
|
|
10725
10753
|
}, this.$slots))];
|
|
@@ -10747,6 +10775,15 @@ var script$4 = {
|
|
|
10747
10775
|
}
|
|
10748
10776
|
},
|
|
10749
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
|
+
},
|
|
10750
10787
|
input_value: function input_value() {
|
|
10751
10788
|
return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(function (v) {
|
|
10752
10789
|
return v.value;
|
|
@@ -10769,12 +10806,12 @@ var script$4 = {
|
|
|
10769
10806
|
}
|
|
10770
10807
|
},
|
|
10771
10808
|
mounted: function mounted() {
|
|
10772
|
-
var
|
|
10809
|
+
var _this76 = this;
|
|
10773
10810
|
|
|
10774
10811
|
if (this.isEntity && this.$refs.sensor) {
|
|
10775
10812
|
new ResizeObserver(function () {
|
|
10776
|
-
if (
|
|
10777
|
-
|
|
10813
|
+
if (_this76.$refs.sensor) {
|
|
10814
|
+
_this76.sensor_width = _this76.$refs.sensor.offsetWidth + 'px';
|
|
10778
10815
|
}
|
|
10779
10816
|
}).observe(this.$refs.sensor);
|
|
10780
10817
|
}
|
|
@@ -10787,13 +10824,13 @@ var script$3 = {
|
|
|
10787
10824
|
emits: ['input', 'dblclick:item'],
|
|
10788
10825
|
props: ['multiple', 'picker', 'dropWidth', 'separator', 'strict', 'br'],
|
|
10789
10826
|
created: function created() {
|
|
10790
|
-
var
|
|
10827
|
+
var _this77 = this;
|
|
10791
10828
|
|
|
10792
10829
|
this.$watch(function () {
|
|
10793
|
-
return
|
|
10830
|
+
return _this77.x.modelValue;
|
|
10794
10831
|
}, function (v) {
|
|
10795
|
-
if (
|
|
10796
|
-
|
|
10832
|
+
if (_this77.isEntity && !_this77.isFocus) {
|
|
10833
|
+
_this77.initOptions(v);
|
|
10797
10834
|
}
|
|
10798
10835
|
});
|
|
10799
10836
|
},
|
|
@@ -10877,7 +10914,7 @@ var script$3 = {
|
|
|
10877
10914
|
this.warn(false);
|
|
10878
10915
|
},
|
|
10879
10916
|
input: function input(a) {
|
|
10880
|
-
var
|
|
10917
|
+
var _this78 = this;
|
|
10881
10918
|
|
|
10882
10919
|
this.currOpt = a;
|
|
10883
10920
|
var v = a.innerText.replace(/^[\s,]+|[\s,]+$/g, '');
|
|
@@ -10887,9 +10924,9 @@ var script$3 = {
|
|
|
10887
10924
|
this.suggest(false);
|
|
10888
10925
|
} else {
|
|
10889
10926
|
this.sug_timer = setTimeout(function () {
|
|
10890
|
-
|
|
10927
|
+
_this78.suggest(true);
|
|
10891
10928
|
|
|
10892
|
-
|
|
10929
|
+
_this78.trigger(new Event('input'), v);
|
|
10893
10930
|
}, 500);
|
|
10894
10931
|
}
|
|
10895
10932
|
},
|
|
@@ -10905,7 +10942,7 @@ var script$3 = {
|
|
|
10905
10942
|
return this.$refs.inp;
|
|
10906
10943
|
},
|
|
10907
10944
|
fixStyle: function fixStyle() {
|
|
10908
|
-
var
|
|
10945
|
+
var _this79 = this;
|
|
10909
10946
|
|
|
10910
10947
|
var c = $$1.rngElement();
|
|
10911
10948
|
var g = false;
|
|
@@ -10980,7 +11017,7 @@ var script$3 = {
|
|
|
10980
11017
|
|
|
10981
11018
|
t.split(p).forEach(function (s) {
|
|
10982
11019
|
if (_h4 = $$1.strTrim(s)) {
|
|
10983
|
-
g =
|
|
11020
|
+
g = _this79.param(_h4);
|
|
10984
11021
|
|
|
10985
11022
|
_d.push('<u' + (g ? ' class=_o data-value="' + g.value + '"' + (g.forbid ? ' data-forbid' : '') : '') + '>' + _h4 + '</u>');
|
|
10986
11023
|
|
|
@@ -11046,11 +11083,11 @@ var script$3 = {
|
|
|
11046
11083
|
if (typeof c === 'function') c(this);else this.cmd(c, this.formVal());
|
|
11047
11084
|
},
|
|
11048
11085
|
addStore: function addStore(m) {
|
|
11049
|
-
var
|
|
11086
|
+
var _this80 = this;
|
|
11050
11087
|
|
|
11051
11088
|
if (m && typeof m !== 'string') {
|
|
11052
11089
|
var _r6 = $$1.array(m).filter(function (v) {
|
|
11053
|
-
return !
|
|
11090
|
+
return !_this80.store.find(function (s) {
|
|
11054
11091
|
return s.value == v.value;
|
|
11055
11092
|
});
|
|
11056
11093
|
});
|
|
@@ -11130,7 +11167,7 @@ var script$3 = {
|
|
|
11130
11167
|
return this.input_title;
|
|
11131
11168
|
},
|
|
11132
11169
|
html_options: function html_options(v) {
|
|
11133
|
-
var
|
|
11170
|
+
var _this81 = this;
|
|
11134
11171
|
|
|
11135
11172
|
var p = this.x.separator || ',';
|
|
11136
11173
|
if (v == null) v = this.x.modelValue;
|
|
@@ -11141,7 +11178,7 @@ var script$3 = {
|
|
|
11141
11178
|
$$1.lodash.each(b, function (o, i) {
|
|
11142
11179
|
_r7.push('<u' + (o.value ? ' class=_o data-value="' + o.value + '"' : '') + (o.forbid ? ' data-forbid' : '') + '>' + o.text + '</u>');
|
|
11143
11180
|
|
|
11144
|
-
if (!
|
|
11181
|
+
if (!_this81.x.multiple) return false;
|
|
11145
11182
|
|
|
11146
11183
|
_r7.push('<i>' + p + '</i>');
|
|
11147
11184
|
});
|
|
@@ -11149,7 +11186,7 @@ var script$3 = {
|
|
|
11149
11186
|
}
|
|
11150
11187
|
},
|
|
11151
11188
|
html_var: function html_var() {
|
|
11152
|
-
var
|
|
11189
|
+
var _this82 = this;
|
|
11153
11190
|
|
|
11154
11191
|
return h$1('div', {
|
|
11155
11192
|
class: 'w-linkbox-input f-flex-1',
|
|
@@ -11160,15 +11197,15 @@ var script$3 = {
|
|
|
11160
11197
|
onclick: this.onclick,
|
|
11161
11198
|
ondblclick: this.ondblclick,
|
|
11162
11199
|
onfocus: function onfocus(e) {
|
|
11163
|
-
|
|
11200
|
+
_this82.isFocus = true;
|
|
11164
11201
|
},
|
|
11165
11202
|
onblur: function onblur(e) {
|
|
11166
|
-
|
|
11203
|
+
_this82.isFocus = false;
|
|
11167
11204
|
}
|
|
11168
11205
|
});
|
|
11169
11206
|
},
|
|
11170
11207
|
html_input: function html_input() {
|
|
11171
|
-
var
|
|
11208
|
+
var _this83 = this;
|
|
11172
11209
|
|
|
11173
11210
|
var p = this.input_placeholder;
|
|
11174
11211
|
return [this.html_input_hidden(), this.html_var(), h$1('div', {
|
|
@@ -11182,14 +11219,14 @@ var script$3 = {
|
|
|
11182
11219
|
autoHide: true,
|
|
11183
11220
|
snap: {
|
|
11184
11221
|
target: function target() {
|
|
11185
|
-
return
|
|
11222
|
+
return _this83.el('main');
|
|
11186
11223
|
},
|
|
11187
11224
|
position: 'v',
|
|
11188
11225
|
indent: 1
|
|
11189
11226
|
},
|
|
11190
11227
|
on: {
|
|
11191
11228
|
close: function close() {
|
|
11192
|
-
return
|
|
11229
|
+
return _this83.showSuggest = false;
|
|
11193
11230
|
}
|
|
11194
11231
|
}
|
|
11195
11232
|
}, this.$slots)];
|
|
@@ -11218,12 +11255,12 @@ var script$3 = {
|
|
|
11218
11255
|
},
|
|
11219
11256
|
computed: {
|
|
11220
11257
|
validHooks: function validHooks() {
|
|
11221
|
-
var
|
|
11258
|
+
var _this84 = this;
|
|
11222
11259
|
|
|
11223
11260
|
return {
|
|
11224
11261
|
valid: function valid(v) {
|
|
11225
|
-
if (
|
|
11226
|
-
return
|
|
11262
|
+
if (_this84.x.strict && $$1.q('u:not([data-value])').length > 0) {
|
|
11263
|
+
return _this84.formErr('invalid_option');
|
|
11227
11264
|
}
|
|
11228
11265
|
}
|
|
11229
11266
|
};
|
|
@@ -11251,15 +11288,15 @@ var script$3 = {
|
|
|
11251
11288
|
}
|
|
11252
11289
|
},
|
|
11253
11290
|
mounted: function mounted() {
|
|
11254
|
-
var
|
|
11291
|
+
var _this85 = this;
|
|
11255
11292
|
|
|
11256
11293
|
if (this.isEntity) {
|
|
11257
11294
|
this.initOptions();
|
|
11258
11295
|
this.inp().addEventListener('compositionstart', function () {
|
|
11259
|
-
|
|
11296
|
+
_this85.imeMode = true;
|
|
11260
11297
|
});
|
|
11261
11298
|
this.inp().addEventListener('compositionend', function () {
|
|
11262
|
-
|
|
11299
|
+
_this85.imeMode = false;
|
|
11263
11300
|
});
|
|
11264
11301
|
}
|
|
11265
11302
|
}
|
|
@@ -11375,7 +11412,7 @@ var script$1 = {
|
|
|
11375
11412
|
this.setThumbLeft();
|
|
11376
11413
|
},
|
|
11377
11414
|
error: function error(text, timeout, fn) {
|
|
11378
|
-
var
|
|
11415
|
+
var _this86 = this;
|
|
11379
11416
|
|
|
11380
11417
|
if (!text) text = '';
|
|
11381
11418
|
this.isError = true;
|
|
@@ -11387,12 +11424,12 @@ var script$1 = {
|
|
|
11387
11424
|
this.text = text + "(".concat(timeout / 1000, ")");
|
|
11388
11425
|
var timer = setInterval(function () {
|
|
11389
11426
|
timeout -= 1000;
|
|
11390
|
-
|
|
11427
|
+
_this86.text = text + "(".concat(timeout / 1000, ")");
|
|
11391
11428
|
|
|
11392
11429
|
if (timeout <= 0) {
|
|
11393
11430
|
clearInterval(timer);
|
|
11394
11431
|
|
|
11395
|
-
|
|
11432
|
+
_this86.reset();
|
|
11396
11433
|
|
|
11397
11434
|
fn && fn();
|
|
11398
11435
|
}
|
|
@@ -11428,7 +11465,7 @@ var script$1 = {
|
|
|
11428
11465
|
$$1.close(this.dropper);
|
|
11429
11466
|
},
|
|
11430
11467
|
dragstart: function dragstart(e) {
|
|
11431
|
-
var
|
|
11468
|
+
var _this87 = this;
|
|
11432
11469
|
|
|
11433
11470
|
if (!this.isNormal || this.locked) return;
|
|
11434
11471
|
this.warn(false);
|
|
@@ -11443,16 +11480,16 @@ var script$1 = {
|
|
|
11443
11480
|
var c = $$1.eventX(e);
|
|
11444
11481
|
var l = $$1.numRange(f + c - x, 0, w - g);
|
|
11445
11482
|
a.style.left = l + 'px';
|
|
11446
|
-
|
|
11447
|
-
|
|
11483
|
+
_this87.$refs.track.style.width = l + g + 'px';
|
|
11484
|
+
_this87.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
|
|
11448
11485
|
|
|
11449
|
-
|
|
11486
|
+
_this87.el().classList.add('z-drag');
|
|
11450
11487
|
}, function (e) {
|
|
11451
11488
|
a.dispatchEvent(new Event('drop'));
|
|
11452
11489
|
}, e);
|
|
11453
11490
|
},
|
|
11454
11491
|
mouseenter: function mouseenter(e) {
|
|
11455
|
-
var
|
|
11492
|
+
var _this88 = this;
|
|
11456
11493
|
|
|
11457
11494
|
if (this.dropper || !this.x.big || this.isSuccess || this.locked) return;
|
|
11458
11495
|
this.warn(false);
|
|
@@ -11470,13 +11507,13 @@ var script$1 = {
|
|
|
11470
11507
|
context: this,
|
|
11471
11508
|
snap: {
|
|
11472
11509
|
target: function target() {
|
|
11473
|
-
return
|
|
11510
|
+
return _this88.el('main');
|
|
11474
11511
|
},
|
|
11475
11512
|
position: 'v'
|
|
11476
11513
|
},
|
|
11477
11514
|
on: {
|
|
11478
11515
|
close: function close() {
|
|
11479
|
-
return
|
|
11516
|
+
return _this88.dropper = null;
|
|
11480
11517
|
}
|
|
11481
11518
|
}
|
|
11482
11519
|
});
|
|
@@ -11519,12 +11556,12 @@ var script$1 = {
|
|
|
11519
11556
|
},
|
|
11520
11557
|
computed: {
|
|
11521
11558
|
validHooks: function validHooks() {
|
|
11522
|
-
var
|
|
11559
|
+
var _this89 = this;
|
|
11523
11560
|
|
|
11524
11561
|
return {
|
|
11525
11562
|
valid: function valid(v) {
|
|
11526
|
-
if (!
|
|
11527
|
-
return
|
|
11563
|
+
if (!_this89.isSuccess) {
|
|
11564
|
+
return _this89.formErr('jigsaw_required');
|
|
11528
11565
|
}
|
|
11529
11566
|
}
|
|
11530
11567
|
};
|