dfish-widget 0.1.358 → 0.1.362

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}个)',
@@ -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', 'minWidth', 'minHeight', 'maxWidth', 'maxHeight', 'colspan', 'rowspan', 'on', 'tip', 'ownproperty', 'orientUid', 'templateWrapper', 'preloadWrapper'],
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);
@@ -2452,10 +2451,6 @@ var script$1m = {
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
- minWidth: this.x.minWidth && $$1.unitSize(this.x.minWidth),
2456
- minHeight: this.x.minHeight && $$1.unitSize(this.x.minHeight),
2457
- maxWidth: this.x.maxWidth && $$1.unitSize(this.x.maxWidth),
2458
- maxHeight: this.x.maxHeight && $$1.unitSize(this.x.maxHeight),
2459
2454
  '--w-grid-colspan': !this.x.colspan || this.x.colspan == -1 ? null : "span ".concat(this.x.colspan),
2460
2455
  '--w-grid-rowspan': !this.x.rowspan || this.x.rowspan == -1 ? null : "span ".concat(this.x.rowspan)
2461
2456
  }, this.html_style, this.x.style]
@@ -3965,7 +3960,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
3965
3960
 
3966
3961
  var _component_w_option = resolveComponent("w-option");
3967
3962
 
3968
- var _component_w_picker = resolveComponent("w-picker");
3963
+ var _component_w_slidepicker = resolveComponent("w-slidepicker");
3969
3964
 
3970
3965
  var _component_w_vertical = resolveComponent("w-vertical");
3971
3966
 
@@ -4021,7 +4016,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4021
4016
  _: 1
4022
4017
  /* STABLE */
4023
4018
 
