@web-utils/component 4.0.6 → 4.0.7
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/chunks/configComponents.Bkix1pFY.mjs +46 -0
- package/chunks/{dictionary.D9gKwItv.mjs → dictionary.Dq1KRI7k.mjs} +1 -1
- package/index.mjs +369 -368
- package/package.json +1 -1
- package/pageable-table/index.mjs +1 -1
- package/table-column/index.mjs +1 -1
- package/table-view/index.mjs +17 -17
- package/tabs-view/index.mjs +1 -1
- package/toolbar/index.mjs +1 -1
- package/toolbar-button/index.mjs +1 -1
- package/web-types.json +1 -1
- package/chunks/configComponents.BHkQi547.mjs +0 -45
package/package.json
CHANGED
package/pageable-table/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { copy as v, hasOwn as P } from "@web-utils/core";
|
|
|
2
2
|
import S from "element-ui/lib/message";
|
|
3
3
|
import { g as _, f as C, i as B, j as A } from "../chunks/index.B2TRddqf.mjs";
|
|
4
4
|
import { merge as f } from "@web-utils/integrations/lodash";
|
|
5
|
-
import { g as K } from "../chunks/dictionary.
|
|
5
|
+
import { g as K } from "../chunks/dictionary.Dq1KRI7k.mjs";
|
|
6
6
|
import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
|
|
7
7
|
import "vue";
|
|
8
8
|
import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
package/table-column/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
|
|
2
2
|
import { h as d } from "vue";
|
|
3
|
-
import { g as C } from "../chunks/dictionary.
|
|
3
|
+
import { g as C } from "../chunks/dictionary.Dq1KRI7k.mjs";
|
|
4
4
|
import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
5
|
import { f as V } from "../chunks/core.DJEgjQW6.mjs";
|
|
6
6
|
const D = {
|
package/table-view/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isFunction as
|
|
1
|
+
import { isFunction as p, toStringArray as f, isString as o, isArray as c, trace as h, warning as d, hasOwn as u } from "@web-utils/core";
|
|
2
2
|
import { merge as i } from "@web-utils/integrations/lodash";
|
|
3
|
-
import { h as w } from "../chunks/index.B2TRddqf.mjs";
|
|
3
|
+
import { g as m, h as w } from "../chunks/index.B2TRddqf.mjs";
|
|
4
4
|
import g from "../form-item-config-provider/index.mjs";
|
|
5
|
-
import { a as v, p as _ } from "../chunks/configComponents.
|
|
5
|
+
import { a as v, p as _ } from "../chunks/configComponents.Bkix1pFY.mjs";
|
|
6
6
|
import { b as a } from "../chunks/core.DJEgjQW6.mjs";
|
|
7
|
-
import
|
|
8
|
-
import { n as
|
|
9
|
-
const
|
|
7
|
+
import y from "element-ui/lib/transitions/collapse-transition";
|
|
8
|
+
import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
9
|
+
const T = [
|
|
10
10
|
"back",
|
|
11
11
|
"create",
|
|
12
12
|
"save",
|
|
@@ -26,7 +26,7 @@ const S = [
|
|
|
26
26
|
"disabled",
|
|
27
27
|
"reload",
|
|
28
28
|
"slot"
|
|
29
|
-
],
|
|
29
|
+
], P = {
|
|
30
30
|
name: "TableView",
|
|
31
31
|
bus: {
|
|
32
32
|
reloadTableView(t) {
|
|
@@ -46,7 +46,7 @@ const S = [
|
|
|
46
46
|
d.call(this.$parent || {}, "`viewId`的类型必须是字符串或数组");
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
components: { FormItemConfigProvider: g, ElCollapseTransition:
|
|
49
|
+
components: { FormItemConfigProvider: g, ElCollapseTransition: m(y) },
|
|
50
50
|
props: {
|
|
51
51
|
viewId: [String, Array],
|
|
52
52
|
searchPanelAttrs: {
|
|
@@ -113,13 +113,13 @@ const S = [
|
|
|
113
113
|
},
|
|
114
114
|
computed: {
|
|
115
115
|
buttonSlots() {
|
|
116
|
-
return
|
|
116
|
+
return T.filter((t) => this.$scopedSlots[t]);
|
|
117
117
|
},
|
|
118
118
|
toolbarProps() {
|
|
119
119
|
var s, l;
|
|
120
120
|
const t = {}, e = i({}, this.toolbarAttrs, t);
|
|
121
121
|
let r = (e == null ? void 0 : e.buttons) || this.$parent.buttons;
|
|
122
|
-
return r = r || [], e.buttons = r, e.buttons = _(e.buttons), e.buttons =
|
|
122
|
+
return r = r || [], e.buttons = r, e.buttons = _(e.buttons), e.buttons = f(e.buttons), e.searchable = !!((l = (s = this.$scopedSlots)["search-form"]) != null && l.call(s)), e;
|
|
123
123
|
},
|
|
124
124
|
treeProps() {
|
|
125
125
|
const t = {
|
|
@@ -210,7 +210,7 @@ const S = [
|
|
|
210
210
|
async del() {
|
|
211
211
|
var e;
|
|
212
212
|
const t = this.deleteApi || this.$parent.del;
|
|
213
|
-
if (!((e = this.toolbarListeners) != null && e.del) &&
|
|
213
|
+
if (!((e = this.toolbarListeners) != null && e.del) && p(t)) {
|
|
214
214
|
if (!this.selectedRows.length) {
|
|
215
215
|
this.$message.warning(this.selectTips || "请选择要删除的记录!");
|
|
216
216
|
return;
|
|
@@ -229,7 +229,7 @@ const S = [
|
|
|
229
229
|
s.confirmButtonLoading = !0, s.confirmButtonText = "删除...";
|
|
230
230
|
const n = await t.call(
|
|
231
231
|
this,
|
|
232
|
-
this.selectedRows.map((
|
|
232
|
+
this.selectedRows.map((b) => b[this.rowKey])
|
|
233
233
|
);
|
|
234
234
|
this.$message.success(n.data.msg || "删除成功"), this.reloadTableAndTree(), v();
|
|
235
235
|
} catch {
|
|
@@ -270,7 +270,7 @@ const S = [
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
|
-
var
|
|
273
|
+
var C = function() {
|
|
274
274
|
var e = this, r = e._self._c;
|
|
275
275
|
return r("div", { class: ["table-view", { embed: e.embed, "has-tree": e.treeProps.show }] }, [r("div", { staticClass: "table-view-wrapper" }, [e.searchFormPosition === "top" ? [r("ElCollapseTransition", [e.toolbarProps.searchable ? r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isSearchVisible, expression: "isSearchVisible" }], staticClass: "search-form-top" }, [r("ElForm", { ref: "form", attrs: { "label-position": "right", model: e.searchModel || e.searchPanelProps.model, size: "mini", "label-width": e.labelWidth }, nativeOn: { "!submit": function(s) {
|
|
276
276
|
return s.preventDefault(), e.onSearchClick.apply(null, arguments);
|
|
@@ -312,15 +312,15 @@ var P = function() {
|
|
|
312
312
|
} } }, [r("FormItemConfigProvider", { attrs: { block: "", "wrap-col": !1 } }, [r("ElRow", { attrs: { gutter: 0 } }, [e._t("search-form", function() {
|
|
313
313
|
return [r("p", [e._v("请添加搜索条件!")])];
|
|
314
314
|
})], 2)], 1), r("ElFormItem", { attrs: { "label-width": "0" } }, [r("div", { staticClass: "slide-panel-actions" }, [r("ElButton", { attrs: { type: "primary", "native-type": "submit", size: "mini" } }, [e._v("开始搜索")]), r("ElButton", { attrs: { size: "mini" }, on: { click: e.onClearClick } }, [e._v("清除条件")])], 1)])], 1)], 1)]) : e._e()])] : e._e()], 2), e._t("default")], 2)]);
|
|
315
|
-
},
|
|
316
|
-
T,
|
|
315
|
+
}, $ = [], k = /* @__PURE__ */ S(
|
|
317
316
|
P,
|
|
318
317
|
C,
|
|
318
|
+
$,
|
|
319
319
|
!1,
|
|
320
320
|
null,
|
|
321
321
|
null
|
|
322
322
|
);
|
|
323
|
-
const
|
|
323
|
+
const V = k.exports;
|
|
324
324
|
export {
|
|
325
|
-
|
|
325
|
+
V as default
|
|
326
326
|
};
|
package/tabs-view/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toStringArray as a } from "@web-utils/core";
|
|
2
2
|
import { merge as n } from "@web-utils/integrations/lodash";
|
|
3
|
-
import { p as l } from "../chunks/configComponents.
|
|
3
|
+
import { p as l } from "../chunks/configComponents.Bkix1pFY.mjs";
|
|
4
4
|
import { n as i } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
5
|
const u = [
|
|
6
6
|
"back",
|
package/toolbar/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as p } from "vue";
|
|
2
2
|
import { copy as m, NOOP as d } from "@web-utils/core";
|
|
3
|
-
import { h as y, b as g } from "../chunks/configComponents.
|
|
3
|
+
import { h as y, b as g } from "../chunks/configComponents.Bkix1pFY.mjs";
|
|
4
4
|
import { n as B } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
5
|
const u = {
|
|
6
6
|
back: {
|
package/toolbar-button/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFunction as n, isArray as r } from "@web-utils/core";
|
|
2
|
-
import { h as a } from "../chunks/configComponents.
|
|
2
|
+
import { h as a } from "../chunks/configComponents.Bkix1pFY.mjs";
|
|
3
3
|
import { n as l } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
4
4
|
const s = {
|
|
5
5
|
name: "ToolbarButton",
|
package/web-types.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { isObject as n, isString as c } from "@web-utils/core";
|
|
2
|
-
const r = {
|
|
3
|
-
privilege: {
|
|
4
|
-
processButtons(o) {
|
|
5
|
-
return o.map((t) => {
|
|
6
|
-
if (n(t)) {
|
|
7
|
-
const e = t, s = {};
|
|
8
|
-
for (const i in e)
|
|
9
|
-
c(e[i]) && (s[i] = a(e[i]));
|
|
10
|
-
return s;
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
hasAuthority(o) {
|
|
16
|
-
return !0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}, g = (o) => {
|
|
20
|
-
var t, e;
|
|
21
|
-
return (e = (t = r.privilege) == null ? void 0 : t.processButtons) == null ? void 0 : e.call(t, o);
|
|
22
|
-
}, a = (o) => {
|
|
23
|
-
var t, e;
|
|
24
|
-
return (e = (t = r.privilege) == null ? void 0 : t.hasAuthority) == null ? void 0 : e.call(t, o);
|
|
25
|
-
}, u = (o) => {
|
|
26
|
-
var t, e;
|
|
27
|
-
return (e = (t = r.toolbar) == null ? void 0 : t.goBack) == null ? void 0 : e.call(t, o);
|
|
28
|
-
}, l = () => {
|
|
29
|
-
var o, t;
|
|
30
|
-
return (t = (o = r.tableView) == null ? void 0 : o.reload) == null ? void 0 : t.call(o);
|
|
31
|
-
}, b = (o, t) => {
|
|
32
|
-
var e, s;
|
|
33
|
-
return (s = (e = r.dict) == null ? void 0 : e.getDictTreeByType) == null ? void 0 : s.call(e, o, t);
|
|
34
|
-
}, y = (o) => {
|
|
35
|
-
var t, e;
|
|
36
|
-
return (e = (t = r.dict) == null ? void 0 : t.remote) == null ? void 0 : e.call(t, o);
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
l as a,
|
|
40
|
-
u as b,
|
|
41
|
-
b as g,
|
|
42
|
-
a as h,
|
|
43
|
-
g as p,
|
|
44
|
-
y as r
|
|
45
|
-
};
|