dfish-widget 1.0.66 → 1.0.67
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 +8 -9
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1920,13 +1920,10 @@ const bindCache = {};
|
|
|
1920
1920
|
return new Promise(async (resolve) => {
|
|
1921
1921
|
await nextTick();
|
|
1922
1922
|
const vm = $$1.vm(this);
|
|
1923
|
-
let d = cmd.validate || false;
|
|
1924
|
-
let f = vm.getFormList(d.range || cmd.range);
|
|
1925
|
-
let g = d.range && d.range != cmd.range ? vm.getFormList(cmd.range) : f;
|
|
1926
1923
|
this.ajaxLock && this.ajaxLock();
|
|
1927
|
-
let isValid = await vm.valid(
|
|
1924
|
+
let isValid = await vm.valid(cmd.range, cmd.group);
|
|
1928
1925
|
if (isValid) {
|
|
1929
|
-
let post = vm.getPostData(
|
|
1926
|
+
let post = vm.getPostData(cmd.range);
|
|
1930
1927
|
cmd.data = cmd.data && post ? $$1.extend({}, cmd.data, post) : (cmd.data || post);
|
|
1931
1928
|
resolve(this.ajax(cmd));
|
|
1932
1929
|
} else {
|
|
@@ -2187,7 +2184,6 @@ var script$1l = {
|
|
|
2187
2184
|
},
|
|
2188
2185
|
// 获取所有表单,返回一个dom集合 /@ a -> range(widgetID, 可选,如果 range 以 !开头,表示排除), b -> 是否包含disabled的表单
|
|
2189
2186
|
getFormList(a, b) {
|
|
2190
|
-
if (Array.isArray(a)) return a
|
|
2191
2187
|
let r, f = ':input:not(button)' + (b ? '' : ':not(:disabled)');
|
|
2192
2188
|
if (a && typeof a === 'string') {
|
|
2193
2189
|
let d = a.charAt(0) === '!';
|
|
@@ -2195,7 +2191,7 @@ var script$1l = {
|
|
|
2195
2191
|
if (e = e.join())
|
|
2196
2192
|
r = $$1.q(d ? `${f}:not(${e})` : e, this.el());
|
|
2197
2193
|
} else {
|
|
2198
|
-
r = $$1.q(f, a ? $$1.el(a) : this.el());
|
|
2194
|
+
r = $$1.q(f, Array.isArray(a) ? $$1.q(a.map(n => $$1.el(n))) : a ? $$1.el(a) : this.el());
|
|
2199
2195
|
}
|
|
2200
2196
|
return r ? $$1.lodash.map(r.not('[w-form-ignore] :input')) : []
|
|
2201
2197
|
},
|
|
@@ -7167,7 +7163,7 @@ var script$A = {
|
|
|
7167
7163
|
if (rule && !v) return this.formErr(que)
|
|
7168
7164
|
},
|
|
7169
7165
|
pattern: (v, rule, que) => {
|
|
7170
|
-
if (v && (typeof rule === 'string' ? !$$1.eval(`${rule}.test(v)`, {rule, v}) : !rule.test(v)))
|
|
7166
|
+
if (v && rule && (typeof rule === 'string' ? !$$1.eval(`${rule}.test(v)`, {rule, v}) : (rule.test && !rule.test(v))))
|
|
7171
7167
|
return this.formErr(que)
|
|
7172
7168
|
},
|
|
7173
7169
|
validateHandler: async(v, rule, que) => {
|
|
@@ -11719,7 +11715,10 @@ var script$5 = {
|
|
|
11719
11715
|
this.warn(false);
|
|
11720
11716
|
},
|
|
11721
11717
|
clear() {
|
|
11722
|
-
this
|
|
11718
|
+
this.sensor_text = '';
|
|
11719
|
+
if (this.isNormal) {
|
|
11720
|
+
this.$refs.input.value = '';
|
|
11721
|
+
}
|
|
11723
11722
|
},
|
|
11724
11723
|
focus(toEnd) {
|
|
11725
11724
|
if (this.isNormal) {
|