dfish-widget 0.1.359 → 0.1.363

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 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}个)',
@@ -3960,7 +3960,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
3960
3960
 
3961
3961
  var _component_w_option = resolveComponent("w-option");
3962
3962
 
3963
- var _component_w_picker = resolveComponent("w-picker");
3963
+ var _component_w_slidepicker = resolveComponent("w-slidepicker");
3964
3964
 
3965
3965
  var _component_w_vertical = resolveComponent("w-vertical");
3966
3966
 
@@ -4016,7 +4016,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4016
4016
  _: 1
4017
4017
  /* STABLE */
4018
4018
 
4019
- }), createVNode(_component_w_picker, {
4019
+ }), createVNode(_component_w_slidepicker, {
4020
4020
  height: "*",
4021
4021
  modelValue: $data.focusYear,
4022
4022
  "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
@@ -4068,7 +4068,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4068
4068
  _: 1
4069
4069
  /* STABLE */
4070
4070
 
4071
- }), createVNode(_component_w_picker, {
4071
+ }), createVNode(_component_w_slidepicker, {
4072
4072
  height: "*",
4073
4073
  modelValue: $data.focusMonth,
4074
4074
  "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
@@ -4120,7 +4120,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4120
4120
  _: 1
4121
4121
  /* STABLE */
4122
4122
 
4123
- }), createVNode(_component_w_picker, {
4123
+ }), createVNode(_component_w_slidepicker, {
4124
4124
  height: "*",
4125
4125
  modelValue: $data.focusDate,
4126
4126
  "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
@@ -4172,7 +4172,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4172
4172
  _: 1
4173
4173
  /* STABLE */
4174
4174
 
4175
- }), createVNode(_component_w_picker, {
4175
+ }), createVNode(_component_w_slidepicker, {
4176
4176
  height: "*",
4177
4177
  modelValue: $data.focusHour,
4178
4178
  "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
@@ -4221,7 +4221,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4221
4221
  _: 1
4222
4222
  /* STABLE */
4223
4223
 
4224
- }), createVNode(_component_w_picker, {
4224
+ }), createVNode(_component_w_slidepicker, {
4225
4225
  height: "*",
4226
4226
  modelValue: $data.focusMinute,
4227
4227
  "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
@@ -4270,7 +4270,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4270
4270
  _: 1
4271
4271
  /* STABLE */
4272
4272
 
4273
- }), createVNode(_component_w_picker, {
4273
+ }), createVNode(_component_w_slidepicker, {
4274
4274
  height: "*",
4275
4275
  modelValue: $data.focusSecond,
4276
4276
  "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
@@ -4367,7 +4367,7 @@ var script$16 = {
4367
4367
  template: script$17,
4368
4368
  width: '100%',
4369
4369
  height: '55%',
4370
- position: 'bottom',
4370
+ position: 'b',
4371
4371
  cover: true,
4372
4372
  autoHide: true,
4373
4373
  data: dateOptions
@@ -6465,6 +6465,7 @@ var script$z = {
6465
6465
  },
6466
6466
  focus: function focus() {
6467
6467
  this.$refs.v.focus();
6468
+ return this;
6468
6469
  },
6469
6470
  formText: function formText() {
6470
6471
  var t = this.val();
@@ -6848,9 +6849,11 @@ var script$x = {
6848
6849
  mixins: [script$y],
6849
6850
  props: ['all'],
6850
6851
  watch: {
6851
- checked: function checked(e) {
6852
+ checked: function checked(a) {
6853
+ this.check(a);
6854
+
6852
6855
  if (this.provideBoxParent) {
6853
- !this.provideBoxParent.isFolder() && this.provideBoxParent.clickBoxProxy();
6856
+ this.provideBoxParent.clickBoxProxy();
6854
6857
  }
6855
6858
  }
6856
6859
  },
@@ -6920,7 +6923,7 @@ var script$w = {
6920
6923
  provide: function provide() {
6921
6924
  return {
6922
6925
  provideParentLeaf: this,
6923
- provideLeafLevel: this.provideLeafLevel + 1,
6926
+ provideLeafLevel: this.provideLeafLevel + (this.isEntity ? 1 : 0),
6924
6927
  provideBoxParent: this
6925
6928
  };
6926
6929
  },
@@ -7060,7 +7063,7 @@ var script$w = {
7060
7063
  'z-folder': this.isFolder(),
7061
7064
  'z-on': this.isCurrent
7062
7065
  },
7063
- style: 'padding-left:' + $$1.unitSize(this.provideLeafLevel * 16)
7066
+ style: 'padding-left:' + $$1.unitSize((this.provideLeafLevel + 1) * 16)
7064
7067
  };
7065
7068
 
7066
7069
  if (this.inTree()) {
@@ -8499,7 +8502,7 @@ var script$o = {
8499
8502
  };
8500
8503
  script$o.__file = "src/widgets/TimelineItem.vue";
8501
8504
  var script$n = {
8502
- name: 'w-picker',
8505
+ name: 'w-slidepicker',
8503
8506
  mixins: [script$1j],
8504
8507
  props: ['optionHeight', 'modelValue', 'minValue', 'maxValue', 'keepIndex'],
8505
8508
  emits: ['update:modelValue', 'change', 'scroll:top', 'scroll:bottom'],
@@ -8698,17 +8701,17 @@ var script$n = {
8698
8701
  };
8699
8702
  var _hoisted_1$2 = {
8700
8703
  ref: "options",
8701
- class: "w-picker-options"
8704
+ class: "w-slidepicker-options"
8702
8705
  };
8703
8706
 
8704
8707
  var _hoisted_2$1 = /*#__PURE__*/createVNode("div", {
8705
- class: "w-picker-bg-top"
8708
+ class: "w-slidepicker-bg-top"
8706
8709
  }, null, -1
8707
8710
  /* HOISTED */
8708
8711
  );
8709
8712
 
8710
8713
  var _hoisted_3$1 = /*#__PURE__*/createVNode("div", {
8711
- class: "w-picker-bg-bottom"
8714
+ class: "w-slidepicker-bg-bottom"
8712
8715
  }, null, -1
8713
8716
  /* HOISTED */
8714
8717
  );
@@ -8724,7 +8727,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
8724
8727
  }
8725
8728
 
8726
8729
  script$n.render = render$3;
8727
- script$n.__file = "src/widgets/Picker.vue";
8730
+ script$n.__file = "src/widgets/SlidePicker.vue";
8728
8731
  var script$m = {
8729
8732
  name: 'w-hidden',
8730
8733
  mixins: [script$z],
@@ -9661,6 +9664,34 @@ var script$f = {
9661
9664
  }
9662
9665
  },
9663
9666
  computed: {
9667
+ validHooks: function validHooks() {
9668
+ var _this57 = this;
9669
+
9670
+ return {
9671
+ valid: function valid(v) {
9672
+ var _iterator5 = _createForOfIteratorHelper(_this57.list),
9673
+ _step5;
9674
+
9675
+ try {
9676
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
9677
+ var item = _step5.value;
9678
+
9679
+ if (item.loading) {
9680
+ return _this57.formErr('upload_loading');
9681
+ }
9682
+
9683
+ if (item.error) {
9684
+ return _this57.formErr('upload_invalid_file');
9685
+ }
9686
+ }
9687
+ } catch (err) {
9688
+ _iterator5.e(err);
9689
+ } finally {
9690
+ _iterator5.f();
9691
+ }
9692
+ }
9693
+ };
9694
+ },
9664
9695
  input_value: function input_value() {
9665
9696
  var v = this.val();
9666
9697
  return v.length == 0 ? '' : JSON.stringify(v);
@@ -9679,11 +9710,11 @@ var script$f = {
9679
9710
  };
9680
9711
  },
9681
9712
  html_on: function html_on() {
9682
- var _this57 = this;
9713
+ var _this58 = this;
9683
9714
 
9684
9715
  return {
9685
9716
  onclick: function onclick() {
9686
- return _this57.warn(false);
9717
+ return _this58.warn(false);
9687
9718
  }
9688
9719
  };
9689
9720
  }
@@ -9703,30 +9734,30 @@ var script$e = {
9703
9734
  this.provideUpload.clickItem(e, this.item);
9704
9735
  },
9705
9736
  createImageThumbnail: function createImageThumbnail() {
9706
- var _this58 = this;
9737
+ var _this59 = this;
9707
9738
 
9708
9739
  var r = new FileReader();
9709
9740
 
9710
9741
  r.onload = function (e) {
9711
- if (_this58.item.loaded) return;
9712
- _this58.dataURL = e.target.result;
9742
+ if (_this59.item.loaded) return;
9743
+ _this59.dataURL = e.target.result;
9713
9744
  };
9714
9745
 
9715
9746
  r.readAsDataURL(this.item.file);
9716
9747
  },
9717
9748
  createVideoThumbnail: function createVideoThumbnail() {
9718
- var _this59 = this;
9749
+ var _this60 = this;
9719
9750
 
9720
9751
  var video = document.createElement('video');
9721
9752
  video.addEventListener('loadeddata', function () {
9722
9753
  setTimeout(function () {
9723
- if (_this59.item.loaded) return;
9754
+ if (_this60.item.loaded) return;
9724
9755
  var cvs = document.createElement('canvas');
9725
9756
  var ctx = cvs.getContext('2d');
9726
9757
  cvs.width = video.videoWidth;
9727
9758
  cvs.height = video.videoHeight;
9728
9759
  ctx.drawImage(video, 0, 0);
9729
- _this59.dataURL = cvs.toDataURL('image/png');
9760
+ _this60.dataURL = cvs.toDataURL('image/png');
9730
9761
  video.pause();
9731
9762
  $$1.q(video).remove();
9732
9763
  }, 150);
@@ -9781,14 +9812,14 @@ var script$e = {
9781
9812
  }
9782
9813
  },
9783
9814
  mounted: function mounted() {
9784
- var _this60 = this;
9815
+ var _this61 = this;
9785
9816
 
9786
9817
  if (!this.item.loaded && this.item.file) {
9787
9818
  this.upload.isVideo(this.item) ? this.createVideoThumbnail() : this.upload.isImage(this.item) ? this.createImageThumbnail() : null;
9788
9819
  this.$watch(function () {
9789
- return _this60.item.progress;
9820
+ return _this61.item.progress;
9790
9821
  }, function (v) {
9791
- return _this60.setProgress(v);
9822
+ return _this61.setProgress(v);
9792
9823
  }, {
9793
9824
  immediate: true
9794
9825
  });
@@ -9885,7 +9916,7 @@ var script$d = {
9885
9916
  });
9886
9917
  },
9887
9918
  html_input_button: function html_input_button() {
9888
- var _this61 = this;
9919
+ var _this62 = this;
9889
9920
 
9890
9921
  return h$1(script$I, {
9891
9922
  ref: 'uploadbbr',
@@ -9893,16 +9924,16 @@ var script$d = {
9893
9924
  gap: 10
9894
9925
  }, {
9895
9926
  default: function _default() {
9896
- return [_this61.$slots.button ? _this61.$slots.button() : h$1(script$$, {
9927
+ return [_this62.$slots.button ? _this62.$slots.button() : h$1(script$$, {
9897
9928
  ref: 'uploadbutton',
9898
9929
  title: $$1.loc.form.choose_image,
9899
9930
  icon: '.f-i .f-i-plus',
9900
9931
  class: 'w-mediaupload-button',
9901
9932
  style: {
9902
- width: $$1.unitSize(_this61.x.thumbnailWidth),
9903
- height: $$1.unitSize(_this61.x.thumbnailHeight)
9933
+ width: $$1.unitSize(_this62.x.thumbnailWidth),
9934
+ height: $$1.unitSize(_this62.x.thumbnailHeight)
9904
9935
  },
9905
- onclick: _this61.chooseFile
9936
+ onclick: _this62.chooseFile
9906
9937
  })];
9907
9938
  }
9908
9939
  });
@@ -10084,7 +10115,7 @@ var script$a = {
10084
10115
  return this.$refs.btns && this.$refs.btns.contains(el);
10085
10116
  },
10086
10117
  html_button: function html_button() {
10087
- var _this62 = this;
10118
+ var _this63 = this;
10088
10119
 
10089
10120
  return h$1('div', {
10090
10121
  class: 'w-spinner-step w-input-bbr f-flex-column f-oh',
@@ -10093,14 +10124,14 @@ var script$a = {
10093
10124
  class: 'w-spinner-step-btn f-rel',
10094
10125
  disabled: this.x.disabled,
10095
10126
  onclick: function onclick(e) {
10096
- return _this62.stepBy(1);
10127
+ return _this63.stepBy(1);
10097
10128
  },
10098
10129
  innerHTML: '<i class="f-abs-center f-i f-i-caret-up"></i>'
10099
10130
  }), h$1('button', {
10100
10131
  class: 'w-spinner-step-btn f-rel',
10101
10132
  disabled: this.x.disabled,
10102
10133
  onclick: function onclick(e) {
10103
- return _this62.stepBy(-1);
10134
+ return _this63.stepBy(-1);
10104
10135
  },
10105
10136
  innerHTML: '<i class="f-abs-center f-i f-i-caret-down"></i>'
10106
10137
  })]);
@@ -10108,24 +10139,24 @@ var script$a = {
10108
10139
  },
10109
10140
  computed: {
10110
10141
  validHooks: function validHooks() {
10111
- var _this63 = this;
10142
+ var _this64 = this;
10112
10143
 
10113
10144
  return {
10114
10145
  compare: function compare(v, c, d) {
10115
- return !$$1.eval('v' + (_this63.x.compare.mode || '==') + 'd', {
10146
+ return !$$1.eval('v' + (_this64.x.compare.mode || '==') + 'd', {
10116
10147
  v: v,
10117
10148
  d: d
10118
10149
  });
10119
10150
  },
10120
10151
  valid: function valid(v) {
10121
- _this63.x.format && (v = v.replace(RegExp(_this63.x.format.separator || ',', 'g'), ''));
10152
+ _this64.x.format && (v = v.replace(RegExp(_this64.x.format.separator || ',', 'g'), ''));
10122
10153
 
10123
10154
  if (v) {
10124
- if (isNaN(v) || /\s/.test(v)) return _this63.formErr('number_invalid');
10125
- var d = _this63.x.decimal;
10126
- if (!d && ~v.indexOf('.')) return _this63.formErr('number_integer');
10127
- if (d && d > 0 && $$1.strFrom(v, '.').length > d) return _this63.formErr('number_decimal_digit', [d]);
10128
- if (_this63.provideRangeParent) return _this63.provideRangeParent.validHooks.valid();
10155
+ if (isNaN(v) || /\s/.test(v)) return _this64.formErr('number_invalid');
10156
+ var d = _this64.x.decimal;
10157
+ if (!d && ~v.indexOf('.')) return _this64.formErr('number_integer');
10158
+ if (d && d > 0 && $$1.strFrom(v, '.').length > d) return _this64.formErr('number_decimal_digit', [d]);
10159
+ if (_this64.provideRangeParent) return _this64.provideRangeParent.validHooks.valid();
10129
10160
  }
10130
10161
  }
10131
10162
  };
@@ -10196,7 +10227,7 @@ var script$9 = {
10196
10227
  };
10197
10228
  },
10198
10229
  html_button: function html_button() {
10199
- var _this64 = this;
10230
+ var _this65 = this;
10200
10231
 
10201
10232
  var r = [];
10202
10233
  if (!this.x.noButton) r.push(h$1('button', {
@@ -10213,28 +10244,28 @@ var script$9 = {
10213
10244
  autoHide: true,
10214
10245
  snap: {
10215
10246
  target: function target() {
10216
- return _this64.snapElem();
10247
+ return _this65.snapElem();
10217
10248
  },
10218
10249
  position: 'v',
10219
10250
  indent: 1
10220
10251
  },
10221
10252
  on: {
10222
10253
  close: function close() {
10223
- _this64.showDrop = false, _this64.currentDate = null;
10254
+ _this65.showDrop = false, _this65.currentDate = null;
10224
10255
  }
10225
10256
  }
10226
10257
  }, {
10227
10258
  default: function _default() {
10228
10259
  return h$1(script$q, _objectSpread(_objectSpread({
10229
10260
  pad: true,
10230
- current: _this64.currentDate || _this64.x.modelValue || '',
10231
- value: _this64.x.modelValue,
10232
- format: _this64.x.format
10233
- }, _this64.getPeriod()), {}, {
10234
- success: _this64.calendarCallback,
10261
+ current: _this65.currentDate || _this65.x.modelValue || '',
10262
+ value: _this65.x.modelValue,
10263
+ format: _this65.x.format
10264
+ }, _this65.getPeriod()), {}, {
10265
+ success: _this65.calendarCallback,
10235
10266
  on: {
10236
10267
  'click:item': function clickItem(e, item) {
10237
- return _this64.currentDate = item.value;
10268
+ return _this65.currentDate = item.value;
10238
10269
  }
10239
10270
  }
10240
10271
  }));
@@ -10247,46 +10278,46 @@ var script$9 = {
10247
10278
  },
10248
10279
  computed: {
10249
10280
  validHooks: function validHooks() {
10250
- var _this65 = this;
10281
+ var _this66 = this;
10251
10282
 
10252
10283
  return {
10253
10284
  minValue: function minValue(v) {
10254
- return $$1.dateParse(v, _this65.x.format) < $$1.dateParse(_this65.vv('minValue'), _this65.x.format);
10285
+ return $$1.dateParse(v, _this66.x.format) < $$1.dateParse(_this66.vv('minValue'), _this66.x.format);
10255
10286
  },
10256
10287
  maxValue: function maxValue(v) {
10257
- return $$1.dateParse(v, _this65.x.format) > $$1.dateParse(_this65.vv('maxValue'), _this65.x.format);
10288
+ return $$1.dateParse(v, _this66.x.format) > $$1.dateParse(_this66.vv('maxValue'), _this66.x.format);
10258
10289
  },
10259
10290
  compare: function compare(v, c, d) {
10260
- if (_this65.x.format && c.x.format) {
10261
- var f = (_this65.x.format.length > c.x.format.length ? _this65 : c).x.format;
10262
- v = $$1.dateFormat($$1.dateParse(v, _this65.x.format), f);
10291
+ if (_this66.x.format && c.x.format) {
10292
+ var f = (_this66.x.format.length > c.x.format.length ? _this66 : c).x.format;
10293
+ v = $$1.dateFormat($$1.dateParse(v, _this66.x.format), f);
10263
10294
  d = $$1.dateFormat($$1.dateParse(d, c.x.format), f);
10264
10295
  }
10265
10296
 
10266
- return !$$1.eval('v' + (_this65.x.compare.mode || '==') + 'd', {
10297
+ return !$$1.eval('v' + (_this66.x.compare.mode || '==') + 'd', {
10267
10298
  v: v,
10268
10299
  d: d
10269
10300
  });
10270
10301
  },
10271
10302
  valid: function valid(v) {
10272
- if (_this65.x.multiple) return;
10303
+ if (_this66.x.multiple) return;
10273
10304
 
10274
10305
  if (v) {
10275
10306
  var _c4 = v;
10276
- var d = $$1.dateParse(_c4, _this65.x.format);
10307
+ var d = $$1.dateParse(_c4, _this66.x.format);
10277
10308
  var y = d.getFullYear();
10278
10309
  var m = 9999;
10279
10310
  var n = 1000;
10280
- if (y > m || y < n) return _this65.formErr('time_exceed', [n, m]);
10311
+ if (y > m || y < n) return _this66.formErr('time_exceed', [n, m]);
10281
10312
 
10282
- if (_c4 != $$1.dateFormat(d, _this65.x.format)) {
10283
- return _this65.formErr('time_format', [$$1.dateFormat(d, _this65.x.format)]);
10313
+ if (_c4 != $$1.dateFormat(d, _this66.x.format)) {
10314
+ return _this66.formErr('time_format', [$$1.dateFormat(d, _this66.x.format)]);
10284
10315
  }
10285
10316
  }
10286
10317
 
10287
- if (_this65.vv('beforeNow') && v && v > $$1.dateFormat(new Date(), _this65.x.format)) return _this65.formErr('beforeNow', [_this65.x.beforeNow]);
10288
- if (_this65.vv('afterNow') && v && v < $$1.dateFormat(new Date(), _this65.x.format)) return _this65.formErr('afterNow', [_this65.x.afterNow]);
10289
- if (_this65.provideRangeParent) return _this65.provideRangeParent.validHooks.valid();
10318
+ if (_this66.vv('beforeNow') && v && v > $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('beforeNow', [_this66.x.beforeNow]);
10319
+ if (_this66.vv('afterNow') && v && v < $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('afterNow', [_this66.x.afterNow]);
10320
+ if (_this66.provideRangeParent) return _this66.provideRangeParent.validHooks.valid();
10290
10321
  }
10291
10322
  };
10292
10323
  },
@@ -10334,7 +10365,7 @@ var script$8 = {
10334
10365
  return this.input_text;
10335
10366
  },
10336
10367
  html_input: function html_input() {
10337
- var _this66 = this;
10368
+ var _this67 = this;
10338
10369
 
10339
10370
  var t = this.input_text;
10340
10371
  var p = this.input_placeholder;
@@ -10353,14 +10384,14 @@ var script$8 = {
10353
10384
  autoHide: true,
10354
10385
  snap: {
10355
10386
  target: function target() {
10356
- return _this66.el('main');
10387
+ return _this67.el('main');
10357
10388
  },
10358
10389
  position: 'v',
10359
10390
  indent: 1
10360
10391
  },
10361
10392
  on: {
10362
10393
  close: function close() {
10363
- return _this66.showDrop = false;
10394
+ return _this67.showDrop = false;
10364
10395
  }
10365
10396
  }
10366
10397
  }, this.$slots)];
@@ -10374,7 +10405,7 @@ var script$8 = {
10374
10405
  },
10375
10406
  computed: {
10376
10407
  input_text: function input_text() {
10377
- var _this67 = this;
10408
+ var _this68 = this;
10378
10409
 
10379
10410
  var r = [];
10380
10411
  var s = this.slots_children();
@@ -10384,7 +10415,7 @@ var script$8 = {
10384
10415
  return n.props.value == v;
10385
10416
  });
10386
10417
  if (i > -1) r.push(i);
10387
- if (!_this67.x.multiple) return false;
10418
+ if (!_this68.x.multiple) return false;
10388
10419
  });
10389
10420
  return r.sort().map(function (v) {
10390
10421
  return s[v].props.text;
@@ -10505,24 +10536,27 @@ var script$5 = {
10505
10536
  },
10506
10537
  computed: {
10507
10538
  validHooks: function validHooks() {
10508
- var _this68 = this;
10539
+ var _this69 = this;
10509
10540
 
10510
10541
  return {
10511
10542
  valid: function valid() {
10512
- var f = _this68.forms();
10543
+ var f = _this69.forms();
10513
10544
 
10514
10545
  if (f.length > 1) {
10515
10546
  var v1 = f[0] && f[0].formVal();
10516
10547
  var v2 = f[1] && f[1].formVal();
10517
10548
 
10518
- var _c5 = _this68.x.compare || '<=';
10549
+ var _c5 = _this69.x.compare || '<=';
10550
+
10551
+ if (!isNaN(v1)) v1 = parseFloat(v1);
10552
+ if (!isNaN(v2)) v2 = parseFloat(v2);
10519
10553
 
10520
10554
  if (v1 && v2) {
10521
10555
  if (!$$1.eval("v1 ".concat(_c5, " v2"), {
10522
10556
  v1: v1,
10523
10557
  v2: v2
10524
10558
  })) {
10525
- return _this68.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
10559
+ return _this69.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
10526
10560
  }
10527
10561
  }
10528
10562
  }
@@ -10530,11 +10564,11 @@ var script$5 = {
10530
10564
  };
10531
10565
  },
10532
10566
  html_on: function html_on() {
10533
- var _this69 = this;
10567
+ var _this70 = this;
10534
10568
 
10535
10569
  return {
10536
10570
  onclick: function onclick(e) {
10537
- return _this69.warnClass = '';
10571
+ return _this70.warnClass = '';
10538
10572
  }
10539
10573
  };
10540
10574
  }
@@ -10575,9 +10609,19 @@ var script$4 = {
10575
10609
  this.addVal(v);
10576
10610
  this.clear();
10577
10611
  this.$nextTick(this.focus);
10612
+ return this;
10613
+ },
10614
+ closeDrop: function closeDrop() {
10615
+ this.suggest(false);
10616
+ return this;
10578
10617
  },
10579
10618
  suggest: function suggest(a) {
10580
10619
  a = a == null ? true : a;
10620
+
10621
+ if (a === false) {
10622
+ clearTimeout(this.sug_timer);
10623
+ }
10624
+
10581
10625
  this.showSuggest = a;
10582
10626
  this.warn(false);
10583
10627
  },
@@ -10587,9 +10631,10 @@ var script$4 = {
10587
10631
  focus: function focus() {
10588
10632
  this.$refs.input.focus();
10589
10633
  this.warn(false);
10634
+ return this;
10590
10635
  },
10591
10636
  oninput: function oninput(e) {
10592
- var _this70 = this;
10637
+ var _this71 = this;
10593
10638
 
10594
10639
  var v = e.target.value;
10595
10640
  this.sensor_text = v;
@@ -10599,9 +10644,9 @@ var script$4 = {
10599
10644
  this.suggest(false);
10600
10645
  } else {
10601
10646
  this.sug_timer = setTimeout(function () {
10602
- _this70.suggest(true);
10647
+ _this71.suggest(true);
10603
10648
 
10604
- _this70.trigger(e, v);
10649
+ _this71.trigger(e, v);
10605
10650
  }, 500);
10606
10651
  }
10607
10652
  },
@@ -10614,7 +10659,9 @@ var script$4 = {
10614
10659
  var mv = $$1.array(this.x.modelValue, true);
10615
10660
  mv.length && mv.splice(mv.length - 1, 1);
10616
10661
  }
10617
- }
10662
+ } //38: up, 40:down
10663
+ //if (this.showSuggest && (k == 38 || k == 40)) e.preventDefault()
10664
+
10618
10665
  },
10619
10666
  clickItem: function clickItem(e, item) {
10620
10667
  e.stopPropagation();
@@ -10648,7 +10695,7 @@ var script$4 = {
10648
10695
  return this.input_title;
10649
10696
  },
10650
10697
  html_options: function html_options() {
10651
- var _this71 = this;
10698
+ var _this72 = this;
10652
10699
 
10653
10700
  var m = this.x.modelValue;
10654
10701
 
@@ -10659,22 +10706,22 @@ var script$4 = {
10659
10706
  'z-forbid': v.forbid
10660
10707
  }],
10661
10708
  onclick: function onclick(e) {
10662
- return _this71.clickItem(e, v);
10709
+ return _this72.clickItem(e, v);
10663
10710
  }
10664
10711
  }, [h$1('div', {
10665
10712
  class: 'w-combobox-option-text f-line-1',
10666
10713
  title: v.text
10667
- }, v.text), _this71.isNormal && h$1('div', {
10714
+ }, v.text), _this72.isNormal && h$1('div', {
10668
10715
  class: 'w-combobox-option-close f-i f-i-close',
10669
10716
  onclick: function onclick(e) {
10670
- return _this71.clickClose(e, v);
10717
+ return _this72.clickClose(e, v);
10671
10718
  }
10672
10719
  })]);
10673
10720
  });
10674
10721
  }
10675
10722
  },
10676
10723
  html_var: function html_var() {
10677
- var _this72 = this;
10724
+ var _this73 = this;
10678
10725
 
10679
10726
  return h$1('div', {
10680
10727
  class: 'w-combobox-input-wrap'
@@ -10691,15 +10738,15 @@ var script$4 = {
10691
10738
  onkeydown: this.onkeydown,
10692
10739
  placeholder: this.input_value ? null : this.input_placeholder,
10693
10740
  onfocus: function onfocus(e) {
10694
- _this72.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
10741
+ _this73.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
10695
10742
  },
10696
10743
  onblur: function onblur(e) {
10697
- return _this72.isFocus = false;
10744
+ return _this73.isFocus = false;
10698
10745
  }
10699
10746
  })]);
10700
10747
  },
10701
10748
  html_input: function html_input() {
10702
- var _this73 = this;
10749
+ var _this74 = this;
10703
10750
 
10704
10751
  return [this.html_input_hidden(), h$1('div', {
10705
10752
  class: 'w-combobox-list f-flex-1 f-flex f-oh f-height'
@@ -10712,14 +10759,14 @@ var script$4 = {
10712
10759
  autoHide: true,
10713
10760
  snap: {
10714
10761
  target: function target() {
10715
- return _this73.el('main');
10762
+ return _this74.el('main');
10716
10763
  },
10717
10764
  position: 'v',
10718
10765
  indent: 1
10719
10766
  },
10720
10767
  on: {
10721
10768
  close: function close() {
10722
- return _this73.showSuggest = false;
10769
+ return _this74.showSuggest = false;
10723
10770
  }
10724
10771
  }
10725
10772
  }, this.$slots))];
@@ -10747,6 +10794,15 @@ var script$4 = {
10747
10794
  }
10748
10795
  },
10749
10796
  computed: {
10797
+ validHooks: function validHooks() {
10798
+ var _this75 = this;
10799
+
10800
+ return {
10801
+ valid: function valid(v) {
10802
+ if (_this75.$refs.input.value) return _this75.formErr('invalid_option');
10803
+ }
10804
+ };
10805
+ },
10750
10806
  input_value: function input_value() {
10751
10807
  return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(function (v) {
10752
10808
  return v.value;
@@ -10769,12 +10825,12 @@ var script$4 = {
10769
10825
  }
10770
10826
  },
10771
10827
  mounted: function mounted() {
10772
- var _this74 = this;
10828
+ var _this76 = this;
10773
10829
 
10774
10830
  if (this.isEntity && this.$refs.sensor) {
10775
10831
  new ResizeObserver(function () {
10776
- if (_this74.$refs.sensor) {
10777
- _this74.sensor_width = _this74.$refs.sensor.offsetWidth + 'px';
10832
+ if (_this76.$refs.sensor) {
10833
+ _this76.sensor_width = _this76.$refs.sensor.offsetWidth + 'px';
10778
10834
  }
10779
10835
  }).observe(this.$refs.sensor);
10780
10836
  }
@@ -10787,13 +10843,13 @@ var script$3 = {
10787
10843
  emits: ['input', 'dblclick:item'],
10788
10844
  props: ['multiple', 'picker', 'dropWidth', 'separator', 'strict', 'br'],
10789
10845
  created: function created() {
10790
- var _this75 = this;
10846
+ var _this77 = this;
10791
10847
 
10792
10848
  this.$watch(function () {
10793
- return _this75.x.modelValue;
10849
+ return _this77.x.modelValue;
10794
10850
  }, function (v) {
10795
- if (_this75.isEntity && !_this75.isFocus) {
10796
- _this75.initOptions(v);
10851
+ if (_this77.isEntity && !_this77.isFocus) {
10852
+ _this77.initOptions(v);
10797
10853
  }
10798
10854
  });
10799
10855
  },
@@ -10870,14 +10926,25 @@ var script$3 = {
10870
10926
  if (m.length > 1) m.eq(0).next('i').addBack().remove();
10871
10927
  this.save();
10872
10928
  }
10929
+
10930
+ return this;
10931
+ },
10932
+ closeDrop: function closeDrop() {
10933
+ this.suggest(false);
10934
+ return this;
10873
10935
  },
10874
10936
  suggest: function suggest(a) {
10875
10937
  a = a == null ? true : a;
10938
+
10939
+ if (a === false) {
10940
+ clearTimeout(this.sug_timer);
10941
+ }
10942
+
10876
10943
  this.showSuggest = a;
10877
10944
  this.warn(false);
10878
10945
  },
10879
10946
  input: function input(a) {
10880
- var _this76 = this;
10947
+ var _this78 = this;
10881
10948
 
10882
10949
  this.currOpt = a;
10883
10950
  var v = a.innerText.replace(/^[\s,]+|[\s,]+$/g, '');
@@ -10887,25 +10954,22 @@ var script$3 = {
10887
10954
  this.suggest(false);
10888
10955
  } else {
10889
10956
  this.sug_timer = setTimeout(function () {
10890
- _this76.suggest(true);
10957
+ _this78.suggest(true);
10891
10958
 
10892
- _this76.trigger(new Event('input'), v);
10959
+ _this78.trigger(new Event('input'), v);
10893
10960
  }, 500);
10894
10961
  }
10895
10962
  },
10896
- closePop: function closePop() {
10897
- clearTimeout(this.sug_timer);
10898
- this.suggest(false);
10899
- },
10900
10963
  focus: function focus() {
10901
10964
  this.$refs.inp.focus();
10902
10965
  this.warn(false);
10966
+ return this;
10903
10967
  },
10904
10968
  inp: function inp() {
10905
10969
  return this.$refs.inp;
10906
10970
  },
10907
10971
  fixStyle: function fixStyle() {
10908
- var _this77 = this;
10972
+ var _this79 = this;
10909
10973
 
10910
10974
  var c = $$1.rngElement();
10911
10975
  var g = false;
@@ -10936,7 +11000,7 @@ var script$3 = {
10936
11000
  $$1.q('br', inp).remove();
10937
11001
  if (c.firstChild) c = c.firstChild;else $$1.rngCursor(c);
10938
11002
  }
10939
- } else return this.closePop();
11003
+ } else return this.closeDrop();
10940
11004
  }
10941
11005
 
10942
11006
  $$1.q('br', inp).remove(); // 输入框内之只允许存在U和I两种标签。输入过程中浏览器可能会自动生成 <font> 标签,需要去除它
@@ -10980,7 +11044,7 @@ var script$3 = {
10980
11044
 
10981
11045
  t.split(p).forEach(function (s) {
10982
11046
  if (_h4 = $$1.strTrim(s)) {
10983
- g = _this77.param(_h4);
11047
+ g = _this79.param(_h4);
10984
11048
 
10985
11049
  _d.push('<u' + (g ? ' class=_o data-value="' + g.value + '"' + (g.forbid ? ' data-forbid' : '') : '') + '>' + _h4 + '</u>');
10986
11050
 
@@ -11005,7 +11069,7 @@ var script$3 = {
11005
11069
  m.length && (m.remove(), $$1.q('i + i, i:first-child', inp).remove()); // 删除重复数据
11006
11070
 
11007
11071
  g = true;
11008
- if ((c = $$1.rngElement()) && c.tagName === 'U' && !c.getAttribute('data-value')) this.input(c);else this.closePop();
11072
+ if ((c = $$1.rngElement()) && c.tagName === 'U' && !c.getAttribute('data-value')) this.input(c);else this.closeDrop();
11009
11073
  } else {
11010
11074
  if (t) {
11011
11075
  if ($$1.classAny(c, '_o') && !this.param(t)) {
@@ -11017,7 +11081,7 @@ var script$3 = {
11017
11081
  this.input(c);
11018
11082
  } else {
11019
11083
  g = true;
11020
- this.closePop();
11084
+ this.closeDrop();
11021
11085
  }
11022
11086
  }
11023
11087
 
@@ -11046,11 +11110,11 @@ var script$3 = {
11046
11110
  if (typeof c === 'function') c(this);else this.cmd(c, this.formVal());
11047
11111
  },
11048
11112
  addStore: function addStore(m) {
11049
- var _this78 = this;
11113
+ var _this80 = this;
11050
11114
 
11051
11115
  if (m && typeof m !== 'string') {
11052
11116
  var _r6 = $$1.array(m).filter(function (v) {
11053
- return !_this78.store.find(function (s) {
11117
+ return !_this80.store.find(function (s) {
11054
11118
  return s.value == v.value;
11055
11119
  });
11056
11120
  });
@@ -11087,6 +11151,13 @@ var script$3 = {
11087
11151
  this.$refs.v.value = r.join(',');
11088
11152
  this.val(m);
11089
11153
  },
11154
+ onkeydown: function onkeydown(e) {
11155
+ var k = e.keyCode;
11156
+
11157
+ if (k === 13) {
11158
+ e.preventDefault();
11159
+ }
11160
+ },
11090
11161
  onkeyup: function onkeyup(e) {
11091
11162
  if (!this.imeMode) {
11092
11163
  var k = this._KC = e.keyCode;
@@ -11094,7 +11165,6 @@ var script$3 = {
11094
11165
  if (k === 13 || k === 38 || k === 40 || k === 17) {
11095
11166
  // 38:up, 40:down, 17:ctrl
11096
11167
  e.stopPropagation();
11097
- if (k === 13) this.fixStyle();
11098
11168
  } else {
11099
11169
  this.fixStyle();
11100
11170
  }
@@ -11109,7 +11179,7 @@ var script$3 = {
11109
11179
  } else {
11110
11180
  var _c7 = $$1.rngElement();
11111
11181
 
11112
- _c7.tagName === 'U' ? this.input(_c7) : this.closePop();
11182
+ _c7.tagName === 'U' ? this.input(_c7) : this.closeDrop();
11113
11183
  }
11114
11184
  }
11115
11185
  },
@@ -11130,7 +11200,7 @@ var script$3 = {
11130
11200
  return this.input_title;
11131
11201
  },
11132
11202
  html_options: function html_options(v) {
11133
- var _this79 = this;
11203
+ var _this81 = this;
11134
11204
 
11135
11205
  var p = this.x.separator || ',';
11136
11206
  if (v == null) v = this.x.modelValue;
@@ -11141,7 +11211,7 @@ var script$3 = {
11141
11211
  $$1.lodash.each(b, function (o, i) {
11142
11212
  _r7.push('<u' + (o.value ? ' class=_o data-value="' + o.value + '"' : '') + (o.forbid ? ' data-forbid' : '') + '>' + o.text + '</u>');
11143
11213
 
11144
- if (!_this79.x.multiple) return false;
11214
+ if (!_this81.x.multiple) return false;
11145
11215
 
11146
11216
  _r7.push('<i>' + p + '</i>');
11147
11217
  });
@@ -11149,7 +11219,7 @@ var script$3 = {
11149
11219
  }
11150
11220
  },
11151
11221
  html_var: function html_var() {
11152
- var _this80 = this;
11222
+ var _this82 = this;
11153
11223
 
11154
11224
  return h$1('div', {
11155
11225
  class: 'w-linkbox-input f-flex-1',
@@ -11157,18 +11227,19 @@ var script$3 = {
11157
11227
  id: this.uid + 't',
11158
11228
  contentEditable: this.isNormal,
11159
11229
  onkeyup: this.onkeyup,
11230
+ onkeydown: this.onkeydown,
11160
11231
  onclick: this.onclick,
11161
11232
  ondblclick: this.ondblclick,
11162
11233
  onfocus: function onfocus(e) {
11163
- _this80.isFocus = true;
11234
+ _this82.isFocus = true;
11164
11235
  },
11165
11236
  onblur: function onblur(e) {
11166
- _this80.isFocus = false;
11237
+ _this82.isFocus = false;
11167
11238
  }
11168
11239
  });
11169
11240
  },
11170
11241
  html_input: function html_input() {
11171
- var _this81 = this;
11242
+ var _this83 = this;
11172
11243
 
11173
11244
  var p = this.input_placeholder;
11174
11245
  return [this.html_input_hidden(), this.html_var(), h$1('div', {
@@ -11182,14 +11253,14 @@ var script$3 = {
11182
11253
  autoHide: true,
11183
11254
  snap: {
11184
11255
  target: function target() {
11185
- return _this81.el('main');
11256
+ return _this83.el('main');
11186
11257
  },
11187
11258
  position: 'v',
11188
11259
  indent: 1
11189
11260
  },
11190
11261
  on: {
11191
11262
  close: function close() {
11192
- return _this81.showSuggest = false;
11263
+ return _this83.showSuggest = false;
11193
11264
  }
11194
11265
  }
11195
11266
  }, this.$slots)];
@@ -11218,12 +11289,12 @@ var script$3 = {
11218
11289
  },
11219
11290
  computed: {
11220
11291
  validHooks: function validHooks() {
11221
- var _this82 = this;
11292
+ var _this84 = this;
11222
11293
 
11223
11294
  return {
11224
11295
  valid: function valid(v) {
11225
- if (_this82.x.strict && $$1.q('u:not([data-value])').length > 0) {
11226
- return _this82.formErr('invalid_option');
11296
+ if (_this84.x.strict && $$1.q('u:not([data-value])').length > 0) {
11297
+ return _this84.formErr('invalid_option');
11227
11298
  }
11228
11299
  }
11229
11300
  };
@@ -11251,15 +11322,15 @@ var script$3 = {
11251
11322
  }
11252
11323
  },
11253
11324
  mounted: function mounted() {
11254
- var _this83 = this;
11325
+ var _this85 = this;
11255
11326
 
11256
11327
  if (this.isEntity) {
11257
11328
  this.initOptions();
11258
11329
  this.inp().addEventListener('compositionstart', function () {
11259
- _this83.imeMode = true;
11330
+ _this85.imeMode = true;
11260
11331
  });
11261
11332
  this.inp().addEventListener('compositionend', function () {
11262
- _this83.imeMode = false;
11333
+ _this85.imeMode = false;
11263
11334
  });
11264
11335
  }
11265
11336
  }
@@ -11375,7 +11446,7 @@ var script$1 = {
11375
11446
  this.setThumbLeft();
11376
11447
  },
11377
11448
  error: function error(text, timeout, fn) {
11378
- var _this84 = this;
11449
+ var _this86 = this;
11379
11450
 
11380
11451
  if (!text) text = '';
11381
11452
  this.isError = true;
@@ -11387,12 +11458,12 @@ var script$1 = {
11387
11458
  this.text = text + "(".concat(timeout / 1000, ")");
11388
11459
  var timer = setInterval(function () {
11389
11460
  timeout -= 1000;
11390
- _this84.text = text + "(".concat(timeout / 1000, ")");
11461
+ _this86.text = text + "(".concat(timeout / 1000, ")");
11391
11462
 
11392
11463
  if (timeout <= 0) {
11393
11464
  clearInterval(timer);
11394
11465
 
11395
- _this84.reset();
11466
+ _this86.reset();
11396
11467
 
11397
11468
  fn && fn();
11398
11469
  }
@@ -11428,7 +11499,7 @@ var script$1 = {
11428
11499
  $$1.close(this.dropper);
11429
11500
  },
11430
11501
  dragstart: function dragstart(e) {
11431
- var _this85 = this;
11502
+ var _this87 = this;
11432
11503
 
11433
11504
  if (!this.isNormal || this.locked) return;
11434
11505
  this.warn(false);
@@ -11443,16 +11514,16 @@ var script$1 = {
11443
11514
  var c = $$1.eventX(e);
11444
11515
  var l = $$1.numRange(f + c - x, 0, w - g);
11445
11516
  a.style.left = l + 'px';
11446
- _this85.$refs.track.style.width = l + g + 'px';
11447
- _this85.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
11517
+ _this87.$refs.track.style.width = l + g + 'px';
11518
+ _this87.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
11448
11519
 
11449
- _this85.el().classList.add('z-drag');
11520
+ _this87.el().classList.add('z-drag');
11450
11521
  }, function (e) {
11451
11522
  a.dispatchEvent(new Event('drop'));
11452
11523
  }, e);
11453
11524
  },
11454
11525
  mouseenter: function mouseenter(e) {
11455
- var _this86 = this;
11526
+ var _this88 = this;
11456
11527
 
11457
11528
  if (this.dropper || !this.x.big || this.isSuccess || this.locked) return;
11458
11529
  this.warn(false);
@@ -11470,13 +11541,13 @@ var script$1 = {
11470
11541
  context: this,
11471
11542
  snap: {
11472
11543
  target: function target() {
11473
- return _this86.el('main');
11544
+ return _this88.el('main');
11474
11545
  },
11475
11546
  position: 'v'
11476
11547
  },
11477
11548
  on: {
11478
11549
  close: function close() {
11479
- return _this86.dropper = null;
11550
+ return _this88.dropper = null;
11480
11551
  }
11481
11552
  }
11482
11553
  });
@@ -11519,12 +11590,12 @@ var script$1 = {
11519
11590
  },
11520
11591
  computed: {
11521
11592
  validHooks: function validHooks() {
11522
- var _this87 = this;
11593
+ var _this89 = this;
11523
11594
 
11524
11595
  return {
11525
11596
  valid: function valid(v) {
11526
- if (!_this87.isSuccess) {
11527
- return _this87.formErr('jigsaw_required');
11597
+ if (!_this89.isSuccess) {
11598
+ return _this89.formErr('jigsaw_required');
11528
11599
  }
11529
11600
  }
11530
11601
  };