dfish-widget 1.0.36 → 1.0.38

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
@@ -2220,12 +2220,6 @@ var script$1g = {
2220
2220
  },
2221
2221
  // 表单验证。验证通过返回true /@ range -> validaterange
2222
2222
  async valid(range) {
2223
- if (this._err_ns) {
2224
- this._err_ns.forEach(v => {
2225
- let n = $$1.vueMap.get(v.wid);
2226
- n && n.warn(false);
2227
- });
2228
- }
2229
2223
  let e = await this.getValidError(range);
2230
2224
  if (e) {
2231
2225
  e.forEach(v => $$1.vueMap.get(v.wid).warn());
@@ -2241,6 +2235,12 @@ var script$1g = {
2241
2235
  saveModified(range, original) {
2242
2236
  this.getFormList(range).forEach(o => (o = $$1(o)).saveModified && o.saveModified(original));
2243
2237
  },
2238
+ resetFormStyle(range) {
2239
+ this.getFormList(range).forEach(f => {
2240
+ const c = $$1(f);
2241
+ c.warn && c.warn(false);
2242
+ });
2243
+ },
2244
2244
  resetForm(range, empty) {
2245
2245
  this.getFormList(range).forEach(f => {
2246
2246
  const c = $$1(f);
@@ -4997,7 +4997,7 @@ var script$R = {
4997
4997
  let chd = this.x.children;
4998
4998
  if (Array.isArray(chd)) {
4999
4999
  let i = 0;
5000
- r = chd.map(item => this.$slots.row({item, row: item}).map(t => $$1.lodash.set(t, 'props.rowIndex', i++)));
5000
+ r = chd.map((item, index) => this.$slots.row({item, index}).map(t => $$1.lodash.set(t, 'props.rowIndex', i++)));
5001
5001
  }
5002
5002
  return r || []
5003
5003
  } else {
@@ -5199,7 +5199,7 @@ var script$P = {
5199
5199
  },
5200
5200
  html() {
5201
5201
  if (this.x.children && Array.isArray(this.x.children) && this._provideTBody && this._provideTBody.$slots.row) {
5202
- return [this.html_self(true), this.x.children.map(item => this._provideTBody.$slots.row({item, row: item}))]
5202
+ return [this.html_self(true), this.x.children.map((item, index) => this._provideTBody.$slots.row({item, index}))]
5203
5203
  }
5204
5204
  return this.$slots.row ? [this.html_self(true), this.$slots.row()] : this.html_self()
5205
5205
  },
@@ -5919,7 +5919,7 @@ var script$C = {
5919
5919
  let chd = this.x.children;
5920
5920
  if (this.$slots.default) {
5921
5921
  if (Array.isArray(chd)) {
5922
- r = chd.map(item => this.$slots.default({item}));
5922
+ r = chd.map((item, index) => this.$slots.default({item, index}));
5923
5923
  } else {
5924
5924
  r = [];
5925
5925
  }
@@ -5997,6 +5997,12 @@ var script$A = {
5997
5997
  return this.x.modelValue
5998
5998
  let ov = this.x.modelValue;
5999
5999
  this.x.modelValue = v;
6000
+ if (ov == null) {
6001
+ ov = '';
6002
+ }
6003
+ if (v == null) {
6004
+ v = '';
6005
+ }
6000
6006
  let changed = ov !== v;
6001
6007
  if (typeof ov === 'object') {
6002
6008
  changed = JSON.stringify(ov) != JSON.stringify(v);
@@ -6167,6 +6173,7 @@ var script$A = {
6167
6173
  },
6168
6174
  // @empty -> 是否强制清空
6169
6175
  reset(empty) {
6176
+ this.warn(false);
6170
6177
  this.val(empty || this.defaultValue == null ? '' : this.defaultValue);
6171
6178
  },
6172
6179
  html_label() {
@@ -6829,7 +6836,7 @@ var script$x = {
6829
6836
  let chd = this.x.children;
6830
6837
  let tree = this.pubParent;
6831
6838
  if (Array.isArray(chd) && tree) {
6832
- r = chd.map(item => tree.$slots.default({item}));
6839
+ r = chd.map((item, index) => tree.$slots.default({item, index}));
6833
6840
  }
6834
6841
  return h('div', {
6835
6842
  id: this.uid + 'cont',
@@ -7906,13 +7913,16 @@ function render$4(_ctx, _cache, $props, $setup, $data, $options) {
7906
7913
  return (openBlock(), createElementBlock("div", _hoisted_9, toDisplayString(item), 1 /* TEXT */))
7907
7914
  }), 256 /* UNKEYED_FRAGMENT */))
7908
7915
  : createCommentVNode("v-if", true),
7909
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.bodyList, (item) => {
7916
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.bodyList, (item, index) => {
7910
7917
  return (openBlock(), createElementBlock("div", {
7911
7918
  title: item.title,
7912
7919
  class: normalizeClass(['w-calendar-item', {'z-on': item.focus && !item.disabled, 'z-pad': item.pad, 'z-ds': item.disabled}]),
7913
7920
  onClick: $event => ($options.clickItem($event,item))
7914
7921
  }, [
7915
- renderSlot(_ctx.$slots, "default", { item: item }, () => [
7922
+ renderSlot(_ctx.$slots, "default", {
7923
+ item: item,
7924
+ index: index
7925
+ }, () => [
7916
7926
  createElementVNode("div", _hoisted_11, toDisplayString(item.text), 1 /* TEXT */)
7917
7927
  ])
7918
7928
  ], 10 /* CLASS, PROPS */, _hoisted_10))
@@ -9709,8 +9719,8 @@ var script$e = {
9709
9719
  }
9710
9720
  },
9711
9721
  html_list() {
9712
- return this.list.map(item => {
9713
- return h(script$f, {item})
9722
+ return this.list.map((item, index) => {
9723
+ return h(script$f, {item, index})
9714
9724
  })
9715
9725
  },
9716
9726
  html_input_button() {
@@ -11411,6 +11421,7 @@ const init_text = $$1.loc.form.jigsaw_drag_right;
11411
11421
  this.isSuccess = false;
11412
11422
  this.text = init_text;
11413
11423
  this.setThumbLeft(0);
11424
+ this.warn(false);
11414
11425
  },
11415
11426
  refresh(e) {
11416
11427
  e.runType = 'click:refresh';