fast-crud-ui3 1.5.17 → 1.5.18-beta
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/components/select/src/fast-select.d.ts +1 -1
- package/lib/components/table/src/easy-filter.d.ts +1 -1
- package/lib/components/table/src/table.d.ts +1 -1
- package/lib/components/table-column-select/src/table-column-select.d.ts +1 -1
- package/lib/fast-crud-ui3.cjs.js +7 -7
- package/lib/fast-crud-ui3.es.js +32 -26
- package/lib/fast-crud-ui3.umd.js +3 -3
- package/lib/model/fastTableOption.d.ts +7 -4
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/components/select/src/fast-select.vue +4 -3
- package/packages/components/table/src/quick-filter-form.vue +1 -1
- package/packages/components/table/src/util.js +1 -1
- package/packages/components/table-column-select/config.js +1 -0
- package/packages/model/fastTableOption.js +11 -3
package/lib/fast-crud-ui3.es.js
CHANGED
|
@@ -9643,18 +9643,21 @@ const Xr = class Xr {
|
|
|
9643
9643
|
* 向内置条件组中增加条件
|
|
9644
9644
|
* @param cond
|
|
9645
9645
|
* @param repeatable 是否允许重复的col, 默认false, 即若多次添加相同col的条件, 只会保留最新的
|
|
9646
|
+
* @return {FastTableOption} 返回当前对象
|
|
9646
9647
|
*/
|
|
9647
9648
|
addCond(t, n = !1) {
|
|
9648
9649
|
const r = ct.build(t);
|
|
9649
|
-
n === !1 && this.removeCond(r.col), this.conds.push(r);
|
|
9650
|
+
return n === !1 && this.removeCond(r.col), this.conds.push(r), this;
|
|
9650
9651
|
}
|
|
9651
9652
|
/**
|
|
9652
9653
|
* 从内置条件组中移除条件
|
|
9653
|
-
* @param col
|
|
9654
|
+
* @param col {string} 字段名
|
|
9655
|
+
* @return {FastTableOption} 返回当前对象
|
|
9654
9656
|
*/
|
|
9655
9657
|
removeCond(t) {
|
|
9656
9658
|
for (let n = this.conds.length - 1; n >= 0; n--)
|
|
9657
9659
|
this.conds[n].col === t && this.conds.splice(n, 1);
|
|
9660
|
+
return this;
|
|
9658
9661
|
}
|
|
9659
9662
|
/**
|
|
9660
9663
|
* 新增行, 返回promise
|
|
@@ -9817,26 +9820,27 @@ const Xr = class Xr {
|
|
|
9817
9820
|
* @param query
|
|
9818
9821
|
* @param valKey
|
|
9819
9822
|
* @param labelKey
|
|
9823
|
+
* @param forceRefresh 是否强制刷新,若true则跳过缓存
|
|
9820
9824
|
* @return {Promise<*>}
|
|
9821
9825
|
*/
|
|
9822
|
-
_buildSelectOptions(t, n, r) {
|
|
9823
|
-
return new Promise((
|
|
9824
|
-
const
|
|
9825
|
-
let
|
|
9826
|
-
if (
|
|
9826
|
+
_buildSelectOptions(t, n, r, s = !1) {
|
|
9827
|
+
return new Promise((o, l) => {
|
|
9828
|
+
const u = `OPTIONS:${this.id}_${n}_${r}_` + r3(JSON.stringify(zo(t)));
|
|
9829
|
+
let f;
|
|
9830
|
+
if (s || (f = Wh(u)), Ne(f))
|
|
9827
9831
|
try {
|
|
9828
|
-
|
|
9832
|
+
o(f);
|
|
9829
9833
|
return;
|
|
9830
|
-
} catch (
|
|
9831
|
-
console.log(
|
|
9834
|
+
} catch (m) {
|
|
9835
|
+
console.log(m), Ho(u);
|
|
9832
9836
|
}
|
|
9833
|
-
this._list(t).then((
|
|
9834
|
-
|
|
9835
|
-
const
|
|
9836
|
-
return
|
|
9837
|
-
}), Uh(
|
|
9838
|
-
}).catch((
|
|
9839
|
-
|
|
9837
|
+
this._list(t).then((m) => {
|
|
9838
|
+
f = m.filter((h) => ce(h)).map((h) => {
|
|
9839
|
+
const g = {};
|
|
9840
|
+
return g[n] = h[n], g[r] = h[r], g;
|
|
9841
|
+
}), Uh(u, f, 1), o(f);
|
|
9842
|
+
}).catch((m) => {
|
|
9843
|
+
l(m);
|
|
9840
9844
|
});
|
|
9841
9845
|
});
|
|
9842
9846
|
}
|
|
@@ -10129,7 +10133,7 @@ const j3 = {
|
|
|
10129
10133
|
};
|
|
10130
10134
|
},
|
|
10131
10135
|
async mounted() {
|
|
10132
|
-
this.options instanceof ze && await this.
|
|
10136
|
+
this.options instanceof ze && (this.options.ref = this, await this.getOptions());
|
|
10133
10137
|
},
|
|
10134
10138
|
computed: {
|
|
10135
10139
|
value: {
|
|
@@ -10142,14 +10146,14 @@ const j3 = {
|
|
|
10142
10146
|
}
|
|
10143
10147
|
},
|
|
10144
10148
|
methods: {
|
|
10145
|
-
|
|
10149
|
+
getOptions(e = !1) {
|
|
10146
10150
|
if (!(this.options instanceof ze))
|
|
10147
10151
|
return;
|
|
10148
|
-
const
|
|
10149
|
-
this.options._buildSelectOptions(
|
|
10150
|
-
this.nativeOptions =
|
|
10151
|
-
}).catch((
|
|
10152
|
-
console.error(
|
|
10152
|
+
const t = new yi().setDistinct().setCols([this.valKey, this.labelKey]);
|
|
10153
|
+
this.options._buildSelectOptions(t, this.valKey, this.labelKey, e).then((n) => {
|
|
10154
|
+
this.nativeOptions = n;
|
|
10155
|
+
}).catch((n) => {
|
|
10156
|
+
console.error(n);
|
|
10153
10157
|
});
|
|
10154
10158
|
}
|
|
10155
10159
|
}
|
|
@@ -10531,7 +10535,7 @@ function X3(e, t, n, r, s, o) {
|
|
|
10531
10535
|
_: 3
|
|
10532
10536
|
}, 8, ["label-width", "style"]);
|
|
10533
10537
|
}
|
|
10534
|
-
const e$ = /* @__PURE__ */ xe(J3, [["render", X3], ["__scopeId", "data-v-
|
|
10538
|
+
const e$ = /* @__PURE__ */ xe(J3, [["render", X3], ["__scopeId", "data-v-4ef6c2b5"]]);
|
|
10535
10539
|
const t$ = {
|
|
10536
10540
|
name: "easy-filter",
|
|
10537
10541
|
components: { FastSelect: _r },
|
|
@@ -11287,6 +11291,8 @@ const vc = {
|
|
|
11287
11291
|
clearable: !0,
|
|
11288
11292
|
filterable: !0,
|
|
11289
11293
|
multiple: !0,
|
|
11294
|
+
collapseTags: !0,
|
|
11295
|
+
// 默认合并
|
|
11290
11296
|
placeholder: "请选择.."
|
|
11291
11297
|
},
|
|
11292
11298
|
condMapFn: (e) => Ne(e.val) && e.val.length > 0 ? [new ct(e.col, P.IN, e.val)] : Ph(e.val) ? [new ct(e.col, P.EQ, e.val)] : []
|
|
@@ -12241,7 +12247,7 @@ function Q$(e, t, n) {
|
|
|
12241
12247
|
// deprecated: 1.6.0
|
|
12242
12248
|
hidden: tt,
|
|
12243
12249
|
showLength: Te,
|
|
12244
|
-
// 对于FastTableColumn*中定义了的prop, 从leftProp中移除 TODO 1.5.
|
|
12250
|
+
// 对于FastTableColumn*中定义了的prop, 从leftProp中移除 TODO 1.5.19 针对FastTableColumn* props中定义的属性,而又不希望透传给内置控件的, 应当在FastTableColumn*中声明, 而不是在这里设置"黑名单"
|
|
12245
12251
|
props: Z$(F, o, ["quickFilterCheckbox", "quickFilterBlock", "tableOption", "quickFilterConfig"])
|
|
12246
12252
|
// props: leftProp
|
|
12247
12253
|
};
|