dfish-widget 1.0.129 → 1.0.130
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 +15 -8
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1915,9 +1915,9 @@ const bindCache = {};
|
|
|
1915
1915
|
}
|
|
1916
1916
|
},
|
|
1917
1917
|
ajax(cmd) {
|
|
1918
|
-
this.
|
|
1918
|
+
this.setLoading && this.setLoading();
|
|
1919
1919
|
return $$1.ajax(cmd).then((res) => {
|
|
1920
|
-
this.
|
|
1920
|
+
this.setLoading && this.setLoading(false);
|
|
1921
1921
|
return res
|
|
1922
1922
|
})
|
|
1923
1923
|
},
|
|
@@ -1935,14 +1935,14 @@ const bindCache = {};
|
|
|
1935
1935
|
return new Promise(async (resolve) => {
|
|
1936
1936
|
await nextTick();
|
|
1937
1937
|
const vm = $$1.vm(this);
|
|
1938
|
-
this.
|
|
1938
|
+
this.setLoading && this.setLoading();
|
|
1939
1939
|
let isValid = await vm.valid(cmd.range, cmd.group);
|
|
1940
1940
|
if (isValid) {
|
|
1941
1941
|
let post = vm.getPostData(cmd.range);
|
|
1942
1942
|
cmd.data = cmd.data && post ? $$1.extend({}, cmd.data, post) : (cmd.data || post);
|
|
1943
1943
|
resolve(this.ajax(cmd));
|
|
1944
1944
|
} else {
|
|
1945
|
-
this.
|
|
1945
|
+
this.setLoading && this.setLoading(false);
|
|
1946
1946
|
}
|
|
1947
1947
|
})
|
|
1948
1948
|
},
|
|
@@ -4556,7 +4556,7 @@ var script$14 = {
|
|
|
4556
4556
|
}
|
|
4557
4557
|
},
|
|
4558
4558
|
methods: {
|
|
4559
|
-
|
|
4559
|
+
setLoading(a) {
|
|
4560
4560
|
a = a == null ? true : a;
|
|
4561
4561
|
this.x.loading = a;
|
|
4562
4562
|
},
|
|
@@ -7232,8 +7232,12 @@ var script$C = {
|
|
|
7232
7232
|
let hs = this.validHooks;
|
|
7233
7233
|
for (let q of ques) {
|
|
7234
7234
|
let rv = typeof q.rule !== 'object' ? q.rule : q.rule.value !== undefined ? q.rule.value : q.rule;
|
|
7235
|
-
|
|
7236
|
-
|
|
7235
|
+
if (!q.rule || q.rule.trigger == trigger) {
|
|
7236
|
+
let e = hs[q.type](v, rv, q);
|
|
7237
|
+
if (e && !(e instanceof Promise)) {
|
|
7238
|
+
return e
|
|
7239
|
+
}
|
|
7240
|
+
}
|
|
7237
7241
|
}
|
|
7238
7242
|
}
|
|
7239
7243
|
},
|
|
@@ -9876,8 +9880,11 @@ var script$o = {
|
|
|
9876
9880
|
this.baseInput(e);
|
|
9877
9881
|
this.doSuggest(true);
|
|
9878
9882
|
} else {
|
|
9883
|
+
let v = e.target.value;
|
|
9884
|
+
this.val(v);
|
|
9879
9885
|
this.sug_timer = setTimeout(() => {
|
|
9880
|
-
this.
|
|
9886
|
+
this.trigger(e, v);
|
|
9887
|
+
this.baseValid('change');
|
|
9881
9888
|
this.doSuggest(true);
|
|
9882
9889
|
}, 500);
|
|
9883
9890
|
}
|