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.
@@ -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((s, o) => {
9824
- const l = `OPTIONS:${this.id}_${n}_${r}_` + r3(JSON.stringify(zo(t)));
9825
- let u = Wh(l);
9826
- if (Ne(u))
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
- s(u);
9832
+ o(f);
9829
9833
  return;
9830
- } catch (f) {
9831
- console.log(f), Ho(l);
9834
+ } catch (m) {
9835
+ console.log(m), Ho(u);
9832
9836
  }
9833
- this._list(t).then((f) => {
9834
- u = f.filter((m) => ce(m)).map((m) => {
9835
- const h = {};
9836
- return h[n] = m[n], h[r] = m[r], h;
9837
- }), Uh(l, u, 1), s(u);
9838
- }).catch((f) => {
9839
- o(f);
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.buildSelectOptions();
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
- buildSelectOptions() {
10149
+ getOptions(e = !1) {
10146
10150
  if (!(this.options instanceof ze))
10147
10151
  return;
10148
- const e = new yi().setDistinct().setCols([this.valKey, this.labelKey]);
10149
- this.options._buildSelectOptions(e, this.valKey, this.labelKey).then((t) => {
10150
- this.nativeOptions = t;
10151
- }).catch((t) => {
10152
- console.error(t);
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-69969c93"]]);
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.16 针对FastTableColumn* props中定义的属性,而又不希望透传给内置控件的, 应当在FastTableColumn*中声明, 而不是在这里设置"黑名单"
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
  };