dfish-widget 1.0.77 → 1.0.78
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 +22 -3
- package/lib/index.esm.js.map +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -2237,10 +2237,22 @@ var script$1l = {
|
|
|
2237
2237
|
// 表单验证。如果检测到错误,将返回一个包含错误信息的数组 /@r -> range, n -> validate group name
|
|
2238
2238
|
async getValidError(range) {
|
|
2239
2239
|
let e, q = this.getFormList(range);
|
|
2240
|
+
const group = {};
|
|
2240
2241
|
for (let i = 0, l = q.length, c, v; i < l; i++) {
|
|
2241
|
-
if ((c = $$1(q[i])) && c.isFormWidget
|
|
2242
|
-
if (
|
|
2243
|
-
|
|
2242
|
+
if ((c = $$1(q[i])) && c.isFormWidget) {
|
|
2243
|
+
if (q[i].name in group) {
|
|
2244
|
+
v = group[q[i].name] && $$1.extend({wid: c.uid}, group[q[i].name]);
|
|
2245
|
+
} else {
|
|
2246
|
+
v = await c.getValidError();
|
|
2247
|
+
}
|
|
2248
|
+
if (v) {
|
|
2249
|
+
if (!e) e = [];
|
|
2250
|
+
if (!e.find(n => n.wid == v.wid)) e.push(v);
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
// checkbox 和 radio 只需验证一个
|
|
2254
|
+
if (q[i].type === 'checkbox' || q[i].type === 'radio') {
|
|
2255
|
+
group[q[i].name] = v;
|
|
2244
2256
|
}
|
|
2245
2257
|
}
|
|
2246
2258
|
return e
|
|
@@ -4299,6 +4311,11 @@ let inst$1 = null;
|
|
|
4299
4311
|
name: 'w-tip',
|
|
4300
4312
|
mixins: [script$1a],
|
|
4301
4313
|
props: ['face', 'text', 'escape'],
|
|
4314
|
+
provide() {
|
|
4315
|
+
return {
|
|
4316
|
+
provideView: this.provideView
|
|
4317
|
+
}
|
|
4318
|
+
},
|
|
4302
4319
|
methods: {
|
|
4303
4320
|
x_default() {
|
|
4304
4321
|
return {
|
|
@@ -6771,6 +6788,7 @@ const props = __props;
|
|
|
6771
6788
|
};
|
|
6772
6789
|
|
|
6773
6790
|
const focus = async (id) => {
|
|
6791
|
+
await nextTick();
|
|
6774
6792
|
if (!showList.value.find(n => id === n[propValue])) {
|
|
6775
6793
|
expandTo(id);
|
|
6776
6794
|
}
|
|
@@ -6795,6 +6813,7 @@ const props = __props;
|
|
|
6795
6813
|
expandTo(v);
|
|
6796
6814
|
}
|
|
6797
6815
|
}
|
|
6816
|
+
console.log('watchCurrent');
|
|
6798
6817
|
focus(val[0]);
|
|
6799
6818
|
};
|
|
6800
6819
|
|