@dazhicheng/ui 1.5.201 → 1.5.202
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/dist/assets/svg/RiRefreshLine.svg.js +4 -0
- package/dist/assets/svg/add.svg.js +4 -0
- package/dist/assets/svg/addCircleLine.svg.js +4 -0
- package/dist/assets/svg/arrowDown.svg.js +4 -0
- package/dist/assets/svg/arrowLineDown.svg.js +5 -0
- package/dist/assets/svg/arrowSUp.svg.js +4 -0
- package/dist/assets/svg/arrowUp.svg.js +4 -0
- package/dist/assets/svg/columnSet.svg.js +4 -0
- package/dist/assets/svg/determinateCircleLine.svg.js +5 -0
- package/dist/assets/svg/drag.svg.js +5 -0
- package/dist/assets/svg/exportSvg.svg.js +4 -0
- package/dist/assets/svg/fileSvg.svg.js +4 -0
- package/dist/assets/svg/help.svg.js +4 -0
- package/dist/components/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-button/components/AddButton.vue.js +2 -2
- package/dist/components/tt-checkbox/index.vue.js +7 -7
- package/dist/components/tt-drawer/index.js +1 -1
- package/dist/components/tt-drawer/src/RenderDrawer.vue.js +18 -17
- package/dist/components/tt-drawer/src/components/DrawerFooter.vue.js +1 -1
- package/dist/components/tt-drawer/src/props.js +1 -1
- package/dist/components/tt-drawer/src/utils/drawer-api.js +1 -1
- package/dist/components/tt-empty/index.js +1 -1
- package/dist/components/tt-form/index.js +11 -17
- package/dist/components/tt-form/src/components/ExpandableArrow.vue2.js +3 -3
- package/dist/components/tt-form/src/components/FormActions.vue2.js +1 -1
- package/dist/components/tt-form/src/config.js +4 -4
- package/dist/components/tt-form/src/form/FormMessageToolTip.vue.js +1 -1
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +3 -4
- package/dist/components/tt-form/src/form-render/FormLabel.vue2.js +6 -7
- package/dist/components/tt-form/src/form-render/form.vue2.js +4 -5
- package/dist/components/tt-form/src/group-form/GroupForm.vue2.js +1 -1
- package/dist/components/tt-form/src/group-form/GroupSection.vue2.js +25 -26
- package/dist/components/tt-form/src/index.vue2.js +5 -7
- package/dist/components/tt-form-item-error-tooltip/index.js +2 -2
- package/dist/components/tt-icon/components/AddIcon.vue.js +1 -1
- package/dist/components/tt-icon/components/SubIcon.vue.js +1 -1
- package/dist/components/tt-log/index.vue.js +5 -4
- package/dist/components/tt-modal/index.js +1 -1
- package/dist/components/tt-modal/src/RenderModal.vue.js +26 -26
- package/dist/components/tt-modal/src/props.js +1 -1
- package/dist/components/tt-modal/src/utils/modal-api.js +1 -1
- package/dist/components/tt-modal-form/index.vue.js +47 -24
- package/dist/components/tt-nav-anchor/src/TtNavAnchor.vue.js +14 -14
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.js +2 -2
- package/dist/components/tt-panel-select/src/components/PanelRight.vue.js +14 -14
- package/dist/components/tt-select/src/Select.vue.js +27 -27
- package/dist/components/tt-select/src/components/SelectTable.vue.js +1 -1
- package/dist/components/tt-select/src/components/Table.vue.js +2 -2
- package/dist/components/tt-table/index.js +48 -18
- package/dist/components/tt-table/src/Table.vue.js +2 -2
- package/dist/components/tt-table/src/TableForm.vue.js +120 -81
- package/dist/components/tt-table/src/components/TableAction.vue.js +3 -3
- package/dist/components/tt-table/src/components/TableButtons.js +9 -9
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +19 -18
- package/dist/components/tt-table/src/components/TableToobalTools.vue.js +4 -4
- package/dist/components/tt-table/src/hooks/useCellArea.js +1 -1
- package/dist/components/tt-table/src/hooks/useColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +1 -1
- package/dist/components/tt-table/src/hooks/useDataSource.js +1 -1
- package/dist/components/tt-table/src/hooks/usePagination.js +1 -1
- package/dist/components/tt-table/src/hooks/useTableSlot.js +1 -1
- package/dist/components/tt-table/src/props.js +1 -1
- package/dist/components/tt-table/src/utils/table-api.js +1 -1
- package/dist/components/tt-text/index.vue2.js +1 -1
- package/dist/components/tt-upload/src/TtUpload.vue.js +71 -70
- package/dist/directives/dialog-resize/index.js +10 -10
- package/dist/hooks/useScreenshotOss.js +1 -1
- package/dist/hooks/useTable.js +13 -0
- package/dist/hooks/useTemplateSlot.js +13 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
- /package/dist/components/tt-area/{TtArea.vue2.js → TtArea.vue3.js} +0 -0
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { defineComponent as de, mergeModels as z, useModel as ce, useSlots as fe, ref as b, computed as m, createBlock as pe, openBlock as me, createVNode as a, mergeProps as we, createTextVNode as w } from "vue";
|
|
2
|
-
import ve from "
|
|
3
|
-
import A from "
|
|
4
|
-
import { TtButton as $ } from "
|
|
5
|
-
import { TtIcon as S } from "
|
|
6
|
-
import
|
|
7
|
-
import { useDesign as
|
|
8
|
-
import { TtText as R } from "
|
|
9
|
-
import { ElMessage as f, ElImageViewer as
|
|
10
|
-
import { omit as
|
|
11
|
-
import { isString as
|
|
2
|
+
import ve from "../../../assets/svg/exportSvg.svg.js";
|
|
3
|
+
import A from "../../../assets/svg/fileSvg.svg.js";
|
|
4
|
+
import { TtButton as $ } from "../../tt-button/index.js";
|
|
5
|
+
import { TtIcon as S } from "../../tt-icon/index.js";
|
|
6
|
+
import "../../tt-modal/index.js";
|
|
7
|
+
import { useDesign as ge } from "@dazhicheng/hooks";
|
|
8
|
+
import { TtText as R } from "../../tt-text/index.js";
|
|
9
|
+
import { ElMessage as f, ElImageViewer as _e, ElUpload as he } from "element-plus";
|
|
10
|
+
import { omit as ye, isFunction as V } from "lodash-es";
|
|
11
|
+
import { isString as Ue, isNumber as be } from "@dazhicheng/utils";
|
|
12
12
|
/* empty css */
|
|
13
|
-
import { ttUploadProps as
|
|
14
|
-
import { GlobalConfig as F } from "
|
|
15
|
-
|
|
13
|
+
import { ttUploadProps as $e } from "./typing.js";
|
|
14
|
+
import { GlobalConfig as F } from "../../../hooks/useSetup.js";
|
|
15
|
+
import { useModalRender as Se } from "../../tt-modal/src/hooks/useModalRender.js";
|
|
16
|
+
const De = /* @__PURE__ */ de({
|
|
16
17
|
name: "TtUpload",
|
|
17
18
|
__name: "TtUpload",
|
|
18
|
-
props: /* @__PURE__ */ z(
|
|
19
|
+
props: /* @__PURE__ */ z($e, {
|
|
19
20
|
modelValue: {
|
|
20
21
|
default: () => []
|
|
21
22
|
},
|
|
@@ -28,19 +29,19 @@ const Pe = /* @__PURE__ */ de({
|
|
|
28
29
|
}) {
|
|
29
30
|
const D = ["modal", "modelValue", "uploadOssApi", "uploadTip", "maxSize", "showFileList", "showTemplateDownload", "templateText", "showPreview", "showDownload", "showDelete", "gridThreshold", "gridColumns", "showCount", "uploadOssViewApi", "beforeUpload", "onError"], I = /* @__PURE__ */ new Set(["jpg", "jpeg", "png", "gif", "webp", "bmp", "svg"]);
|
|
30
31
|
function B(e) {
|
|
31
|
-
var
|
|
32
|
-
const o = ((
|
|
32
|
+
var t;
|
|
33
|
+
const o = ((t = e.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "";
|
|
33
34
|
return I.has(o);
|
|
34
35
|
}
|
|
35
|
-
function K(e, o,
|
|
36
|
+
function K(e, o, t) {
|
|
36
37
|
var u;
|
|
37
|
-
if (!(
|
|
38
|
-
const
|
|
39
|
-
return
|
|
38
|
+
if (!(t != null && t.trim())) return !0;
|
|
39
|
+
const l = e.includes(".") ? ((u = e.split(".").pop()) == null ? void 0 : u.toLowerCase()) ?? "" : "";
|
|
40
|
+
return t.split(",").map((p) => p.trim()).filter(Boolean).some((p) => p.startsWith(".") ? l === p.slice(1).toLowerCase() : p.endsWith("/*") ? o.startsWith(p.slice(0, -1)) : o === p);
|
|
40
41
|
}
|
|
41
42
|
const n = C, c = P, s = ce(C, "modelValue"), d = fe(), {
|
|
42
43
|
prefixCls: r
|
|
43
|
-
} =
|
|
44
|
+
} = ge("upload"), x = b(), y = b(!1), k = b([]), [j, v] = Se({
|
|
44
45
|
onOk() {
|
|
45
46
|
c("ok", s.value);
|
|
46
47
|
},
|
|
@@ -61,21 +62,21 @@ const Pe = /* @__PURE__ */ de({
|
|
|
61
62
|
});
|
|
62
63
|
const U = m(() => s.value.length > n.gridThreshold), g = m(() => n.limit ?? 0), _ = m(() => n.uploadOssApi ?? F.uploadOssApi), G = m(() => n.uploadOssViewApi ?? F.uploadOssViewApi);
|
|
63
64
|
async function q(e, o) {
|
|
64
|
-
const
|
|
65
|
-
i.append("key",
|
|
65
|
+
const l = `${n.ossDir || o.dir || "notice"}/${Date.now()}_${e.name}`, i = new FormData();
|
|
66
|
+
i.append("key", l), i.append("policy", o.policy), i.append("x-oss-signature-version", o.version), i.append("x-oss-signature", o.signature), i.append("x-oss-credential", o.x_oss_credential), i.append("x-oss-date", o.x_oss_date), i.append("x-oss-security-token", o.security_token), o.callback && i.append("callback", o.callback), i.append("success_action_status", "200"), i.append("file", e);
|
|
66
67
|
const u = await fetch(o.host, {
|
|
67
68
|
method: "POST",
|
|
68
69
|
body: i
|
|
69
70
|
});
|
|
70
71
|
if (!u.ok && u.status !== 203)
|
|
71
72
|
throw new Error(`OSS 上传失败: ${u.status}`);
|
|
72
|
-
return
|
|
73
|
+
return l;
|
|
73
74
|
}
|
|
74
75
|
function L(e) {
|
|
75
76
|
const o = e.uid;
|
|
76
|
-
s.value = s.value.filter((
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
s.value = s.value.filter((t) => {
|
|
78
|
+
var l;
|
|
79
|
+
return t.uid !== o && ((l = t.file) == null ? void 0 : l.uid) !== o;
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
function T(e, o) {
|
|
@@ -84,43 +85,43 @@ const Pe = /* @__PURE__ */ de({
|
|
|
84
85
|
async function X(e) {
|
|
85
86
|
var o;
|
|
86
87
|
try {
|
|
87
|
-
const
|
|
88
|
-
fileName:
|
|
89
|
-
fileSize:
|
|
90
|
-
fileSuffix: ((o =
|
|
91
|
-
file:
|
|
92
|
-
uid:
|
|
93
|
-
url:
|
|
88
|
+
const t = e.file, l = URL.createObjectURL(t), i = {
|
|
89
|
+
fileName: t.name,
|
|
90
|
+
fileSize: t.size ?? 0,
|
|
91
|
+
fileSuffix: ((o = t.name.split(".").pop()) == null ? void 0 : o.toLowerCase()) || "",
|
|
92
|
+
file: t,
|
|
93
|
+
uid: t.uid,
|
|
94
|
+
url: l
|
|
94
95
|
};
|
|
95
96
|
return s.value = [...s.value, i], c("afterUpload", i), e.onSuccess(i), i;
|
|
96
|
-
} catch (
|
|
97
|
-
f.warning((
|
|
97
|
+
} catch (t) {
|
|
98
|
+
f.warning((t == null ? void 0 : t.message) ?? "上传失败"), T(t, e);
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
async function Y(e) {
|
|
101
|
-
var
|
|
102
|
+
var t;
|
|
102
103
|
const o = _.value;
|
|
103
104
|
try {
|
|
104
|
-
const
|
|
105
|
+
const l = await o(e.file), i = await q(e.file, l), u = {
|
|
105
106
|
fileName: e.file.name,
|
|
106
|
-
ossUploadBaseDir:
|
|
107
|
+
ossUploadBaseDir: l.dir,
|
|
107
108
|
ossKey: i,
|
|
108
109
|
fileSize: e.file.size ?? 0,
|
|
109
|
-
fileSuffix: ((
|
|
110
|
+
fileSuffix: ((t = e.file.name.split(".").pop()) == null ? void 0 : t.toLowerCase()) || "",
|
|
110
111
|
file: e.file,
|
|
111
112
|
uid: e.file.uid
|
|
112
113
|
};
|
|
113
|
-
s.value = [...s.value, u], f.success("上传成功"), c("afterUpload", u), e.onSuccess(
|
|
114
|
-
} catch (
|
|
115
|
-
f.warning((
|
|
114
|
+
s.value = [...s.value, u], f.success("上传成功"), c("afterUpload", u), e.onSuccess(l);
|
|
115
|
+
} catch (l) {
|
|
116
|
+
f.warning((l == null ? void 0 : l.message) ?? "上传失败"), T(l, e);
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
|
-
function H(e, o,
|
|
119
|
-
var
|
|
120
|
-
o.raw && (L(o.raw), c("error", e, o.raw)), (
|
|
119
|
+
function H(e, o, t) {
|
|
120
|
+
var l;
|
|
121
|
+
o.raw && (L(o.raw), c("error", e, o.raw)), (l = n.onError) == null || l.call(n, e, o, t);
|
|
121
122
|
}
|
|
122
123
|
const J = m(() => ({
|
|
123
|
-
...
|
|
124
|
+
...ye(n, D),
|
|
124
125
|
showFileList: !1,
|
|
125
126
|
beforeUpload: Q,
|
|
126
127
|
onExceed: Z,
|
|
@@ -132,7 +133,7 @@ const Pe = /* @__PURE__ */ de({
|
|
|
132
133
|
function Q(e) {
|
|
133
134
|
if (!K(e.name, e.type, n.accept))
|
|
134
135
|
return f.warning(`文件格式不支持,仅支持:${n.accept}`), !1;
|
|
135
|
-
const o = s.value.map((
|
|
136
|
+
const o = s.value.map((t) => Ue(t.fileSize) || be(t.fileSize) ? +t.fileSize : 0).reduce((t, l) => t + l, 0);
|
|
136
137
|
return n.maxSize && (e.size + o) / 1024 / 1024 > n.maxSize ? (f.warning(`文件大小不能超过 ${n.maxSize}MB`), !1) : g.value > 0 && s.value.length >= g.value ? (f.warning("已超过上传数量"), !1) : V(n.beforeUpload) ? n.beforeUpload(e) : !0;
|
|
137
138
|
}
|
|
138
139
|
function Z() {
|
|
@@ -142,48 +143,48 @@ const Pe = /* @__PURE__ */ de({
|
|
|
142
143
|
return e.ossKey ? e.ossKey : e.uid != null ? e.uid : e.fileName;
|
|
143
144
|
}
|
|
144
145
|
function ee(e) {
|
|
145
|
-
var
|
|
146
|
+
var l;
|
|
146
147
|
const o = h(e);
|
|
147
148
|
if (!o)
|
|
148
149
|
throw new Error("No OssKey");
|
|
149
|
-
const
|
|
150
|
-
|
|
150
|
+
const t = s.value.filter((i) => h(i) !== o);
|
|
151
|
+
t.length !== s.value.length && (s.value = t), e.file && ((l = x.value) == null || l.handleRemove(e.file)), c("delete", e);
|
|
151
152
|
}
|
|
152
153
|
async function E(e) {
|
|
153
|
-
var
|
|
154
|
+
var t;
|
|
154
155
|
const o = G.value;
|
|
155
156
|
if (!(!o || !e.ossKey))
|
|
156
157
|
try {
|
|
157
|
-
const i = (
|
|
158
|
+
const i = (t = (await o({
|
|
158
159
|
filePath: e.ossKey
|
|
159
|
-
})).find((u) => u.fileName === e.ossKey)) == null ? void 0 :
|
|
160
|
+
})).find((u) => u.fileName === e.ossKey)) == null ? void 0 : t.fileUrl;
|
|
160
161
|
return e.url = i, i;
|
|
161
|
-
} catch (
|
|
162
|
-
f.warning((
|
|
162
|
+
} catch (l) {
|
|
163
|
+
f.warning((l == null ? void 0 : l.message) ?? "获取文件地址失败");
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
165
166
|
}
|
|
166
167
|
async function oe(e, o) {
|
|
167
|
-
const
|
|
168
|
+
const l = await (await fetch(e)).blob(), i = URL.createObjectURL(l), u = document.createElement("a");
|
|
168
169
|
u.href = i, u.download = o, u.click(), URL.revokeObjectURL(i);
|
|
169
170
|
}
|
|
170
|
-
async function
|
|
171
|
+
async function te(e) {
|
|
171
172
|
c("preview", e);
|
|
172
173
|
let o = await E(e);
|
|
173
174
|
_.value || (o = URL.createObjectURL(e.file)), o && (B(e.fileName) ? (k.value = [o], y.value = !0) : window.open(o, "_blank"));
|
|
174
175
|
}
|
|
175
|
-
async function
|
|
176
|
+
async function le(e) {
|
|
176
177
|
let o = !1;
|
|
177
178
|
if (o = V(n.beforeDownload) ? !!await n.beforeDownload(e) : n.beforeDownload, !o) {
|
|
178
179
|
c("download", e);
|
|
179
180
|
return;
|
|
180
181
|
}
|
|
181
|
-
let
|
|
182
|
-
_.value ?
|
|
182
|
+
let t;
|
|
183
|
+
_.value ? t = await E(e) : t = URL.createObjectURL(e.file), t && oe(t, e.fileName);
|
|
183
184
|
}
|
|
184
185
|
const ae = () => a("div", {
|
|
185
186
|
class: `${r}-area`
|
|
186
|
-
}, [a(
|
|
187
|
+
}, [a(he, we({
|
|
187
188
|
ref: x
|
|
188
189
|
}, J.value), {
|
|
189
190
|
default: () => {
|
|
@@ -200,8 +201,8 @@ const Pe = /* @__PURE__ */ de({
|
|
|
200
201
|
class: `${r}-dragger__tip`
|
|
201
202
|
}, [((o = d.uploadTip) == null ? void 0 : o.call(d)) || n.uploadTip]), n.showTemplateDownload && a("div", {
|
|
202
203
|
class: `${r}-dragger__template`,
|
|
203
|
-
onClick: (
|
|
204
|
-
|
|
204
|
+
onClick: (t) => {
|
|
205
|
+
t.stopPropagation(), c("templateDownload");
|
|
205
206
|
}
|
|
206
207
|
}, [n.templateText])])];
|
|
207
208
|
}
|
|
@@ -213,13 +214,13 @@ const Pe = /* @__PURE__ */ de({
|
|
|
213
214
|
}, [n.showPreview && a($, {
|
|
214
215
|
type: "primary",
|
|
215
216
|
link: !0,
|
|
216
|
-
onClick: () =>
|
|
217
|
+
onClick: () => te(e)
|
|
217
218
|
}, {
|
|
218
219
|
default: () => [w("查看")]
|
|
219
220
|
}), n.showDownload && a($, {
|
|
220
221
|
type: "primary",
|
|
221
222
|
link: !0,
|
|
222
|
-
onClick: () =>
|
|
223
|
+
onClick: () => le(e)
|
|
223
224
|
}, {
|
|
224
225
|
default: () => [w("下载")]
|
|
225
226
|
}), n.showDelete && a($, {
|
|
@@ -269,14 +270,14 @@ const Pe = /* @__PURE__ */ de({
|
|
|
269
270
|
index: o
|
|
270
271
|
}) : U.value ? ne(e, o) : ie(e, o), se = () => {
|
|
271
272
|
if (!n.showFileList || s.value.length === 0) return null;
|
|
272
|
-
const e = s.value.map((
|
|
273
|
+
const e = s.value.map((l, i) => re(l, i)), o = U.value ? `${r}-filelist__grid` : `${r}-filelist__list`, t = U.value ? {
|
|
273
274
|
gridTemplateColumns: `repeat(${n.gridColumns}, 1fr)`
|
|
274
275
|
} : void 0;
|
|
275
276
|
return a("div", {
|
|
276
277
|
class: `${r}-filelist`
|
|
277
278
|
}, [a("div", {
|
|
278
279
|
class: o,
|
|
279
|
-
style:
|
|
280
|
+
style: t
|
|
280
281
|
}, [e]), n.showCount && g.value > 0 && a("div", {
|
|
281
282
|
class: `${r}-filelist__count`
|
|
282
283
|
}, [a("span", {
|
|
@@ -288,7 +289,7 @@ const Pe = /* @__PURE__ */ de({
|
|
|
288
289
|
var e;
|
|
289
290
|
return a("div", {
|
|
290
291
|
class: r
|
|
291
|
-
}, [ae(), se(), (e = d.footer) == null ? void 0 : e.call(d), y.value && a(
|
|
292
|
+
}, [ae(), se(), (e = d.footer) == null ? void 0 : e.call(d), y.value && a(_e, {
|
|
292
293
|
urlList: k.value,
|
|
293
294
|
hideOnClickModal: !0,
|
|
294
295
|
teleported: !0,
|
|
@@ -301,5 +302,5 @@ const Pe = /* @__PURE__ */ de({
|
|
|
301
302
|
}
|
|
302
303
|
});
|
|
303
304
|
export {
|
|
304
|
-
|
|
305
|
+
De as default
|
|
305
306
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { isArray as E } from "lodash-es";
|
|
2
2
|
import { nextTick as M, computed as h } from "vue";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import R from "./use-css-variable.js";
|
|
4
|
+
import S from "./use-draggable.js";
|
|
5
|
+
import w from "./use-fullscreen.js";
|
|
6
|
+
import A from "./use-resizer.js";
|
|
7
7
|
const l = {};
|
|
8
|
-
function
|
|
8
|
+
function v(u, r, t) {
|
|
9
9
|
var f, m, p;
|
|
10
10
|
const o = E(t.children), a = (m = (f = t.children[0]) == null ? void 0 : f.props) == null ? void 0 : m.modelValue;
|
|
11
11
|
if (!o || !a) return;
|
|
@@ -20,8 +20,8 @@ function x(u, r, t) {
|
|
|
20
20
|
y.style.overflow = "hidden";
|
|
21
21
|
const e = s.querySelector(`.${d} .el-dialog`);
|
|
22
22
|
e.style.display = "flex", e.style.flexDirection = "column", e.style.overflow = "auto";
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const x = e.querySelector(".el-dialog__body");
|
|
24
|
+
x.style.flexGrow = "1";
|
|
25
25
|
const z = e.querySelector("header.el-dialog__header"), D = h(() => {
|
|
26
26
|
var i;
|
|
27
27
|
return ((i = r.value) == null ? void 0 : i.resizer) ?? !0;
|
|
@@ -29,12 +29,12 @@ function x(u, r, t) {
|
|
|
29
29
|
var i;
|
|
30
30
|
return ((i = r.value) == null ? void 0 : i.draggable) ?? !1;
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
S(e, z, q, c, r), (g = r.value) != null && g.resizer && (R(e), A(e, D, c, r)), (b = r.value) != null && b.fullscreen && w(e, _);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const C = {
|
|
36
|
-
mounted:
|
|
37
|
-
updated:
|
|
36
|
+
mounted: v,
|
|
37
|
+
updated: v,
|
|
38
38
|
beforeUnmount: (u, r, t) => {
|
|
39
39
|
const o = t.ctx;
|
|
40
40
|
if (!(!(o != null && o.uid) || !l[o.uid])) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useElementScreenshot as y } from "@dazhicheng/hooks";
|
|
2
|
-
import { GlobalConfig as g } from "
|
|
2
|
+
import { GlobalConfig as g } from "./useSetup.js";
|
|
3
3
|
function O(a = "png") {
|
|
4
4
|
const e = a === "jpeg" ? "jpg" : "png";
|
|
5
5
|
return `screenshot-${Date.now()}.${e}`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { computed as l } from "vue";
|
|
2
|
+
function c(r) {
|
|
3
|
+
return {
|
|
4
|
+
getTableSlotKeys: l(() => Object.keys(r).filter((e) => e.startsWith("t-")).map((e) => e)),
|
|
5
|
+
replaceTableSlotKey: (t) => {
|
|
6
|
+
var e;
|
|
7
|
+
return t ? ((e = t == null ? void 0 : t.replace) == null ? void 0 : e.call(t, /t-/, "")) ?? "" : "";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as useTableSlot
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function u(r) {
|
|
2
|
+
function e(t) {
|
|
3
|
+
return Object.keys(t).filter((s) => s.startsWith(r));
|
|
4
|
+
}
|
|
5
|
+
function o(t) {
|
|
6
|
+
var n;
|
|
7
|
+
return t ? ((n = t == null ? void 0 : t.replace) == null ? void 0 : n.call(t, new RegExp(r), "")) ?? "" : "";
|
|
8
|
+
}
|
|
9
|
+
return { getSlotKeys: e, replaceSlotKey: o };
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
u as useTemplateSlot
|
|
13
|
+
};
|