@yeepay/yee-boss-ui 0.1.16 → 0.1.18
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/README.md +124 -59
- package/dist/PlatformConfigProvider-BwqlDDcK.js +34 -0
- package/dist/YeeDescriptions-BZ33odSs.js +128 -0
- package/dist/YeeEllipsisText-CR94Jym2.js +100 -0
- package/dist/YeeFileUpload-DvRN1D-j.js +196 -0
- package/dist/YeePage-Dbvn1TNi.js +99 -0
- package/dist/YeeTabs-BPzlkZy6.js +891 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-shell.d.ts +2 -0
- package/dist/app-shell.js +20 -0
- package/dist/components/app-shell/YeeAppShell.vue.d.ts +28 -0
- package/dist/components/app-shell/YeeHeader.vue.d.ts +40 -0
- package/dist/components/app-shell/YeeMenu.vue.d.ts +32 -0
- package/dist/components/app-shell/YeeSidebar.vue.d.ts +35 -0
- package/dist/components/app-shell/YeeTabs.vue.d.ts +69 -0
- package/dist/components/app-shell/index.d.ts +6 -0
- package/dist/components/app-shell/types.d.ts +258 -0
- package/dist/components/app-shell/use-tabs-drag.d.ts +7 -0
- package/dist/components/app-shell/use-tabs-scroll.d.ts +15 -0
- package/dist/components/grid/types.d.ts +1 -4
- package/dist/components/grid/vxe-init.d.ts +1 -1
- package/dist/components/modal/YeeModal.vue.d.ts +3 -3
- package/dist/context-C5gszWl6.js +4 -0
- package/dist/context-DJQ4f46a.js +12 -0
- package/dist/core.d.ts +8 -0
- package/dist/core.js +14 -0
- package/dist/descriptions.d.ts +1 -0
- package/dist/descriptions.js +4 -0
- package/dist/ellipsis-text.d.ts +1 -0
- package/dist/ellipsis-text.js +4 -0
- package/dist/file-upload.d.ts +1 -0
- package/dist/file-upload.js +4 -0
- package/dist/form-api-DbIL_dvg.js +201 -0
- package/dist/form.d.ts +1 -0
- package/dist/form.js +5 -0
- package/dist/grid.d.ts +1 -0
- package/dist/grid.js +5 -0
- package/dist/index-DZP16zRG.js +261 -0
- package/dist/index-kF3hvw2Z.js +132 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +36 -2206
- package/dist/modal.d.ts +1 -0
- package/dist/modal.js +4 -0
- package/dist/page.d.ts +1 -0
- package/dist/page.js +4 -0
- package/dist/platform-message-BgD7E-34.js +22 -0
- package/dist/select.d.ts +1 -0
- package/dist/select.js +4 -0
- package/dist/style.css +1 -1
- package/dist/use-yee-grid-rYoenViE.js +464 -0
- package/package.json +68 -24
- package/dist/components/file-preview/YeeFilePreview.vue.d.ts +0 -23
- package/dist/components/file-preview/index.d.ts +0 -2
- package/dist/components/file-preview/source.d.ts +0 -8
- package/dist/components/file-preview/types.d.ts +0 -70
- package/dist/components/file-preview/useFilePreview.d.ts +0 -31
- package/dist/docx-preview.min-lCFRKxYn.js +0 -4852
- package/dist/marked.esm-DaHdfxOj.js +0 -1563
- package/dist/postal-mime-CPJ2QXsD.js +0 -3219
- package/dist/purify.es-HJ4qIUVZ.js +0 -869
- package/dist/xlsx-CF422ARu.js +0 -24728
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { shallowRef as z, defineComponent as D, reactive as ne, useTemplateRef as U, computed as d, onMounted as Q, onBeforeUnmount as K, openBlock as V, createBlock as F, unref as N, mergeProps as J, withCtx as v, createElementVNode as P, normalizeStyle as ae, renderSlot as S, createTextVNode as X, toDisplayString as Z, nextTick as $, useSlots as le, inject as W, watch as se, onUnmounted as ue, createElementBlock as B, normalizeClass as ce, withDirectives as me, vShow as de, createCommentVNode as E, createVNode as M, toHandlers as pe, createSlots as fe, normalizeProps as L, guardReactiveProps as I, renderList as ge, h as ve } from "vue";
|
|
2
|
+
import { Tooltip as ee, Modal as he, Select as be } from "ant-design-vue";
|
|
3
|
+
import te from "vxe-table/es/grid";
|
|
4
|
+
import h from "vxe-table/es/ui";
|
|
5
|
+
import { p as ye } from "./context-DJQ4f46a.js";
|
|
6
|
+
import { a as xe, Y as Te } from "./form-api-DbIL_dvg.js";
|
|
7
|
+
import { p as Ce } from "./context-C5gszWl6.js";
|
|
8
|
+
import we from "vxe-pc-ui/es/button";
|
|
9
|
+
import Ve from "vxe-pc-ui/es/checkbox";
|
|
10
|
+
import Se from "vxe-pc-ui/es/icon";
|
|
11
|
+
import ze from "vxe-pc-ui/es/input";
|
|
12
|
+
import He from "vxe-pc-ui/es/loading";
|
|
13
|
+
import Ae from "vxe-pc-ui/es/modal";
|
|
14
|
+
import Ne from "vxe-pc-ui/es/number-input";
|
|
15
|
+
import Pe from "vxe-pc-ui/es/pager";
|
|
16
|
+
import _e from "vxe-pc-ui/es/radio-group";
|
|
17
|
+
import Ee from "vxe-pc-ui/es/select";
|
|
18
|
+
import ke from "vxe-table/es/colgroup";
|
|
19
|
+
import Ge from "vxe-table/es/column";
|
|
20
|
+
import Oe from "vxe-table/es/locale/lang/zh-CN";
|
|
21
|
+
import Re from "vxe-table/es/table";
|
|
22
|
+
import Ye from "vxe-table/es/toolbar";
|
|
23
|
+
import { _ as $e } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
24
|
+
class Be {
|
|
25
|
+
/** 查询表单控制器。 */
|
|
26
|
+
formApi = new xe();
|
|
27
|
+
/** 查询表单当前是否可见。 */
|
|
28
|
+
searchFormVisible;
|
|
29
|
+
/** 当前 Grid 初始化配置。 */
|
|
30
|
+
state;
|
|
31
|
+
grid;
|
|
32
|
+
constructor(e) {
|
|
33
|
+
this.state = z(e), this.searchFormVisible = z(e.showSearchForm ?? !0);
|
|
34
|
+
}
|
|
35
|
+
/** @internal 由 YeeGrid 挂载底层 VXE Grid 实例。 */
|
|
36
|
+
mount(e) {
|
|
37
|
+
this.grid = e;
|
|
38
|
+
}
|
|
39
|
+
/** 保留当前页码并执行查询,可在查询前合并表单值。 */
|
|
40
|
+
query = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("query"));
|
|
41
|
+
/** 回到第一页并重新查询,可在查询前合并表单值。 */
|
|
42
|
+
reload = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("reload"));
|
|
43
|
+
/** 合并更新 VXE Grid 配置。 */
|
|
44
|
+
setGridOptions(e) {
|
|
45
|
+
this.setState({
|
|
46
|
+
gridOptions: {
|
|
47
|
+
...this.state.value.gridOptions,
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/** 设置表格加载状态。 */
|
|
53
|
+
setLoading(e) {
|
|
54
|
+
this.setGridOptions({ loading: e });
|
|
55
|
+
}
|
|
56
|
+
/** 合并更新 useYeeGrid 初始化配置。 */
|
|
57
|
+
setState(e) {
|
|
58
|
+
this.state.value = {
|
|
59
|
+
...this.state.value,
|
|
60
|
+
...e
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/** 切换查询表单显隐,并返回切换后的状态。 */
|
|
64
|
+
toggleSearchForm(e) {
|
|
65
|
+
return this.searchFormVisible.value = e ?? !this.searchFormVisible.value, this.searchFormVisible.value;
|
|
66
|
+
}
|
|
67
|
+
/** @internal 清理底层 VXE Grid 实例引用。 */
|
|
68
|
+
unmount() {
|
|
69
|
+
this.grid = void 0;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const Me = /* @__PURE__ */ D({
|
|
73
|
+
inheritAttrs: !1,
|
|
74
|
+
name: "VxeTooltip",
|
|
75
|
+
__name: "YeeGridTooltip",
|
|
76
|
+
props: {
|
|
77
|
+
content: {},
|
|
78
|
+
enterDelay: {},
|
|
79
|
+
enterable: { type: Boolean },
|
|
80
|
+
height: {},
|
|
81
|
+
isArrow: { type: Boolean, default: !0 },
|
|
82
|
+
leaveDelay: {},
|
|
83
|
+
maxHeight: {},
|
|
84
|
+
maxWidth: {},
|
|
85
|
+
minHeight: {},
|
|
86
|
+
minWidth: {},
|
|
87
|
+
modelValue: { type: Boolean },
|
|
88
|
+
popupClassName: {},
|
|
89
|
+
selector: {},
|
|
90
|
+
theme: {},
|
|
91
|
+
trigger: {},
|
|
92
|
+
useHTML: { type: Boolean },
|
|
93
|
+
width: {},
|
|
94
|
+
zIndex: {}
|
|
95
|
+
},
|
|
96
|
+
emits: ["update:modelValue"],
|
|
97
|
+
setup(n, { expose: e, emit: l }) {
|
|
98
|
+
const t = n, a = l, C = ee, s = ne({ visible: !1 }), w = U("tooltip"), b = z(), y = z(""), x = z(), T = z(!1);
|
|
99
|
+
let p;
|
|
100
|
+
function f(o) {
|
|
101
|
+
if (!(o === void 0 || o === ""))
|
|
102
|
+
return typeof o == "number" ? `${o}px` : o;
|
|
103
|
+
}
|
|
104
|
+
const k = d(() => {
|
|
105
|
+
const o = b.value;
|
|
106
|
+
return !o || !s.visible ? { display: "none" } : {
|
|
107
|
+
height: `${Math.max(o.height, 1)}px`,
|
|
108
|
+
left: `${o.left}px`,
|
|
109
|
+
pointerEvents: "none",
|
|
110
|
+
position: "fixed",
|
|
111
|
+
top: `${o.top}px`,
|
|
112
|
+
width: `${Math.max(o.width, 1)}px`
|
|
113
|
+
};
|
|
114
|
+
}), G = d(() => ({
|
|
115
|
+
cursor: t.enterable ? "text" : void 0,
|
|
116
|
+
height: f(t.height),
|
|
117
|
+
maxHeight: f(t.maxHeight),
|
|
118
|
+
maxWidth: f(t.maxWidth),
|
|
119
|
+
minHeight: f(t.minHeight),
|
|
120
|
+
minWidth: f(t.minWidth),
|
|
121
|
+
userSelect: t.enterable ? "text" : void 0,
|
|
122
|
+
width: f(t.width)
|
|
123
|
+
})), O = d(() => ({
|
|
124
|
+
...t.popupClassName ? { overlayClassName: t.popupClassName } : {},
|
|
125
|
+
...t.zIndex === void 0 ? {} : { zIndex: Number(t.zIndex) }
|
|
126
|
+
}));
|
|
127
|
+
function R(o) {
|
|
128
|
+
return o.closest("body") ?? document.body;
|
|
129
|
+
}
|
|
130
|
+
function Y(o) {
|
|
131
|
+
return o || (typeof t.selector == "string" ? document.querySelector(t.selector) ?? void 0 : t.selector);
|
|
132
|
+
}
|
|
133
|
+
function i() {
|
|
134
|
+
const o = x.value;
|
|
135
|
+
if (!o?.isConnected)
|
|
136
|
+
return m();
|
|
137
|
+
const c = o.getBoundingClientRect();
|
|
138
|
+
return b.value = {
|
|
139
|
+
height: c.height,
|
|
140
|
+
left: c.left,
|
|
141
|
+
top: c.top,
|
|
142
|
+
width: c.width
|
|
143
|
+
}, $(() => w.value?.forcePopupAlign?.());
|
|
144
|
+
}
|
|
145
|
+
function r(o, c) {
|
|
146
|
+
const A = Y(o);
|
|
147
|
+
return A ? (x.value = A, y.value = c ?? t.content ?? "", T.value = !0, s.visible = !0, a("update:modelValue", !0), i()) : $();
|
|
148
|
+
}
|
|
149
|
+
function u(o, c, A) {
|
|
150
|
+
const re = o.currentTarget instanceof HTMLElement ? o.currentTarget : void 0;
|
|
151
|
+
return r(c ?? re, A);
|
|
152
|
+
}
|
|
153
|
+
function m() {
|
|
154
|
+
return T.value = !1, x.value = void 0, b.value = void 0, s.visible = !1, a("update:modelValue", !1), $();
|
|
155
|
+
}
|
|
156
|
+
function g(o) {
|
|
157
|
+
o && p && (clearTimeout(p), p = void 0), T.value = o;
|
|
158
|
+
}
|
|
159
|
+
function H() {
|
|
160
|
+
return T.value;
|
|
161
|
+
}
|
|
162
|
+
function _() {
|
|
163
|
+
s.visible && i();
|
|
164
|
+
}
|
|
165
|
+
function ie() {
|
|
166
|
+
g(!1), t.enterable && (p = setTimeout(() => {
|
|
167
|
+
p = void 0, T.value || m();
|
|
168
|
+
}, t.leaveDelay ?? 0));
|
|
169
|
+
}
|
|
170
|
+
return Q(() => {
|
|
171
|
+
window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), t.modelValue && r(void 0, t.content);
|
|
172
|
+
}), K(() => {
|
|
173
|
+
p && clearTimeout(p), window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
174
|
+
}), e({
|
|
175
|
+
close: m,
|
|
176
|
+
isActived: H,
|
|
177
|
+
open: r,
|
|
178
|
+
openByEvent: u,
|
|
179
|
+
reactData: s,
|
|
180
|
+
setActived: g,
|
|
181
|
+
toVisible: r,
|
|
182
|
+
updatePlacement: i
|
|
183
|
+
}), (o, c) => (V(), F(N(C), J({ ref: "tooltip" }, O.value, {
|
|
184
|
+
arrow: t.isArrow !== !1,
|
|
185
|
+
"get-popup-container": R,
|
|
186
|
+
open: s.visible,
|
|
187
|
+
"overlay-inner-style": G.value,
|
|
188
|
+
placement: "top"
|
|
189
|
+
}), {
|
|
190
|
+
title: v(() => [
|
|
191
|
+
P("div", {
|
|
192
|
+
class: "yee-ui-grid-tooltip-content",
|
|
193
|
+
onMouseenter: c[0] || (c[0] = (A) => t.enterable && g(!0)),
|
|
194
|
+
onMouseleave: ie
|
|
195
|
+
}, [
|
|
196
|
+
S(o.$slots, "content", {}, () => [
|
|
197
|
+
X(Z(y.value), 1)
|
|
198
|
+
])
|
|
199
|
+
], 32)
|
|
200
|
+
]),
|
|
201
|
+
default: v(() => [
|
|
202
|
+
P("span", {
|
|
203
|
+
"aria-hidden": "true",
|
|
204
|
+
class: "yee-ui-grid-tooltip-anchor",
|
|
205
|
+
style: ae(k.value)
|
|
206
|
+
}, null, 4)
|
|
207
|
+
]),
|
|
208
|
+
_: 3
|
|
209
|
+
}, 16, ["arrow", "open", "overlay-inner-style"]));
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
let q = !1;
|
|
213
|
+
const j = /* @__PURE__ */ new Set();
|
|
214
|
+
function Le() {
|
|
215
|
+
const n = h.modal.confirm.bind(h.modal);
|
|
216
|
+
h.modal.confirm = ((e, l, t) => {
|
|
217
|
+
const a = typeof e == "object" && e !== null ? e : typeof t == "object" && t !== null ? t : void 0;
|
|
218
|
+
if ((typeof a?.className == "string" ? a.className.split(/\s+/) : []).includes("vxe-table--ignore-clear")) {
|
|
219
|
+
const s = [...j], w = s[s.length - 1];
|
|
220
|
+
if (w) {
|
|
221
|
+
const b = typeof a?.content == "string" ? a.content : String(a?.content ?? e);
|
|
222
|
+
return w(b);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return n(e, l, t);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
function Ie(n) {
|
|
229
|
+
return j.add(n), () => j.delete(n);
|
|
230
|
+
}
|
|
231
|
+
function oe() {
|
|
232
|
+
if (q) return;
|
|
233
|
+
h.hasLanguage("zh-CN") || (h.setI18n("zh-CN", Oe), h.setLanguage("zh-CN")), [
|
|
234
|
+
Re,
|
|
235
|
+
Ge,
|
|
236
|
+
ke,
|
|
237
|
+
te,
|
|
238
|
+
Ye,
|
|
239
|
+
we,
|
|
240
|
+
Ve,
|
|
241
|
+
Se,
|
|
242
|
+
ze,
|
|
243
|
+
He,
|
|
244
|
+
Ae,
|
|
245
|
+
Ne,
|
|
246
|
+
Pe,
|
|
247
|
+
_e,
|
|
248
|
+
Ee,
|
|
249
|
+
Me
|
|
250
|
+
].forEach((e) => h.component(e)), Le(), q = !0;
|
|
251
|
+
}
|
|
252
|
+
const Fe = {
|
|
253
|
+
key: 1,
|
|
254
|
+
class: "yee-ui-grid__separator"
|
|
255
|
+
}, je = { class: "yee-ui-grid__table-container" }, De = {
|
|
256
|
+
key: 0,
|
|
257
|
+
class: "yee-ui-grid__title"
|
|
258
|
+
}, We = /* @__PURE__ */ D({
|
|
259
|
+
name: "YeeGrid",
|
|
260
|
+
__name: "YeeGrid",
|
|
261
|
+
props: {
|
|
262
|
+
api: {},
|
|
263
|
+
tableTitle: {},
|
|
264
|
+
tableTitleHelp: {}
|
|
265
|
+
},
|
|
266
|
+
setup(n) {
|
|
267
|
+
const e = n, l = le(), t = U("gridRef"), a = W(ye), C = W(Ce, void 0), [s, w] = he.useModal();
|
|
268
|
+
oe();
|
|
269
|
+
const b = Ie((i) => new Promise((r) => {
|
|
270
|
+
s.confirm({
|
|
271
|
+
title: "恢复默认列配置",
|
|
272
|
+
content: i,
|
|
273
|
+
centered: !0,
|
|
274
|
+
okText: "确认",
|
|
275
|
+
cancelText: "取消",
|
|
276
|
+
keyboard: !0,
|
|
277
|
+
wrapClassName: "vxe-table--ignore-clear",
|
|
278
|
+
onOk: () => r("confirm"),
|
|
279
|
+
onCancel: () => r("cancel")
|
|
280
|
+
});
|
|
281
|
+
})), y = d(() => e.api.state.value), x = d(() => y.value.formOptions), T = d(() => !!(e.tableTitle || l["table-title"] || l["toolbar-actions"] || l["toolbar-tools"])), p = d(() => Object.keys(l).filter((i) => ![
|
|
282
|
+
"empty",
|
|
283
|
+
"loading",
|
|
284
|
+
"table-title",
|
|
285
|
+
"toolbar-actions",
|
|
286
|
+
"toolbar-tools"
|
|
287
|
+
].includes(i))), f = d(() => C?.value ?? !1), k = d(() => {
|
|
288
|
+
const i = y.value.gridOptions, r = i.proxyConfig, u = r?.ajax?.query, m = i.toolbarConfig, g = i.pagerConfig;
|
|
289
|
+
return {
|
|
290
|
+
align: "left",
|
|
291
|
+
border: "inner",
|
|
292
|
+
minHeight: 180,
|
|
293
|
+
showHeaderOverflow: "tooltip",
|
|
294
|
+
showOverflow: "tooltip",
|
|
295
|
+
size: "medium",
|
|
296
|
+
...f.value ? { height: "auto" } : {},
|
|
297
|
+
...i,
|
|
298
|
+
columnConfig: {
|
|
299
|
+
resizable: !0,
|
|
300
|
+
...i.columnConfig
|
|
301
|
+
},
|
|
302
|
+
tooltipConfig: {
|
|
303
|
+
enterable: !0,
|
|
304
|
+
leaveDelay: 300,
|
|
305
|
+
...i.tooltipConfig
|
|
306
|
+
},
|
|
307
|
+
...g ? {
|
|
308
|
+
pagerConfig: {
|
|
309
|
+
pageSize: 20,
|
|
310
|
+
pageSizes: [10, 20, 30, 50, 100, 200],
|
|
311
|
+
layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
|
|
312
|
+
...g,
|
|
313
|
+
slots: {
|
|
314
|
+
sizes: "pagerSizes",
|
|
315
|
+
...g.slots
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
} : {},
|
|
319
|
+
...r ? {
|
|
320
|
+
proxyConfig: {
|
|
321
|
+
autoLoad: !0,
|
|
322
|
+
showResponseMsg: !1,
|
|
323
|
+
...r,
|
|
324
|
+
response: {
|
|
325
|
+
list: "items",
|
|
326
|
+
result: "items",
|
|
327
|
+
total: "total",
|
|
328
|
+
...r.response
|
|
329
|
+
},
|
|
330
|
+
...r.ajax ? {
|
|
331
|
+
ajax: {
|
|
332
|
+
...r.ajax,
|
|
333
|
+
...u ? {
|
|
334
|
+
query: (H) => u(H, e.api.formApi.getValues())
|
|
335
|
+
} : {}
|
|
336
|
+
}
|
|
337
|
+
} : {}
|
|
338
|
+
}
|
|
339
|
+
} : {},
|
|
340
|
+
...m || T.value ? {
|
|
341
|
+
toolbarConfig: {
|
|
342
|
+
custom: !0,
|
|
343
|
+
refresh: !0,
|
|
344
|
+
zoom: !0,
|
|
345
|
+
...m,
|
|
346
|
+
slots: {
|
|
347
|
+
...e.tableTitle || l["table-title"] || l["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
|
|
348
|
+
...l["toolbar-tools"] ? { tools: "toolbarTools" } : {}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} : {}
|
|
352
|
+
};
|
|
353
|
+
}), G = d(() => y.value.gridEvents ?? {});
|
|
354
|
+
se(
|
|
355
|
+
() => a?.value.mode ?? "light",
|
|
356
|
+
(i) => h.setTheme(i),
|
|
357
|
+
{ immediate: !0 }
|
|
358
|
+
);
|
|
359
|
+
async function O() {
|
|
360
|
+
await e.api.reload();
|
|
361
|
+
}
|
|
362
|
+
async function R() {
|
|
363
|
+
await e.api.reload();
|
|
364
|
+
}
|
|
365
|
+
function Y(i, r) {
|
|
366
|
+
typeof r != "number" && typeof r != "string" || i.setPageSizeByEvent(new Event("change"), r);
|
|
367
|
+
}
|
|
368
|
+
return Q(() => {
|
|
369
|
+
t.value && e.api.mount(t.value);
|
|
370
|
+
}), ue(() => {
|
|
371
|
+
b(), e.api.unmount();
|
|
372
|
+
}), (i, r) => (V(), B("section", {
|
|
373
|
+
class: ce(["yee-ui-grid", { "yee-ui-grid--fill-page-content": f.value }])
|
|
374
|
+
}, [
|
|
375
|
+
x.value ? me((V(), F(Te, {
|
|
376
|
+
key: 0,
|
|
377
|
+
api: n.api.formApi,
|
|
378
|
+
options: x.value,
|
|
379
|
+
"on-reset": R,
|
|
380
|
+
"on-submit": O
|
|
381
|
+
}, null, 8, ["api", "options"])), [
|
|
382
|
+
[de, n.api.searchFormVisible.value]
|
|
383
|
+
]) : E("", !0),
|
|
384
|
+
x.value && y.value.separator !== !1 ? (V(), B("div", Fe)) : E("", !0),
|
|
385
|
+
P("div", je, [
|
|
386
|
+
M(N(te), J({
|
|
387
|
+
ref_key: "gridRef",
|
|
388
|
+
ref: t,
|
|
389
|
+
class: "yee-ui-grid__table"
|
|
390
|
+
}, k.value, pe(G.value)), fe({
|
|
391
|
+
toolbarActions: v((u) => [
|
|
392
|
+
S(i.$slots, "table-title", {}, () => [
|
|
393
|
+
n.tableTitle ? (V(), B("div", De, [
|
|
394
|
+
X(Z(n.tableTitle) + " ", 1),
|
|
395
|
+
n.tableTitleHelp ? (V(), F(N(ee), {
|
|
396
|
+
key: 0,
|
|
397
|
+
title: n.tableTitleHelp
|
|
398
|
+
}, {
|
|
399
|
+
default: v(() => [...r[0] || (r[0] = [
|
|
400
|
+
P("span", {
|
|
401
|
+
class: "yee-ui-grid__help",
|
|
402
|
+
tabindex: "0"
|
|
403
|
+
}, "?", -1)
|
|
404
|
+
])]),
|
|
405
|
+
_: 1
|
|
406
|
+
}, 8, ["title"])) : E("", !0)
|
|
407
|
+
])) : E("", !0)
|
|
408
|
+
], !0),
|
|
409
|
+
S(i.$slots, "toolbar-actions", L(I(u)), void 0, !0)
|
|
410
|
+
]),
|
|
411
|
+
toolbarTools: v((u) => [
|
|
412
|
+
S(i.$slots, "toolbar-tools", L(I(u)), void 0, !0)
|
|
413
|
+
]),
|
|
414
|
+
pagerSizes: v(({ $pager: u, options: m, pageSize: g }) => [
|
|
415
|
+
M(N(be), {
|
|
416
|
+
class: "yee-ui-grid__page-size",
|
|
417
|
+
options: m,
|
|
418
|
+
value: g,
|
|
419
|
+
onChange: (H) => Y(u, H)
|
|
420
|
+
}, null, 8, ["options", "value", "onChange"])
|
|
421
|
+
]),
|
|
422
|
+
empty: v(() => [
|
|
423
|
+
S(i.$slots, "empty", {}, () => [
|
|
424
|
+
r[1] || (r[1] = P("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
|
|
425
|
+
], !0)
|
|
426
|
+
]),
|
|
427
|
+
_: 2
|
|
428
|
+
}, [
|
|
429
|
+
ge(p.value, (u) => ({
|
|
430
|
+
name: u,
|
|
431
|
+
fn: v((m) => [
|
|
432
|
+
S(i.$slots, u, L(I(m)), void 0, !0)
|
|
433
|
+
])
|
|
434
|
+
}))
|
|
435
|
+
]), 1040)
|
|
436
|
+
]),
|
|
437
|
+
M(N(w))
|
|
438
|
+
], 2));
|
|
439
|
+
}
|
|
440
|
+
}), qe = /* @__PURE__ */ $e(We, [["__scopeId", "data-v-bc8ae91c"]]);
|
|
441
|
+
function ht(n) {
|
|
442
|
+
oe();
|
|
443
|
+
const e = new Be(n), l = qe;
|
|
444
|
+
return [D({
|
|
445
|
+
name: "YeeGrid",
|
|
446
|
+
inheritAttrs: !1,
|
|
447
|
+
props: {
|
|
448
|
+
tableTitle: String,
|
|
449
|
+
tableTitleHelp: String
|
|
450
|
+
},
|
|
451
|
+
setup(a, { attrs: C, slots: s }) {
|
|
452
|
+
return K(() => e.unmount()), () => ve(l, {
|
|
453
|
+
...C,
|
|
454
|
+
api: e,
|
|
455
|
+
...a.tableTitle ? { tableTitle: a.tableTitle } : {},
|
|
456
|
+
...a.tableTitleHelp ? { tableTitleHelp: a.tableTitleHelp } : {}
|
|
457
|
+
}, s);
|
|
458
|
+
}
|
|
459
|
+
}), e];
|
|
460
|
+
}
|
|
461
|
+
export {
|
|
462
|
+
Be as Y,
|
|
463
|
+
ht as u
|
|
464
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeepay/yee-boss-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "运营后台平台公共 UI 与主题基础能力",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,34 @@
|
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js"
|
|
17
17
|
},
|
|
18
|
+
"./app-shell": {
|
|
19
|
+
"types": "./dist/app-shell.d.ts",
|
|
20
|
+
"import": "./dist/app-shell.js"
|
|
21
|
+
},
|
|
22
|
+
"./core": {
|
|
23
|
+
"types": "./dist/core.d.ts",
|
|
24
|
+
"import": "./dist/core.js"
|
|
25
|
+
},
|
|
26
|
+
"./descriptions": {
|
|
27
|
+
"types": "./dist/descriptions.d.ts",
|
|
28
|
+
"import": "./dist/descriptions.js"
|
|
29
|
+
},
|
|
30
|
+
"./ellipsis-text": {
|
|
31
|
+
"types": "./dist/ellipsis-text.d.ts",
|
|
32
|
+
"import": "./dist/ellipsis-text.js"
|
|
33
|
+
},
|
|
34
|
+
"./file-upload": {
|
|
35
|
+
"types": "./dist/file-upload.d.ts",
|
|
36
|
+
"import": "./dist/file-upload.js"
|
|
37
|
+
},
|
|
38
|
+
"./form": {
|
|
39
|
+
"types": "./dist/form.d.ts",
|
|
40
|
+
"import": "./dist/form.js"
|
|
41
|
+
},
|
|
42
|
+
"./grid": {
|
|
43
|
+
"types": "./dist/grid.d.ts",
|
|
44
|
+
"import": "./dist/grid.js"
|
|
45
|
+
},
|
|
18
46
|
"./tailwind-preset": {
|
|
19
47
|
"types": "./dist/tailwind-preset.d.ts",
|
|
20
48
|
"import": "./dist/tailwind-preset.js"
|
|
@@ -24,30 +52,52 @@
|
|
|
24
52
|
"types": "./dist/theme.d.ts",
|
|
25
53
|
"import": "./dist/theme.js"
|
|
26
54
|
},
|
|
55
|
+
"./modal": {
|
|
56
|
+
"types": "./dist/modal.d.ts",
|
|
57
|
+
"import": "./dist/modal.js"
|
|
58
|
+
},
|
|
59
|
+
"./page": {
|
|
60
|
+
"types": "./dist/page.d.ts",
|
|
61
|
+
"import": "./dist/page.js"
|
|
62
|
+
},
|
|
63
|
+
"./select": {
|
|
64
|
+
"types": "./dist/select.d.ts",
|
|
65
|
+
"import": "./dist/select.js"
|
|
66
|
+
},
|
|
27
67
|
"./style.css": "./dist/style.css"
|
|
28
68
|
},
|
|
29
69
|
"dependencies": {
|
|
30
|
-
"@ant-design/icons-vue": "^7.0.1"
|
|
70
|
+
"@ant-design/icons-vue": "^7.0.1",
|
|
71
|
+
"lucide-vue-next": "^0.553.0",
|
|
72
|
+
"sortablejs": "^1.15.7",
|
|
73
|
+
"vxe-pc-ui": "4.12.12",
|
|
74
|
+
"vxe-table": "4.17.46"
|
|
31
75
|
},
|
|
32
76
|
"sideEffects": [
|
|
33
77
|
"**/*.css"
|
|
34
78
|
],
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "vite build",
|
|
81
|
+
"build:example": "vite build --config examples/vite.config.ts",
|
|
82
|
+
"check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
|
|
83
|
+
"example": "vite --config examples/vite.config.ts",
|
|
84
|
+
"prepack": "pnpm check",
|
|
85
|
+
"publint": "publint",
|
|
86
|
+
"test": "vitest run",
|
|
87
|
+
"typecheck": "vue-tsc --noEmit",
|
|
88
|
+
"typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
|
|
89
|
+
},
|
|
35
90
|
"peerDependencies": {
|
|
36
91
|
"ant-design-vue": "^4.2.0",
|
|
37
|
-
"vue": "^3.5.0"
|
|
38
|
-
"vxe-pc-ui": "4.12.12",
|
|
39
|
-
"vxe-table": "4.17.46"
|
|
92
|
+
"vue": "^3.5.0"
|
|
40
93
|
},
|
|
41
94
|
"devDependencies": {
|
|
42
95
|
"@types/node": "^24.10.9",
|
|
96
|
+
"@types/sortablejs": "^1.15.9",
|
|
43
97
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
44
98
|
"@vue/test-utils": "^2.4.6",
|
|
45
99
|
"ant-design-vue": "^4.2.6",
|
|
46
|
-
"docx-preview": "0.1.14",
|
|
47
|
-
"dompurify": "^3.4.13",
|
|
48
100
|
"happy-dom": "^17.6.3",
|
|
49
|
-
"marked": "4.3.0",
|
|
50
|
-
"postal-mime": "^2.7.6",
|
|
51
101
|
"publint": "^0.3.17",
|
|
52
102
|
"sass": "^1.83.0",
|
|
53
103
|
"typescript": "~5.9.3",
|
|
@@ -55,27 +105,21 @@
|
|
|
55
105
|
"vite-plugin-dts": "^4.5.4",
|
|
56
106
|
"vitest": "^3.2.4",
|
|
57
107
|
"vue": "3.5.27",
|
|
58
|
-
"vue-
|
|
59
|
-
"
|
|
60
|
-
"vxe-table": "4.17.46",
|
|
61
|
-
"xlsx": "0.18.5"
|
|
108
|
+
"vue-router": "^4.6.4",
|
|
109
|
+
"vue-tsc": "^3.2.3"
|
|
62
110
|
},
|
|
63
111
|
"engines": {
|
|
64
112
|
"node": ">=20.19.0",
|
|
65
113
|
"pnpm": ">=10.0.0"
|
|
66
114
|
},
|
|
115
|
+
"packageManager": "pnpm@10.28.1",
|
|
116
|
+
"pnpm": {
|
|
117
|
+
"overrides": {
|
|
118
|
+
"@vxe-ui/core": "4.3.1"
|
|
119
|
+
}
|
|
120
|
+
},
|
|
67
121
|
"publishConfig": {
|
|
68
122
|
"access": "public",
|
|
69
123
|
"registry": "https://registry.npmjs.org/"
|
|
70
|
-
},
|
|
71
|
-
"scripts": {
|
|
72
|
-
"build": "vite build",
|
|
73
|
-
"build:example": "vite build --config examples/vite.config.ts",
|
|
74
|
-
"check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
|
|
75
|
-
"example": "vite --config examples/vite.config.ts",
|
|
76
|
-
"publint": "publint",
|
|
77
|
-
"test": "vitest run",
|
|
78
|
-
"typecheck": "vue-tsc --noEmit",
|
|
79
|
-
"typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
|
|
80
124
|
}
|
|
81
|
-
}
|
|
125
|
+
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { YeeFilePreviewError, YeeFilePreviewProps } from './types';
|
|
2
|
-
declare const _default: import('vue').DefineComponent<YeeFilePreviewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
3
|
-
error: (error: YeeFilePreviewError) => any;
|
|
4
|
-
unsupported: (error: YeeFilePreviewError) => any;
|
|
5
|
-
load: (result: import('./types').YeeFilePreviewLoadResult) => any;
|
|
6
|
-
download: () => any;
|
|
7
|
-
}, string, import('vue').PublicProps, Readonly<YeeFilePreviewProps> & Readonly<{
|
|
8
|
-
onError?: (error: YeeFilePreviewError) => any;
|
|
9
|
-
onUnsupported?: (error: YeeFilePreviewError) => any;
|
|
10
|
-
onLoad?: (result: import('./types').YeeFilePreviewLoadResult) => any;
|
|
11
|
-
onDownload?: () => any;
|
|
12
|
-
}>, {
|
|
13
|
-
maxFileSize: number | undefined;
|
|
14
|
-
maxRows: number | undefined;
|
|
15
|
-
maxColumns: number | undefined;
|
|
16
|
-
showHeader: boolean | undefined;
|
|
17
|
-
showDownload: boolean | undefined;
|
|
18
|
-
alt: string | undefined;
|
|
19
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
20
|
-
previewContainer: HTMLElement;
|
|
21
|
-
docxContainer: HTMLDivElement;
|
|
22
|
-
}, HTMLElement>;
|
|
23
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { default as YeeFilePreview } from './YeeFilePreview.vue';
|
|
2
|
-
export type { YeeFilePreviewEmits, YeeFilePreviewEmailMeta, YeeFilePreviewError, YeeFilePreviewKind, YeeFilePreviewLoadResult, YeeFilePreviewProps, YeeFilePreviewSource, YeeFilePreviewStatus, YeeFilePreviewTableRow, } from './types';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { YeeFilePreviewKind, YeeFilePreviewSource } from './types';
|
|
2
|
-
export declare function extensionFromName(name: string | undefined): string;
|
|
3
|
-
export declare function fileNameFromSource(source: YeeFilePreviewSource | undefined): string;
|
|
4
|
-
export declare function kindFromType(type: string | undefined): YeeFilePreviewKind | undefined;
|
|
5
|
-
export declare function resolveFileKind(source: YeeFilePreviewSource | undefined, fileName: string | undefined, fileType: string | undefined): YeeFilePreviewKind;
|
|
6
|
-
export declare function supportedFileExtensions(): readonly string[];
|
|
7
|
-
export declare function isBlobLike(source: YeeFilePreviewSource | undefined): source is Blob | File | ArrayBuffer;
|
|
8
|
-
export declare function sourceToBlob(source: Blob | File | ArrayBuffer): Blob;
|