4024
- }), createVNode(_component_w_picker, {
4019
+ }), createVNode(_component_w_slidepicker, {
4025
4020
  height: "*",
4026
4021
  modelValue: $data.focusYear,
4027
4022
  "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
@@ -4073,7 +4068,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4073
4068
  _: 1
4074
4069
  /* STABLE */
4075
4070
 
4076
- }), createVNode(_component_w_picker, {
4071
+ }), createVNode(_component_w_slidepicker, {
4077
4072
  height: "*",
4078
4073
  modelValue: $data.focusMonth,
4079
4074
  "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
@@ -4125,7 +4120,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4125
4120
  _: 1
4126
4121
  /* STABLE */
4127
4122
 
4128
- }), createVNode(_component_w_picker, {
4123
+ }), createVNode(_component_w_slidepicker, {
4129
4124
  height: "*",
4130
4125
  modelValue: $data.focusDate,
4131
4126
  "onUpdate:modelValue": _cache[3] || (_cache[3] = function ($event) {
@@ -4177,7 +4172,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4177
4172
  _: 1
4178
4173
  /* STABLE */
4179
4174
 
4180
- }), createVNode(_component_w_picker, {
4175
+ }), createVNode(_component_w_slidepicker, {
4181
4176
  height: "*",
4182
4177
  modelValue: $data.focusHour,
4183
4178
  "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
@@ -4226,7 +4221,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4226
4221
  _: 1
4227
4222
  /* STABLE */
4228
4223
 
4229
- }), createVNode(_component_w_picker, {
4224
+ }), createVNode(_component_w_slidepicker, {
4230
4225
  height: "*",
4231
4226
  modelValue: $data.focusMinute,
4232
4227
  "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) {
@@ -4275,7 +4270,7 @@ function render$6(_ctx, _cache, $props, $setup, $data, $options) {
4275
4270
  _: 1
4276
4271
  /* STABLE */
4277
4272
 
4278
- }), createVNode(_component_w_picker, {
4273
+ }), createVNode(_component_w_slidepicker, {
4279
4274
  height: "*",
4280
4275
  modelValue: $data.focusSecond,
4281
4276
  "onUpdate:modelValue": _cache[6] || (_cache[6] = function ($event) {
@@ -4372,7 +4367,7 @@ var script$16 = {
4372
4367
  template: script$17,
4373
4368
  width: '100%',
4374
4369
  height: '55%',
4375
- position: 'bottom',
4370
+ position: 'b',
4376
4371
  cover: true,
4377
4372
  autoHide: true,
4378
4373
  data: dateOptions
@@ -6470,6 +6465,7 @@ var script$z = {
6470
6465
  },
6471
6466
  focus: function focus() {
6472
6467
  this.$refs.v.focus();
6468
+ return this;
6473
6469
  },
6474
6470
  formText: function formText() {
6475
6471
  var t = this.val();
@@ -8504,7 +8500,7 @@ var script$o = {
8504
8500
  };
8505
8501
  script$o.__file = "src/widgets/TimelineItem.vue";
8506
8502
  var script$n = {
8507
- name: 'w-picker',
8503
+ name: 'w-slidepicker',
8508
8504
  mixins: [script$1j],
8509
8505
  props: ['optionHeight', 'modelValue', 'minValue', 'maxValue', 'keepIndex'],
8510
8506
  emits: ['update:modelValue', 'change', 'scroll:top', 'scroll:bottom'],
@@ -8703,17 +8699,17 @@ var script$n = {
8703
8699
  };
8704
8700
  var _hoisted_1$2 = {
8705
8701
  ref: "options",
8706
- class: "w-picker-options"
8702
+ class: "w-slidepicker-options"
8707
8703
  };
8708
8704
 
8709
8705
  var _hoisted_2$1 = /*#__PURE__*/createVNode("div", {
8710
- class: "w-picker-bg-top"
8706
+ class: "w-slidepicker-bg-top"
8711
8707
  }, null, -1
8712
8708
  /* HOISTED */
8713
8709
  );
8714
8710
 
8715
8711
  var _hoisted_3$1 = /*#__PURE__*/createVNode("div", {
8716
- class: "w-picker-bg-bottom"
8712
+ class: "w-slidepicker-bg-bottom"
8717
8713
  }, null, -1
8718
8714
  /* HOISTED */
8719
8715
  );
@@ -8729,7 +8725,7 @@ function render$3(_ctx, _cache, $props, $setup, $data, $options) {
8729
8725
  }
8730
8726
 
8731
8727
  script$n.render = render$3;
8732
- script$n.__file = "src/widgets/Picker.vue";
8728
+ script$n.__file = "src/widgets/SlidePicker.vue";
8733
8729
  var script$m = {
8734
8730
  name: 'w-hidden',
8735
8731
  mixins: [script$z],
@@ -9666,6 +9662,34 @@ var script$f = {
9666
9662
  }
9667
9663
  },
9668
9664
  computed: {
9665
+ validHooks: function validHooks() {
9666
+ var _this57 = this;
9667
+
9668
+ return {
9669
+ valid: function valid(v) {
9670
+ var _iterator5 = _createForOfIteratorHelper(_this57.list),
9671
+ _step5;
9672
+
9673
+ try {
9674
+ for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
9675
+ var item = _step5.value;
9676
+
9677
+ if (item.loading) {
9678
+ return _this57.formErr('upload_loading');
9679
+ }
9680
+
9681
+ if (item.error) {
9682
+ return _this57.formErr('upload_invalid_file');
9683
+ }
9684
+ }
9685
+ } catch (err) {
9686
+ _iterator5.e(err);
9687
+ } finally {
9688
+ _iterator5.f();
9689
+ }
9690
+ }
9691
+ };
9692
+ },
9669
9693
  input_value: function input_value() {
9670
9694
  var v = this.val();
9671
9695
  return v.length == 0 ? '' : JSON.stringify(v);
@@ -9684,11 +9708,11 @@ var script$f = {
9684
9708
  };
9685
9709
  },
9686
9710
  html_on: function html_on() {
9687
- var _this57 = this;
9711
+ var _this58 = this;
9688
9712
 
9689
9713
  return {
9690
9714
  onclick: function onclick() {
9691
- return _this57.warn(false);
9715
+ return _this58.warn(false);
9692
9716
  }
9693
9717
  };
9694
9718
  }
@@ -9708,30 +9732,30 @@ var script$e = {
9708
9732
  this.provideUpload.clickItem(e, this.item);
9709
9733
  },
9710
9734
  createImageThumbnail: function createImageThumbnail() {
9711
- var _this58 = this;
9735
+ var _this59 = this;
9712
9736
 
9713
9737
  var r = new FileReader();
9714
9738
 
9715
9739
  r.onload = function (e) {
9716
- if (_this58.item.loaded) return;
9717
- _this58.dataURL = e.target.result;
9740
+ if (_this59.item.loaded) return;
9741
+ _this59.dataURL = e.target.result;
9718
9742
  };
9719
9743
 
9720
9744
  r.readAsDataURL(this.item.file);
9721
9745
  },
9722
9746
  createVideoThumbnail: function createVideoThumbnail() {
9723
- var _this59 = this;
9747
+ var _this60 = this;
9724
9748
 
9725
9749
  var video = document.createElement('video');
9726
9750
  video.addEventListener('loadeddata', function () {
9727
9751
  setTimeout(function () {
9728
- if (_this59.item.loaded) return;
9752
+ if (_this60.item.loaded) return;
9729
9753
  var cvs = document.createElement('canvas');
9730
9754
  var ctx = cvs.getContext('2d');
9731
9755
  cvs.width = video.videoWidth;
9732
9756
  cvs.height = video.videoHeight;
9733
9757
  ctx.drawImage(video, 0, 0);
9734
- _this59.dataURL = cvs.toDataURL('image/png');
9758
+ _this60.dataURL = cvs.toDataURL('image/png');
9735
9759
  video.pause();
9736
9760
  $$1.q(video).remove();
9737
9761
  }, 150);
@@ -9786,14 +9810,14 @@ var script$e = {
9786
9810
  }
9787
9811
  },
9788
9812
  mounted: function mounted() {
9789
- var _this60 = this;
9813
+ var _this61 = this;
9790
9814
 
9791
9815
  if (!this.item.loaded && this.item.file) {
9792
9816
  this.upload.isVideo(this.item) ? this.createVideoThumbnail() : this.upload.isImage(this.item) ? this.createImageThumbnail() : null;
9793
9817
  this.$watch(function () {
9794
- return _this60.item.progress;
9818
+ return _this61.item.progress;
9795
9819
  }, function (v) {
9796
- return _this60.setProgress(v);
9820
+ return _this61.setProgress(v);
9797
9821
  }, {
9798
9822
  immediate: true
9799
9823
  });
@@ -9890,7 +9914,7 @@ var script$d = {
9890
9914
  });
9891
9915
  },
9892
9916
  html_input_button: function html_input_button() {
9893
- var _this61 = this;
9917
+ var _this62 = this;
9894
9918
 
9895
9919
  return h$1(script$I, {
9896
9920
  ref: 'uploadbbr',
@@ -9898,16 +9922,16 @@ var script$d = {
9898
9922
  gap: 10
9899
9923
  }, {
9900
9924
  default: function _default() {
9901
- return [_this61.$slots.button ? _this61.$slots.button() : h$1(script$$, {
9925
+ return [_this62.$slots.button ? _this62.$slots.button() : h$1(script$$, {
9902
9926
  ref: 'uploadbutton',
9903
9927
  title: $$1.loc.form.choose_image,
9904
9928
  icon: '.f-i .f-i-plus',
9905
9929
  class: 'w-mediaupload-button',
9906
9930
  style: {
9907
- width: $$1.unitSize(_this61.x.thumbnailWidth),
9908
- height: $$1.unitSize(_this61.x.thumbnailHeight)
9931
+ width: $$1.unitSize(_this62.x.thumbnailWidth),
9932
+ height: $$1.unitSize(_this62.x.thumbnailHeight)
9909
9933
  },
9910
- onclick: _this61.chooseFile
9934
+ onclick: _this62.chooseFile
9911
9935
  })];
9912
9936
  }
9913
9937
  });
@@ -10089,7 +10113,7 @@ var script$a = {
10089
10113
  return this.$refs.btns && this.$refs.btns.contains(el);
10090
10114
  },
10091
10115
  html_button: function html_button() {
10092
- var _this62 = this;
10116
+ var _this63 = this;
10093
10117
 
10094
10118
  return h$1('div', {
10095
10119
  class: 'w-spinner-step w-input-bbr f-flex-column f-oh',
@@ -10098,14 +10122,14 @@ var script$a = {
10098
10122
  class: 'w-spinner-step-btn f-rel',
10099
10123
  disabled: this.x.disabled,
10100
10124
  onclick: function onclick(e) {
10101
- return _this62.stepBy(1);
10125
+ return _this63.stepBy(1);
10102
10126
  },
10103
10127
  innerHTML: '<i class="f-abs-center f-i f-i-caret-up"></i>'
10104
10128
  }), h$1('button', {
10105
10129
  class: 'w-spinner-step-btn f-rel',
10106
10130
  disabled: this.x.disabled,
10107
10131
  onclick: function onclick(e) {
10108
- return _this62.stepBy(-1);
10132
+ return _this63.stepBy(-1);
10109
10133
  },
10110
10134
  innerHTML: '<i class="f-abs-center f-i f-i-caret-down"></i>'
10111
10135
  })]);
@@ -10113,24 +10137,24 @@ var script$a = {
10113
10137
  },
10114
10138
  computed: {
10115
10139
  validHooks: function validHooks() {
10116
- var _this63 = this;
10140
+ var _this64 = this;
10117
10141
 
10118
10142
  return {
10119
10143
  compare: function compare(v, c, d) {
10120
- return !$$1.eval('v' + (_this63.x.compare.mode || '==') + 'd', {
10144
+ return !$$1.eval('v' + (_this64.x.compare.mode || '==') + 'd', {
10121
10145
  v: v,
10122
10146
  d: d
10123
10147
  });
10124
10148
  },
10125
10149
  valid: function valid(v) {
10126
- _this63.x.format && (v = v.replace(RegExp(_this63.x.format.separator || ',', 'g'), ''));
10150
+ _this64.x.format && (v = v.replace(RegExp(_this64.x.format.separator || ',', 'g'), ''));
10127
10151
 
10128
10152
  if (v) {
10129
- if (isNaN(v) || /\s/.test(v)) return _this63.formErr('number_invalid');
10130
- var d = _this63.x.decimal;
10131
- if (!d && ~v.indexOf('.')) return _this63.formErr('number_integer');
10132
- if (d && d > 0 && $$1.strFrom(v, '.').length > d) return _this63.formErr('number_decimal_digit', [d]);
10133
- if (_this63.provideRangeParent) return _this63.provideRangeParent.validHooks.valid();
10153
+ if (isNaN(v) || /\s/.test(v)) return _this64.formErr('number_invalid');
10154
+ var d = _this64.x.decimal;
10155
+ if (!d && ~v.indexOf('.')) return _this64.formErr('number_integer');
10156
+ if (d && d > 0 && $$1.strFrom(v, '.').length > d) return _this64.formErr('number_decimal_digit', [d]);
10157
+ if (_this64.provideRangeParent) return _this64.provideRangeParent.validHooks.valid();
10134
10158
  }
10135
10159
  }
10136
10160
  };
@@ -10201,7 +10225,7 @@ var script$9 = {
10201
10225
  };
10202
10226
  },
10203
10227
  html_button: function html_button() {
10204
- var _this64 = this;
10228
+ var _this65 = this;
10205
10229
 
10206
10230
  var r = [];
10207
10231
  if (!this.x.noButton) r.push(h$1('button', {
@@ -10218,28 +10242,28 @@ var script$9 = {
10218
10242
  autoHide: true,
10219
10243
  snap: {
10220
10244
  target: function target() {
10221
- return _this64.snapElem();
10245
+ return _this65.snapElem();
10222
10246
  },
10223
10247
  position: 'v',
10224
10248
  indent: 1
10225
10249
  },
10226
10250
  on: {
10227
10251
  close: function close() {
10228
- _this64.showDrop = false, _this64.currentDate = null;
10252
+ _this65.showDrop = false, _this65.currentDate = null;
10229
10253
  }
10230
10254
  }
10231
10255
  }, {
10232
10256
  default: function _default() {
10233
10257
  return h$1(script$q, _objectSpread(_objectSpread({
10234
10258
  pad: true,
10235
- current: _this64.currentDate || _this64.x.modelValue || '',
10236
- value: _this64.x.modelValue,
10237
- format: _this64.x.format
10238
- }, _this64.getPeriod()), {}, {
10239
- success: _this64.calendarCallback,
10259
+ current: _this65.currentDate || _this65.x.modelValue || '',
10260
+ value: _this65.x.modelValue,
10261
+ format: _this65.x.format
10262
+ }, _this65.getPeriod()), {}, {
10263
+ success: _this65.calendarCallback,
10240
10264
  on: {
10241
10265
  'click:item': function clickItem(e, item) {
10242
- return _this64.currentDate = item.value;
10266
+ return _this65.currentDate = item.value;
10243
10267
  }
10244
10268
  }
10245
10269
  }));
@@ -10252,46 +10276,46 @@ var script$9 = {
10252
10276
  },
10253
10277
  computed: {
10254
10278
  validHooks: function validHooks() {
10255
- var _this65 = this;
10279
+ var _this66 = this;
10256
10280
 
10257
10281
  return {
10258
10282
  minValue: function minValue(v) {
10259
- return $$1.dateParse(v, _this65.x.format) < $$1.dateParse(_this65.vv('minValue'), _this65.x.format);
10283
+ return $$1.dateParse(v, _this66.x.format) < $$1.dateParse(_this66.vv('minValue'), _this66.x.format);
10260
10284
  },
10261
10285
  maxValue: function maxValue(v) {
10262
- return $$1.dateParse(v, _this65.x.format) > $$1.dateParse(_this65.vv('maxValue'), _this65.x.format);
10286
+ return $$1.dateParse(v, _this66.x.format) > $$1.dateParse(_this66.vv('maxValue'), _this66.x.format);
10263
10287
  },
10264
10288
  compare: function compare(v, c, d) {
10265
- if (_this65.x.format && c.x.format) {
10266
- var f = (_this65.x.format.length > c.x.format.length ? _this65 : c).x.format;
10267
- v = $$1.dateFormat($$1.dateParse(v, _this65.x.format), f);
10289
+ if (_this66.x.format && c.x.format) {
10290
+ var f = (_this66.x.format.length > c.x.format.length ? _this66 : c).x.format;
10291
+ v = $$1.dateFormat($$1.dateParse(v, _this66.x.format), f);
10268
10292
  d = $$1.dateFormat($$1.dateParse(d, c.x.format), f);
10269
10293
  }
10270
10294
 
10271
- return !$$1.eval('v' + (_this65.x.compare.mode || '==') + 'd', {
10295
+ return !$$1.eval('v' + (_this66.x.compare.mode || '==') + 'd', {
10272
10296
  v: v,
10273
10297
  d: d
10274
10298
  });
10275
10299
  },
10276
10300
  valid: function valid(v) {
10277
- if (_this65.x.multiple) return;
10301
+ if (_this66.x.multiple) return;
10278
10302
 
10279
10303
  if (v) {
10280
10304
  var _c4 = v;
10281
- var d = $$1.dateParse(_c4, _this65.x.format);
10305
+ var d = $$1.dateParse(_c4, _this66.x.format);
10282
10306
  var y = d.getFullYear();
10283
10307
  var m = 9999;
10284
10308
  var n = 1000;
10285
- if (y > m || y < n) return _this65.formErr('time_exceed', [n, m]);
10309
+ if (y > m || y < n) return _this66.formErr('time_exceed', [n, m]);
10286
10310
 
10287
- if (_c4 != $$1.dateFormat(d, _this65.x.format)) {
10288
- return _this65.formErr('time_format', [$$1.dateFormat(d, _this65.x.format)]);
10311
+ if (_c4 != $$1.dateFormat(d, _this66.x.format)) {
10312
+ return _this66.formErr('time_format', [$$1.dateFormat(d, _this66.x.format)]);
10289
10313
  }
10290
10314
  }
10291
10315
 
10292
- if (_this65.vv('beforeNow') && v && v > $$1.dateFormat(new Date(), _this65.x.format)) return _this65.formErr('beforeNow', [_this65.x.beforeNow]);
10293
- if (_this65.vv('afterNow') && v && v < $$1.dateFormat(new Date(), _this65.x.format)) return _this65.formErr('afterNow', [_this65.x.afterNow]);
10294
- if (_this65.provideRangeParent) return _this65.provideRangeParent.validHooks.valid();
10316
+ if (_this66.vv('beforeNow') && v && v > $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('beforeNow', [_this66.x.beforeNow]);
10317
+ if (_this66.vv('afterNow') && v && v < $$1.dateFormat(new Date(), _this66.x.format)) return _this66.formErr('afterNow', [_this66.x.afterNow]);
10318
+ if (_this66.provideRangeParent) return _this66.provideRangeParent.validHooks.valid();
10295
10319
  }
10296
10320
  };
10297
10321
  },
@@ -10339,7 +10363,7 @@ var script$8 = {
10339
10363
  return this.input_text;
10340
10364
  },
10341
10365
  html_input: function html_input() {
10342
- var _this66 = this;
10366
+ var _this67 = this;
10343
10367
 
10344
10368
  var t = this.input_text;
10345
10369
  var p = this.input_placeholder;
@@ -10358,14 +10382,14 @@ var script$8 = {
10358
10382
  autoHide: true,
10359
10383
  snap: {
10360
10384
  target: function target() {
10361
- return _this66.el('main');
10385
+ return _this67.el('main');
10362
10386
  },
10363
10387
  position: 'v',
10364
10388
  indent: 1
10365
10389
  },
10366
10390
  on: {
10367
10391
  close: function close() {
10368
- return _this66.showDrop = false;
10392
+ return _this67.showDrop = false;
10369
10393
  }
10370
10394
  }
10371
10395
  }, this.$slots)];
@@ -10379,7 +10403,7 @@ var script$8 = {
10379
10403
  },
10380
10404
  computed: {
10381
10405
  input_text: function input_text() {
10382
- var _this67 = this;
10406
+ var _this68 = this;
10383
10407
 
10384
10408
  var r = [];
10385
10409
  var s = this.slots_children();
@@ -10389,7 +10413,7 @@ var script$8 = {
10389
10413
  return n.props.value == v;
10390
10414
  });
10391
10415
  if (i > -1) r.push(i);
10392
- if (!_this67.x.multiple) return false;
10416
+ if (!_this68.x.multiple) return false;
10393
10417
  });
10394
10418
  return r.sort().map(function (v) {
10395
10419
  return s[v].props.text;
@@ -10510,24 +10534,27 @@ var script$5 = {
10510
10534
  },
10511
10535
  computed: {
10512
10536
  validHooks: function validHooks() {
10513
- var _this68 = this;
10537
+ var _this69 = this;
10514
10538
 
10515
10539
  return {
10516
10540
  valid: function valid() {
10517
- var f = _this68.forms();
10541
+ var f = _this69.forms();
10518
10542
 
10519
10543
  if (f.length > 1) {
10520
10544
  var v1 = f[0] && f[0].formVal();
10521
10545
  var v2 = f[1] && f[1].formVal();
10522
10546
 
10523
- var _c5 = _this68.x.compare || '<=';
10547
+ var _c5 = _this69.x.compare || '<=';
10548
+
10549
+ if (!isNaN(v1)) v1 = parseFloat(v1);
10550
+ if (!isNaN(v2)) v2 = parseFloat(v2);
10524
10551
 
10525
10552
  if (v1 && v2) {
10526
10553
  if (!$$1.eval("v1 ".concat(_c5, " v2"), {
10527
10554
  v1: v1,
10528
10555
  v2: v2
10529
10556
  })) {
10530
- return _this68.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
10557
+ return _this69.formErr('compare', [f[0].getLabelText(), _c5, f[1].getLabelText()]);
10531
10558
  }
10532
10559
  }
10533
10560
  }
@@ -10535,11 +10562,11 @@ var script$5 = {
10535
10562
  };
10536
10563
  },
10537
10564
  html_on: function html_on() {
10538
- var _this69 = this;
10565
+ var _this70 = this;
10539
10566
 
10540
10567
  return {
10541
10568
  onclick: function onclick(e) {
10542
- return _this69.warnClass = '';
10569
+ return _this70.warnClass = '';
10543
10570
  }
10544
10571
  };
10545
10572
  }
@@ -10580,9 +10607,19 @@ var script$4 = {
10580
10607
  this.addVal(v);
10581
10608
  this.clear();
10582
10609
  this.$nextTick(this.focus);
10610
+ return this;
10611
+ },
10612
+ closeDrop: function closeDrop() {
10613
+ this.suggest(false);
10614
+ return this;
10583
10615
  },
10584
10616
  suggest: function suggest(a) {
10585
10617
  a = a == null ? true : a;
10618
+
10619
+ if (a === false) {
10620
+ clearTimeout(this.sug_timer);
10621
+ }
10622
+
10586
10623
  this.showSuggest = a;
10587
10624
  this.warn(false);
10588
10625
  },
@@ -10592,9 +10629,10 @@ var script$4 = {
10592
10629
  focus: function focus() {
10593
10630
  this.$refs.input.focus();
10594
10631
  this.warn(false);
10632
+ return this;
10595
10633
  },
10596
10634
  oninput: function oninput(e) {
10597
- var _this70 = this;
10635
+ var _this71 = this;
10598
10636
 
10599
10637
  var v = e.target.value;
10600
10638
  this.sensor_text = v;
@@ -10604,9 +10642,9 @@ var script$4 = {
10604
10642
  this.suggest(false);
10605
10643
  } else {
10606
10644
  this.sug_timer = setTimeout(function () {
10607
- _this70.suggest(true);
10645
+ _this71.suggest(true);
10608
10646
 
10609
- _this70.trigger(e, v);
10647
+ _this71.trigger(e, v);
10610
10648
  }, 500);
10611
10649
  }
10612
10650
  },
@@ -10619,7 +10657,9 @@ var script$4 = {
10619
10657
  var mv = $$1.array(this.x.modelValue, true);
10620
10658
  mv.length && mv.splice(mv.length - 1, 1);
10621
10659
  }
10622
- }
10660
+ } //38: up, 40:down
10661
+ //if (this.showSuggest && (k == 38 || k == 40)) e.preventDefault()
10662
+
10623
10663
  },
10624
10664
  clickItem: function clickItem(e, item) {
10625
10665
  e.stopPropagation();
@@ -10653,7 +10693,7 @@ var script$4 = {
10653
10693
  return this.input_title;
10654
10694
  },
10655
10695
  html_options: function html_options() {
10656
- var _this71 = this;
10696
+ var _this72 = this;
10657
10697
 
10658
10698
  var m = this.x.modelValue;
10659
10699
 
@@ -10664,22 +10704,22 @@ var script$4 = {
10664
10704
  'z-forbid': v.forbid
10665
10705
  }],
10666
10706
  onclick: function onclick(e) {
10667
- return _this71.clickItem(e, v);
10707
+ return _this72.clickItem(e, v);
10668
10708
  }
10669
10709
  }, [h$1('div', {
10670
10710
  class: 'w-combobox-option-text f-line-1',
10671
10711
  title: v.text
10672
- }, v.text), _this71.isNormal && h$1('div', {
10712
+ }, v.text), _this72.isNormal && h$1('div', {
10673
10713
  class: 'w-combobox-option-close f-i f-i-close',
10674
10714
  onclick: function onclick(e) {
10675
- return _this71.clickClose(e, v);
10715
+ return _this72.clickClose(e, v);
10676
10716
  }
10677
10717
  })]);
10678
10718
  });
10679
10719
  }
10680
10720
  },
10681
10721
  html_var: function html_var() {
10682
- var _this72 = this;
10722
+ var _this73 = this;
10683
10723
 
10684
10724
  return h$1('div', {
10685
10725
  class: 'w-combobox-input-wrap'
@@ -10696,15 +10736,15 @@ var script$4 = {
10696
10736
  onkeydown: this.onkeydown,
10697
10737
  placeholder: this.input_value ? null : this.input_placeholder,
10698
10738
  onfocus: function onfocus(e) {
10699
- _this72.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
10739
+ _this73.isFocus = true, e.target.value && e.target.dispatchEvent(new Event('input'));
10700
10740
  },
10701
10741
  onblur: function onblur(e) {
10702
- return _this72.isFocus = false;
10742
+ return _this73.isFocus = false;
10703
10743
  }
10704
10744
  })]);
10705
10745
  },
10706
10746
  html_input: function html_input() {
10707
- var _this73 = this;
10747
+ var _this74 = this;
10708
10748
 
10709
10749
  return [this.html_input_hidden(), h$1('div', {
10710
10750
  class: 'w-combobox-list f-flex-1 f-flex f-oh f-height'
@@ -10717,14 +10757,14 @@ var script$4 = {
10717
10757
  autoHide: true,
10718
10758
  snap: {
10719
10759
  target: function target() {
10720
- return _this73.el('main');
10760
+ return _this74.el('main');
10721
10761
  },
10722
10762
  position: 'v',
10723
10763
  indent: 1
10724
10764
  },
10725
10765
  on: {
10726
10766
  close: function close() {
10727
- return _this73.showSuggest = false;
10767
+ return _this74.showSuggest = false;
10728
10768
  }
10729
10769
  }
10730
10770
  }, this.$slots))];
@@ -10752,6 +10792,15 @@ var script$4 = {
10752
10792
  }
10753
10793
  },
10754
10794
  computed: {
10795
+ validHooks: function validHooks() {
10796
+ var _this75 = this;
10797
+
10798
+ return {
10799
+ valid: function valid(v) {
10800
+ if (_this75.$refs.input.value) return _this75.formErr('invalid_option');
10801
+ }
10802
+ };
10803
+ },
10755
10804
  input_value: function input_value() {
10756
10805
  return typeof this.x.modelValue === 'string' ? this.x.modelValue : $$1.array(this.x.modelValue).map(function (v) {
10757
10806
  return v.value;
@@ -10774,12 +10823,12 @@ var script$4 = {
10774
10823
  }
10775
10824
  },
10776
10825
  mounted: function mounted() {
10777
- var _this74 = this;
10826
+ var _this76 = this;
10778
10827
 
10779
10828
  if (this.isEntity && this.$refs.sensor) {
10780
10829
  new ResizeObserver(function () {
10781
- if (_this74.$refs.sensor) {
10782
- _this74.sensor_width = _this74.$refs.sensor.offsetWidth + 'px';
10830
+ if (_this76.$refs.sensor) {
10831
+ _this76.sensor_width = _this76.$refs.sensor.offsetWidth + 'px';
10783
10832
  }
10784
10833
  }).observe(this.$refs.sensor);
10785
10834
  }
@@ -10792,13 +10841,13 @@ var script$3 = {
10792
10841
  emits: ['input', 'dblclick:item'],
10793
10842
  props: ['multiple', 'picker', 'dropWidth', 'separator', 'strict', 'br'],
10794
10843
  created: function created() {
10795
- var _this75 = this;
10844
+ var _this77 = this;
10796
10845
 
10797
10846
  this.$watch(function () {
10798
- return _this75.x.modelValue;
10847
+ return _this77.x.modelValue;
10799
10848
  }, function (v) {
10800
- if (_this75.isEntity && !_this75.isFocus) {
10801
- _this75.initOptions(v);
10849
+ if (_this77.isEntity && !_this77.isFocus) {
10850
+ _this77.initOptions(v);
10802
10851
  }
10803
10852
  });
10804
10853
  },
@@ -10875,14 +10924,25 @@ var script$3 = {
10875
10924
  if (m.length > 1) m.eq(0).next('i').addBack().remove();
10876
10925
  this.save();
10877
10926
  }
10927
+
10928
+ return this;
10929
+ },
10930
+ closeDrop: function closeDrop() {
10931
+ this.suggest(false);
10932
+ return this;
10878
10933
  },
10879
10934
  suggest: function suggest(a) {
10880
10935
  a = a == null ? true : a;
10936
+
10937
+ if (a === false) {
10938
+ clearTimeout(this.sug_timer);
10939
+ }
10940
+
10881
10941
  this.showSuggest = a;
10882
10942
  this.warn(false);
10883
10943
  },
10884
10944
  input: function input(a) {
10885
- var _this76 = this;
10945
+ var _this78 = this;
10886
10946
 
10887
10947
  this.currOpt = a;
10888
10948
  var v = a.innerText.replace(/^[\s,]+|[\s,]+$/g, '');
@@ -10892,25 +10952,22 @@ var script$3 = {
10892
10952
  this.suggest(false);
10893
10953
  } else {
10894
10954
  this.sug_timer = setTimeout(function () {
10895
- _this76.suggest(true);
10955
+ _this78.suggest(true);
10896
10956
 
10897
- _this76.trigger(new Event('input'), v);
10957
+ _this78.trigger(new Event('input'), v);
10898
10958
  }, 500);
10899
10959
  }
10900
10960
  },
10901
- closePop: function closePop() {
10902
- clearTimeout(this.sug_timer);
10903
- this.suggest(false);
10904
- },
10905
10961
  focus: function focus() {
10906
10962
  this.$refs.inp.focus();
10907
10963
  this.warn(false);
10964
+ return this;
10908
10965
  },
10909
10966
  inp: function inp() {
10910
10967
  return this.$refs.inp;
10911
10968
  },
10912
10969
  fixStyle: function fixStyle() {
10913
- var _this77 = this;
10970
+ var _this79 = this;
10914
10971
 
10915
10972
  var c = $$1.rngElement();
10916
10973
  var g = false;
@@ -10941,7 +10998,7 @@ var script$3 = {
10941
10998
  $$1.q('br', inp).remove();
10942
10999
  if (c.firstChild) c = c.firstChild;else $$1.rngCursor(c);
10943
11000
  }
10944
- } else return this.closePop();
11001
+ } else return this.closeDrop();
10945
11002
  }
10946
11003
 
10947
11004
  $$1.q('br', inp).remove(); // 输入框内之只允许存在U和I两种标签。输入过程中浏览器可能会自动生成 <font> 标签,需要去除它
@@ -10985,7 +11042,7 @@ var script$3 = {
10985
11042
 
10986
11043
  t.split(p).forEach(function (s) {
10987
11044
  if (_h4 = $$1.strTrim(s)) {
10988
- g = _this77.param(_h4);
11045
+ g = _this79.param(_h4);
10989
11046
 
10990
11047
  _d.push('<u' + (g ? ' class=_o data-value="' + g.value + '"' + (g.forbid ? ' data-forbid' : '') : '') + '>' + _h4 + '</u>');
10991
11048
 
@@ -11010,7 +11067,7 @@ var script$3 = {
11010
11067
  m.length && (m.remove(), $$1.q('i + i, i:first-child', inp).remove()); // 删除重复数据
11011
11068
 
11012
11069
  g = true;
11013
- if ((c = $$1.rngElement()) && c.tagName === 'U' && !c.getAttribute('data-value')) this.input(c);else this.closePop();
11070
+ if ((c = $$1.rngElement()) && c.tagName === 'U' && !c.getAttribute('data-value')) this.input(c);else this.closeDrop();
11014
11071
  } else {
11015
11072
  if (t) {
11016
11073
  if ($$1.classAny(c, '_o') && !this.param(t)) {
@@ -11022,7 +11079,7 @@ var script$3 = {
11022
11079
  this.input(c);
11023
11080
  } else {
11024
11081
  g = true;
11025
- this.closePop();
11082
+ this.closeDrop();
11026
11083
  }
11027
11084
  }
11028
11085
 
@@ -11051,11 +11108,11 @@ var script$3 = {
11051
11108
  if (typeof c === 'function') c(this);else this.cmd(c, this.formVal());
11052
11109
  },
11053
11110
  addStore: function addStore(m) {
11054
- var _this78 = this;
11111
+ var _this80 = this;
11055
11112
 
11056
11113
  if (m && typeof m !== 'string') {
11057
11114
  var _r6 = $$1.array(m).filter(function (v) {
11058
- return !_this78.store.find(function (s) {
11115
+ return !_this80.store.find(function (s) {
11059
11116
  return s.value == v.value;
11060
11117
  });
11061
11118
  });
@@ -11092,6 +11149,13 @@ var script$3 = {
11092
11149
  this.$refs.v.value = r.join(',');
11093
11150
  this.val(m);
11094
11151
  },
11152
+ onkeydown: function onkeydown(e) {
11153
+ var k = e.keyCode;
11154
+
11155
+ if (k === 13) {
11156
+ e.preventDefault();
11157
+ }
11158
+ },
11095
11159
  onkeyup: function onkeyup(e) {
11096
11160
  if (!this.imeMode) {
11097
11161
  var k = this._KC = e.keyCode;
@@ -11099,7 +11163,6 @@ var script$3 = {
11099
11163
  if (k === 13 || k === 38 || k === 40 || k === 17) {
11100
11164
  // 38:up, 40:down, 17:ctrl
11101
11165
  e.stopPropagation();
11102
- if (k === 13) this.fixStyle();
11103
11166
  } else {
11104
11167
  this.fixStyle();
11105
11168
  }
@@ -11114,7 +11177,7 @@ var script$3 = {
11114
11177
  } else {
11115
11178
  var _c7 = $$1.rngElement();
11116
11179
 
11117
- _c7.tagName === 'U' ? this.input(_c7) : this.closePop();
11180
+ _c7.tagName === 'U' ? this.input(_c7) : this.closeDrop();
11118
11181
  }
11119
11182
  }
11120
11183
  },
@@ -11135,7 +11198,7 @@ var script$3 = {
11135
11198
  return this.input_title;
11136
11199
  },
11137
11200
  html_options: function html_options(v) {
11138
- var _this79 = this;
11201
+ var _this81 = this;
11139
11202
 
11140
11203
  var p = this.x.separator || ',';
11141
11204
  if (v == null) v = this.x.modelValue;
@@ -11146,7 +11209,7 @@ var script$3 = {
11146
11209
  $$1.lodash.each(b, function (o, i) {
11147
11210
  _r7.push('<u' + (o.value ? ' class=_o data-value="' + o.value + '"' : '') + (o.forbid ? ' data-forbid' : '') + '>' + o.text + '</u>');
11148
11211
 
11149
- if (!_this79.x.multiple) return false;
11212
+ if (!_this81.x.multiple) return false;
11150
11213
 
11151
11214
  _r7.push('<i>' + p + '</i>');
11152
11215
  });
@@ -11154,7 +11217,7 @@ var script$3 = {
11154
11217
  }
11155
11218
  },
11156
11219
  html_var: function html_var() {
11157
- var _this80 = this;
11220
+ var _this82 = this;
11158
11221
 
11159
11222
  return h$1('div', {
11160
11223
  class: 'w-linkbox-input f-flex-1',
@@ -11162,18 +11225,19 @@ var script$3 = {
11162
11225
  id: this.uid + 't',
11163
11226
  contentEditable: this.isNormal,
11164
11227
  onkeyup: this.onkeyup,
11228
+ onkeydown: this.onkeydown,
11165
11229
  onclick: this.onclick,
11166
11230
  ondblclick: this.ondblclick,
11167
11231
  onfocus: function onfocus(e) {
11168
- _this80.isFocus = true;
11232
+ _this82.isFocus = true;
11169
11233
  },
11170
11234
  onblur: function onblur(e) {
11171
- _this80.isFocus = false;
11235
+ _this82.isFocus = false;
11172
11236
  }
11173
11237
  });
11174
11238
  },
11175
11239
  html_input: function html_input() {
11176
- var _this81 = this;
11240
+ var _this83 = this;
11177
11241
 
11178
11242
  var p = this.input_placeholder;
11179
11243
  return [this.html_input_hidden(), this.html_var(), h$1('div', {
@@ -11187,14 +11251,14 @@ var script$3 = {
11187
11251
  autoHide: true,
11188
11252
  snap: {
11189
11253
  target: function target() {
11190
- return _this81.el('main');
11254
+ return _this83.el('main');
11191
11255
  },
11192
11256
  position: 'v',
11193
11257
  indent: 1
11194
11258
  },
11195
11259
  on: {
11196
11260
  close: function close() {
11197
- return _this81.showSuggest = false;
11261
+ return _this83.showSuggest = false;
11198
11262
  }
11199
11263
  }
11200
11264
  }, this.$slots)];
@@ -11223,12 +11287,12 @@ var script$3 = {
11223
11287
  },
11224
11288
  computed: {
11225
11289
  validHooks: function validHooks() {
11226
- var _this82 = this;
11290
+ var _this84 = this;
11227
11291
 
11228
11292
  return {
11229
11293
  valid: function valid(v) {
11230
- if (_this82.x.strict && $$1.q('u:not([data-value])').length > 0) {
11231
- return _this82.formErr('invalid_option');
11294
+ if (_this84.x.strict && $$1.q('u:not([data-value])').length > 0) {
11295
+ return _this84.formErr('invalid_option');
11232
11296
  }
11233
11297
  }
11234
11298
  };
@@ -11256,15 +11320,15 @@ var script$3 = {
11256
11320
  }
11257
11321
  },
11258
11322
  mounted: function mounted() {
11259
- var _this83 = this;
11323
+ var _this85 = this;
11260
11324
 
11261
11325
  if (this.isEntity) {
11262
11326
  this.initOptions();
11263
11327
  this.inp().addEventListener('compositionstart', function () {
11264
- _this83.imeMode = true;
11328
+ _this85.imeMode = true;
11265
11329
  });
11266
11330
  this.inp().addEventListener('compositionend', function () {
11267
- _this83.imeMode = false;
11331
+ _this85.imeMode = false;
11268
11332
  });
11269
11333
  }
11270
11334
  }
@@ -11380,7 +11444,7 @@ var script$1 = {
11380
11444
  this.setThumbLeft();
11381
11445
  },
11382
11446
  error: function error(text, timeout, fn) {
11383
- var _this84 = this;
11447
+ var _this86 = this;
11384
11448
 
11385
11449
  if (!text) text = '';
11386
11450
  this.isError = true;
@@ -11392,12 +11456,12 @@ var script$1 = {
11392
11456
  this.text = text + "(".concat(timeout / 1000, ")");
11393
11457
  var timer = setInterval(function () {
11394
11458
  timeout -= 1000;
11395
- _this84.text = text + "(".concat(timeout / 1000, ")");
11459
+ _this86.text = text + "(".concat(timeout / 1000, ")");
11396
11460
 
11397
11461
  if (timeout <= 0) {
11398
11462
  clearInterval(timer);
11399
11463
 
11400
- _this84.reset();
11464
+ _this86.reset();
11401
11465
 
11402
11466
  fn && fn();
11403
11467
  }
@@ -11433,7 +11497,7 @@ var script$1 = {
11433
11497
  $$1.close(this.dropper);
11434
11498
  },
11435
11499
  dragstart: function dragstart(e) {
11436
- var _this85 = this;
11500
+ var _this87 = this;
11437
11501
 
11438
11502
  if (!this.isNormal || this.locked) return;
11439
11503
  this.warn(false);
@@ -11448,16 +11512,16 @@ var script$1 = {
11448
11512
  var c = $$1.eventX(e);
11449
11513
  var l = $$1.numRange(f + c - x, 0, w - g);
11450
11514
  a.style.left = l + 'px';
11451
- _this85.$refs.track.style.width = l + g + 'px';
11452
- _this85.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
11515
+ _this87.$refs.track.style.width = l + g + 'px';
11516
+ _this87.x.modelValue = Math.floor(Math.floor((m - n) * l / (w - g)));
11453
11517
 
11454
- _this85.el().classList.add('z-drag');
11518
+ _this87.el().classList.add('z-drag');
11455
11519
  }, function (e) {
11456
11520
  a.dispatchEvent(new Event('drop'));
11457
11521
  }, e);
11458
11522
  },
11459
11523
  mouseenter: function mouseenter(e) {
11460
- var _this86 = this;
11524
+ var _this88 = this;
11461
11525
 
11462
11526
  if (this.dropper || !this.x.big || this.isSuccess || this.locked) return;
11463
11527
  this.warn(false);
@@ -11475,13 +11539,13 @@ var script$1 = {
11475
11539
  context: this,
11476
11540
  snap: {
11477
11541
  target: function target() {
11478
- return _this86.el('main');
11542
+ return _this88.el('main');
11479
11543
  },
11480
11544
  position: 'v'
11481
11545
  },
11482
11546
  on: {
11483
11547
  close: function close() {
11484
- return _this86.dropper = null;
11548
+ return _this88.dropper = null;
11485
11549
  }
11486
11550
  }
11487
11551
  });
@@ -11524,12 +11588,12 @@ var script$1 = {
11524
11588
  },
11525
11589
  computed: {
11526
11590
  validHooks: function validHooks() {
11527
- var _this87 = this;
11591
+ var _this89 = this;
11528
11592
 
11529
11593
  return {
11530
11594
  valid: function valid(v) {
11531
- if (!_this87.isSuccess) {
11532
- return _this87.formErr('jigsaw_required');
11595
+ if (!_this89.isSuccess) {
11596
+ return _this89.formErr('jigsaw_required');
11533
11597
  }
11534
11598
  }
11535
11599
  };