dfish-widget 1.0.36 → 1.0.37

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);
@@ -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() {
@@ -11411,6 +11418,7 @@ const init_text = $$1.loc.form.jigsaw_drag_right;
11411
11418
  this.isSuccess = false;
11412
11419
  this.text = init_text;
11413
11420
  this.setThumbLeft(0);
11421
+ this.warn(false);
11414
11422
  },
11415
11423
  refresh(e) {
11416
11424
  e.runType = 'click:refresh';