@web-utils/form-ui 1.0.0-beta26 → 1.0.0-beta27
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/{BPbmq_Fz.mjs → CE2akkTQ.mjs} +27 -28
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/toolbar/index.mjs +1 -1
- package/web-types.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { n as e } from "./BVLgLg_s.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { toolbarContextKey as
|
|
4
|
-
import { t as
|
|
5
|
-
import { NOOP as
|
|
6
|
-
import { Comment as
|
|
2
|
+
import { goBack as t, hasAuthority as n } from "../api/index.mjs";
|
|
3
|
+
import { toolbarContextKey as r } from "../constants/index.mjs";
|
|
4
|
+
import { t as i } from "./Bgny2wyC.mjs";
|
|
5
|
+
import { NOOP as a, capitalize as o } from "@web-utils/core";
|
|
6
|
+
import { Comment as s, createVNode as c } from "vue";
|
|
7
7
|
//#region src/components/toolbar/Toolbar.vue?vue&type=script&lang.jsx
|
|
8
|
-
var
|
|
8
|
+
var l = {
|
|
9
9
|
back: {
|
|
10
10
|
label: "返回",
|
|
11
11
|
type: "primary",
|
|
@@ -114,10 +114,10 @@ var c = {
|
|
|
114
114
|
separateLine: !1,
|
|
115
115
|
circle: !0
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, u = {
|
|
118
118
|
name: "Toolbar",
|
|
119
119
|
provide() {
|
|
120
|
-
return { [
|
|
120
|
+
return { [r]: this };
|
|
121
121
|
},
|
|
122
122
|
props: {
|
|
123
123
|
searchable: Boolean,
|
|
@@ -138,47 +138,46 @@ var c = {
|
|
|
138
138
|
computed: {},
|
|
139
139
|
methods: {
|
|
140
140
|
goBack() {
|
|
141
|
-
|
|
142
|
-
this.tabs.length === 1 ? window.close() : this.$bus("closeTab", e, this);
|
|
141
|
+
t(this.$route.path);
|
|
143
142
|
},
|
|
144
|
-
createButton(t, { label: n, icon:
|
|
143
|
+
createButton(t, { label: n, icon: r, type: s, separateLine: l = !0, loadable: u, circle: d, onClick: f, title: p }) {
|
|
145
144
|
var m;
|
|
146
145
|
let h, g = ((m = this.label) == null ? void 0 : m[t]) || n;
|
|
147
146
|
return h = f || (["back", "cancel"].includes(t) ? this.goBack : (n) => {
|
|
148
|
-
(e(this.$attrs, { withOn: !0 })[`on${
|
|
149
|
-
}),
|
|
147
|
+
(e(this.$attrs, { withOn: !0 })[`on${o(t)}`] || a)(n);
|
|
148
|
+
}), c(i, {
|
|
150
149
|
"separate-line": l,
|
|
151
|
-
icon:
|
|
150
|
+
icon: r,
|
|
152
151
|
title: p,
|
|
153
152
|
label: g,
|
|
154
153
|
loadable: u,
|
|
155
154
|
circle: d,
|
|
156
155
|
footer: this.footer,
|
|
157
|
-
type:
|
|
156
|
+
type: s,
|
|
158
157
|
onClick: h
|
|
159
158
|
}, null);
|
|
160
159
|
},
|
|
161
160
|
getLeftButtons() {
|
|
162
|
-
var e,
|
|
161
|
+
var e, t, r;
|
|
163
162
|
let { createButton: i } = this;
|
|
164
|
-
return (r = (((e = (
|
|
165
|
-
let t =
|
|
163
|
+
return (r = (((e = (t = this.$slots)["toolbar-left"]) == null ? void 0 : e.call(t)) || this.buttons.flatMap((e) => {
|
|
164
|
+
let t = l[e];
|
|
166
165
|
if (t) {
|
|
167
166
|
var n, r;
|
|
168
167
|
return ((n = (r = this.$slots)[e]) == null ? void 0 : n.call(r)) || i(e, t);
|
|
169
168
|
} else if (e === "slot") {
|
|
170
|
-
var a,
|
|
171
|
-
let e = ((a = (
|
|
169
|
+
var a, o;
|
|
170
|
+
let e = ((a = (o = this.$slots).default) == null ? void 0 : a.call(o, {
|
|
172
171
|
buttons: this.buttons,
|
|
173
172
|
footer: this.footer
|
|
174
173
|
})) ?? null;
|
|
175
174
|
if (e && e.length === 1) {
|
|
176
|
-
var
|
|
177
|
-
return e == null || (
|
|
175
|
+
var c;
|
|
176
|
+
return e == null || (c = e[0]) == null || (c = c.children) == null ? void 0 : c.filter((e) => e.type !== s);
|
|
178
177
|
}
|
|
179
178
|
return e || [];
|
|
180
179
|
} else return null;
|
|
181
|
-
})).filter((e) => e)) == null ? void 0 : r.filter((e) => e.props.privilege ?
|
|
180
|
+
})).filter((e) => e)) == null ? void 0 : r.filter((e) => e.props.privilege ? n(e.props.privilege) : !0);
|
|
182
181
|
},
|
|
183
182
|
getRightButtons() {
|
|
184
183
|
var e, t, n, r;
|
|
@@ -191,18 +190,18 @@ var c = {
|
|
|
191
190
|
return i || a;
|
|
192
191
|
},
|
|
193
192
|
getSearchButton() {
|
|
194
|
-
return this.searchable ? this.createButton("search",
|
|
193
|
+
return this.searchable ? this.createButton("search", l.search) : null;
|
|
195
194
|
},
|
|
196
195
|
getRefreshButton() {
|
|
197
|
-
return this.refreshable ? this.createButton("reload",
|
|
196
|
+
return this.refreshable ? this.createButton("reload", l.reload) : null;
|
|
198
197
|
},
|
|
199
198
|
getSettingsButton() {
|
|
200
|
-
return this.refreshable ? this.createButton("settings",
|
|
199
|
+
return this.refreshable ? this.createButton("settings", l.settings) : null;
|
|
201
200
|
}
|
|
202
201
|
},
|
|
203
202
|
render() {
|
|
204
|
-
return this.footer ?
|
|
203
|
+
return this.footer ? c("div", { class: "footer-bar" }, [this.getLeftButtons()]) : c("div", { class: "toolbar" }, [c("div", { class: "toolbar-left" }, [this.getLeftButtons()]), c("div", { class: "toolbar-right" }, [this.getRightButtons()])]);
|
|
205
204
|
}
|
|
206
205
|
};
|
|
207
206
|
//#endregion
|
|
208
|
-
export {
|
|
207
|
+
export { u as t };
|
package/index.mjs
CHANGED
|
@@ -37,7 +37,7 @@ import F from "./form-view/index.mjs";
|
|
|
37
37
|
import I from "./iframe-window/index.mjs";
|
|
38
38
|
import L from "./table-view/index.mjs";
|
|
39
39
|
import { t as R } from "./chunks/Bgny2wyC.mjs";
|
|
40
|
-
import { t as z } from "./chunks/
|
|
40
|
+
import { t as z } from "./chunks/CE2akkTQ.mjs";
|
|
41
41
|
import B from "./x-input-tag/index.mjs";
|
|
42
42
|
import { t as V } from "./chunks/DS8NSFKr.mjs";
|
|
43
43
|
//#region src/components/index.ts
|
package/package.json
CHANGED
package/toolbar/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
1
|
+
import { t as e } from "../chunks/CE2akkTQ.mjs";
|
|
2
2
|
export { e as default };
|