@yeepay/yee-boss-ui 0.1.20 → 0.1.21
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 +94 -67
- package/dist/YeeGrid-C5jcjTuQ.js +629 -0
- package/dist/components/{form → grid}/form-api.d.ts +8 -4
- package/dist/components/grid/form-component-map.d.ts +9 -0
- package/dist/components/{form/types.d.ts → grid/form-types.d.ts} +45 -42
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/types.d.ts +12 -10
- package/dist/components/grid/use-yee-grid.d.ts +2 -2
- package/dist/components/grid/yee-grid-api.d.ts +4 -3
- package/dist/grid.js +2 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +42 -47
- package/dist/resolver.d.ts +25 -0
- package/dist/resolver.js +22 -0
- package/dist/style.css +1 -5
- package/dist/use-yee-grid-idCNjiBi.js +141 -0
- package/package.json +15 -26
- package/dist/YeeForm-COND7XQj.js +0 -160
- package/dist/YeeGrid-CF-0OZUj.js +0 -395
- package/dist/components/form/YeeForm.vue.d.ts +0 -14
- package/dist/components/form/component-map.d.ts +0 -9
- package/dist/components/form/index.d.ts +0 -3
- package/dist/components/grid/YeeGrid.vue.d.ts +0 -28
- package/dist/components/select/YeeSelect.vue.d.ts +0 -32
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/types.d.ts +0 -120
- package/dist/form-api-0148j8ew.js +0 -44
- package/dist/form.d.ts +0 -1
- package/dist/form.js +0 -6
- package/dist/index-DvY7PmUA.js +0 -132
- package/dist/select.d.ts +0 -1
- package/dist/select.js +0 -4
- package/dist/use-yee-grid-ClKZU8CY.js +0 -85
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.21",
|
|
4
4
|
"description": "运营后台平台公共 UI 与主题基础能力",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -35,10 +35,6 @@
|
|
|
35
35
|
"types": "./dist/file-upload.d.ts",
|
|
36
36
|
"import": "./dist/file-upload.js"
|
|
37
37
|
},
|
|
38
|
-
"./form": {
|
|
39
|
-
"types": "./dist/form.d.ts",
|
|
40
|
-
"import": "./dist/form.js"
|
|
41
|
-
},
|
|
42
38
|
"./grid": {
|
|
43
39
|
"types": "./dist/grid.d.ts",
|
|
44
40
|
"import": "./dist/grid.js"
|
|
@@ -61,9 +57,9 @@
|
|
|
61
57
|
"types": "./dist/page.d.ts",
|
|
62
58
|
"import": "./dist/page.js"
|
|
63
59
|
},
|
|
64
|
-
"./
|
|
65
|
-
"types": "./dist/
|
|
66
|
-
"import": "./dist/
|
|
60
|
+
"./resolver": {
|
|
61
|
+
"types": "./dist/resolver.d.ts",
|
|
62
|
+
"import": "./dist/resolver.js"
|
|
67
63
|
},
|
|
68
64
|
"./style.css": "./dist/style.css"
|
|
69
65
|
},
|
|
@@ -77,17 +73,6 @@
|
|
|
77
73
|
"sideEffects": [
|
|
78
74
|
"**/*.css"
|
|
79
75
|
],
|
|
80
|
-
"scripts": {
|
|
81
|
-
"build": "vite build",
|
|
82
|
-
"build:example": "vite build --config examples/vite.config.ts",
|
|
83
|
-
"check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
|
|
84
|
-
"example": "vite --config examples/vite.config.ts",
|
|
85
|
-
"prepack": "pnpm check",
|
|
86
|
-
"publint": "publint",
|
|
87
|
-
"test": "vitest run",
|
|
88
|
-
"typecheck": "vue-tsc --noEmit",
|
|
89
|
-
"typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
|
|
90
|
-
},
|
|
91
76
|
"peerDependencies": {
|
|
92
77
|
"ant-design-vue": "^4.2.0",
|
|
93
78
|
"vue": "^3.5.0"
|
|
@@ -113,14 +98,18 @@
|
|
|
113
98
|
"node": ">=20.19.0",
|
|
114
99
|
"pnpm": ">=10.0.0"
|
|
115
100
|
},
|
|
116
|
-
"packageManager": "pnpm@10.28.1",
|
|
117
|
-
"pnpm": {
|
|
118
|
-
"overrides": {
|
|
119
|
-
"@vxe-ui/core": "4.3.1"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
101
|
"publishConfig": {
|
|
123
102
|
"access": "public",
|
|
124
103
|
"registry": "https://registry.npmjs.org/"
|
|
104
|
+
},
|
|
105
|
+
"scripts": {
|
|
106
|
+
"build": "vite build",
|
|
107
|
+
"build:example": "vite build --config examples/vite.config.ts",
|
|
108
|
+
"check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
|
|
109
|
+
"example": "vite --config examples/vite.config.ts",
|
|
110
|
+
"publint": "publint",
|
|
111
|
+
"test": "vitest run",
|
|
112
|
+
"typecheck": "vue-tsc --noEmit",
|
|
113
|
+
"typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
|
|
125
114
|
}
|
|
126
|
-
}
|
|
115
|
+
}
|
package/dist/YeeForm-COND7XQj.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { defineComponent as O, shallowRef as m, computed as p, onMounted as U, nextTick as D, onBeforeUnmount as z, openBlock as i, createElementBlock as d, withModifiers as L, createElementVNode as f, Fragment as G, renderList as K, toDisplayString as R, renderSlot as $, createBlock as F, resolveDynamicComponent as A, mergeProps as j, createCommentVNode as V, createVNode as x, unref as v, withCtx as y, createTextVNode as h } from "vue";
|
|
2
|
-
import { TreeSelect as q, TimeRangePicker as H, TimePicker as J, Textarea as Q, Switch as W, Slider as X, Select as Z, Segmented as ee, Rate as te, RangePicker as oe, RadioGroup as ne, Radio as ae, Mentions as ie, InputPassword as le, InputNumber as re, Input as se, DatePicker as ue, CheckboxGroup as ce, Checkbox as me, Cascader as pe, AutoComplete as de, Button as C } from "ant-design-vue";
|
|
3
|
-
import { Y as fe } from "./YeeFileUpload-BUFoWs8x.js";
|
|
4
|
-
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const ye = {
|
|
6
|
-
AutoComplete: de,
|
|
7
|
-
Cascader: pe,
|
|
8
|
-
Checkbox: me,
|
|
9
|
-
CheckboxGroup: ce,
|
|
10
|
-
DatePicker: ue,
|
|
11
|
-
Input: se,
|
|
12
|
-
InputNumber: re,
|
|
13
|
-
InputPassword: le,
|
|
14
|
-
Mentions: ie,
|
|
15
|
-
Radio: ae,
|
|
16
|
-
RadioGroup: ne,
|
|
17
|
-
RangePicker: oe,
|
|
18
|
-
Rate: te,
|
|
19
|
-
Segmented: ee,
|
|
20
|
-
Select: Z,
|
|
21
|
-
Slider: X,
|
|
22
|
-
Switch: W,
|
|
23
|
-
Textarea: Q,
|
|
24
|
-
TimePicker: J,
|
|
25
|
-
TimeRangePicker: H,
|
|
26
|
-
TreeSelect: q,
|
|
27
|
-
Upload: fe
|
|
28
|
-
}, he = {
|
|
29
|
-
Checkbox: "checked",
|
|
30
|
-
Radio: "checked",
|
|
31
|
-
Switch: "checked",
|
|
32
|
-
Upload: "fileList"
|
|
33
|
-
}, Ce = { class: "yee-ui-form__label" }, ge = { class: "yee-ui-form__actions" }, ke = /* @__PURE__ */ O({
|
|
34
|
-
name: "YeeForm",
|
|
35
|
-
__name: "YeeForm",
|
|
36
|
-
props: {
|
|
37
|
-
api: {},
|
|
38
|
-
onReset: { type: Function },
|
|
39
|
-
onSubmit: { type: Function },
|
|
40
|
-
options: {}
|
|
41
|
-
},
|
|
42
|
-
setup(r) {
|
|
43
|
-
const t = r, a = m(t.options.collapsed ?? !0), g = m(3), l = m(null);
|
|
44
|
-
let s;
|
|
45
|
-
t.api.configure(t.options);
|
|
46
|
-
const k = p(() => t.api.schema.value.filter((e) => !e.hide)), B = p(() => Math.max(1, t.options.collapsedRows ?? 1) * g.value), P = p(() => !t.options.showCollapseButton || !a.value ? k.value : k.value.slice(0, B.value));
|
|
47
|
-
function b() {
|
|
48
|
-
const e = l.value;
|
|
49
|
-
if (!e) return;
|
|
50
|
-
const n = getComputedStyle(e).gridTemplateColumns.split(" ").map((o) => o.trim()).filter(Boolean);
|
|
51
|
-
n.length > 0 && (g.value = n.length);
|
|
52
|
-
}
|
|
53
|
-
U(async () => {
|
|
54
|
-
await D(), b(), typeof ResizeObserver < "u" && l.value && (s = new ResizeObserver(b), s.observe(l.value));
|
|
55
|
-
}), z(() => {
|
|
56
|
-
s?.disconnect();
|
|
57
|
-
});
|
|
58
|
-
function _(e) {
|
|
59
|
-
return t.api.getFieldValue(e.fieldName);
|
|
60
|
-
}
|
|
61
|
-
function w(e) {
|
|
62
|
-
return e !== "Custom";
|
|
63
|
-
}
|
|
64
|
-
function N(e) {
|
|
65
|
-
return w(e.component) ? ye[e.component] : void 0;
|
|
66
|
-
}
|
|
67
|
-
function M(e) {
|
|
68
|
-
return w(e.component) ? he[e.component] ?? "value" : "value";
|
|
69
|
-
}
|
|
70
|
-
function T(e) {
|
|
71
|
-
const n = _(e), o = M(e);
|
|
72
|
-
return {
|
|
73
|
-
...e.componentProps,
|
|
74
|
-
...n === void 0 ? {} : { [o]: n },
|
|
75
|
-
[`onUpdate:${o}`]: (c) => S(e, c)
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function S(e, n) {
|
|
79
|
-
t.api.setFieldValue(
|
|
80
|
-
e.fieldName,
|
|
81
|
-
n
|
|
82
|
-
), t.options.submitOnChange && u();
|
|
83
|
-
}
|
|
84
|
-
async function E() {
|
|
85
|
-
t.api.resetForm(), await t.onReset?.();
|
|
86
|
-
}
|
|
87
|
-
async function u() {
|
|
88
|
-
await t.onSubmit?.(t.api.getValues());
|
|
89
|
-
}
|
|
90
|
-
function Y(e) {
|
|
91
|
-
e.key === "Enter" && t.options.submitOnEnter && (e.preventDefault(), u());
|
|
92
|
-
}
|
|
93
|
-
function I() {
|
|
94
|
-
a.value = !a.value, t.options.handleCollapsedChange?.(a.value);
|
|
95
|
-
}
|
|
96
|
-
return (e, n) => (i(), d("form", {
|
|
97
|
-
class: "yee-ui-form",
|
|
98
|
-
onKeydown: Y,
|
|
99
|
-
onSubmit: L(u, ["prevent"])
|
|
100
|
-
}, [
|
|
101
|
-
f("div", {
|
|
102
|
-
ref_key: "fieldsElement",
|
|
103
|
-
ref: l,
|
|
104
|
-
class: "yee-ui-form__fields"
|
|
105
|
-
}, [
|
|
106
|
-
(i(!0), d(G, null, K(P.value, (o) => (i(), d("label", {
|
|
107
|
-
key: o.fieldName,
|
|
108
|
-
class: "yee-ui-form__field"
|
|
109
|
-
}, [
|
|
110
|
-
f("span", Ce, R(o.label), 1),
|
|
111
|
-
$(e.$slots, o.fieldName, {
|
|
112
|
-
field: o,
|
|
113
|
-
setValue: (c) => S(o, c),
|
|
114
|
-
value: _(o),
|
|
115
|
-
values: r.api.getValues()
|
|
116
|
-
}, () => [
|
|
117
|
-
o.component !== "Custom" ? (i(), F(A(N(o)), j({
|
|
118
|
-
key: 0,
|
|
119
|
-
ref_for: !0
|
|
120
|
-
}, T(o)), null, 16)) : V("", !0)
|
|
121
|
-
], !0)
|
|
122
|
-
]))), 128))
|
|
123
|
-
], 512),
|
|
124
|
-
f("div", ge, [
|
|
125
|
-
x(v(C), {
|
|
126
|
-
"html-type": "button",
|
|
127
|
-
onClick: E
|
|
128
|
-
}, {
|
|
129
|
-
default: y(() => [...n[0] || (n[0] = [
|
|
130
|
-
h(" 重置 ", -1)
|
|
131
|
-
])]),
|
|
132
|
-
_: 1
|
|
133
|
-
}),
|
|
134
|
-
x(v(C), {
|
|
135
|
-
type: "primary",
|
|
136
|
-
"html-type": "submit"
|
|
137
|
-
}, {
|
|
138
|
-
default: y(() => [...n[1] || (n[1] = [
|
|
139
|
-
h(" 查询 ", -1)
|
|
140
|
-
])]),
|
|
141
|
-
_: 1
|
|
142
|
-
}),
|
|
143
|
-
r.options.showCollapseButton ? (i(), F(v(C), {
|
|
144
|
-
key: 0,
|
|
145
|
-
type: "link",
|
|
146
|
-
"html-type": "button",
|
|
147
|
-
onClick: I
|
|
148
|
-
}, {
|
|
149
|
-
default: y(() => [
|
|
150
|
-
h(R(a.value ? "展开" : "收起"), 1)
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
})) : V("", !0)
|
|
154
|
-
])
|
|
155
|
-
], 32));
|
|
156
|
-
}
|
|
157
|
-
}), Re = /* @__PURE__ */ ve(ke, [["__scopeId", "data-v-13cadc25"]]);
|
|
158
|
-
export {
|
|
159
|
-
Re as Y
|
|
160
|
-
};
|
package/dist/YeeGrid-CF-0OZUj.js
DELETED
|
@@ -1,395 +0,0 @@
|
|
|
1
|
-
import { defineComponent as q, reactive as ne, useTemplateRef as Q, shallowRef as E, computed as p, onMounted as F, onBeforeUnmount as re, openBlock as w, createBlock as G, unref as S, mergeProps as K, withCtx as v, createElementVNode as H, normalizeStyle as ie, renderSlot as V, createTextVNode as J, toDisplayString as X, nextTick as I, useSlots as ae, inject as Y, watch as le, onUnmounted as se, createElementBlock as L, normalizeClass as ue, withDirectives as ce, vShow as me, createCommentVNode as k, createVNode as O, toHandlers as pe, createSlots as de, normalizeProps as j, guardReactiveProps as D, renderList as fe } from "vue";
|
|
2
|
-
import { Tooltip as Z, Modal as ge, Select as ve } from "ant-design-vue";
|
|
3
|
-
import ee from "vxe-table/es/grid";
|
|
4
|
-
import h from "vxe-table/es/ui";
|
|
5
|
-
import { p as he } from "./context-DJQ4f46a.js";
|
|
6
|
-
import { Y as be } from "./YeeForm-COND7XQj.js";
|
|
7
|
-
import { p as ye } from "./context-C5gszWl6.js";
|
|
8
|
-
import xe from "vxe-pc-ui/es/button";
|
|
9
|
-
import Ce from "vxe-pc-ui/es/checkbox";
|
|
10
|
-
import Te from "vxe-pc-ui/es/icon";
|
|
11
|
-
import we from "vxe-pc-ui/es/input";
|
|
12
|
-
import Ve from "vxe-pc-ui/es/loading";
|
|
13
|
-
import ze from "vxe-pc-ui/es/modal";
|
|
14
|
-
import Ne from "vxe-pc-ui/es/number-input";
|
|
15
|
-
import Se from "vxe-pc-ui/es/pager";
|
|
16
|
-
import He from "vxe-pc-ui/es/radio-group";
|
|
17
|
-
import Pe from "vxe-pc-ui/es/select";
|
|
18
|
-
import _e from "vxe-table/es/colgroup";
|
|
19
|
-
import Ee from "vxe-table/es/column";
|
|
20
|
-
import ke from "vxe-table/es/locale/lang/zh-CN";
|
|
21
|
-
import Re from "vxe-table/es/table";
|
|
22
|
-
import $e from "vxe-table/es/toolbar";
|
|
23
|
-
import { _ as Ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
24
|
-
const Be = /* @__PURE__ */ q({
|
|
25
|
-
inheritAttrs: !1,
|
|
26
|
-
name: "VxeTooltip",
|
|
27
|
-
__name: "YeeGridTooltip",
|
|
28
|
-
props: {
|
|
29
|
-
content: {},
|
|
30
|
-
enterDelay: {},
|
|
31
|
-
enterable: { type: Boolean },
|
|
32
|
-
height: {},
|
|
33
|
-
isArrow: { type: Boolean, default: !0 },
|
|
34
|
-
leaveDelay: {},
|
|
35
|
-
maxHeight: {},
|
|
36
|
-
maxWidth: {},
|
|
37
|
-
minHeight: {},
|
|
38
|
-
minWidth: {},
|
|
39
|
-
modelValue: { type: Boolean },
|
|
40
|
-
popupClassName: {},
|
|
41
|
-
selector: {},
|
|
42
|
-
theme: {},
|
|
43
|
-
trigger: {},
|
|
44
|
-
useHTML: { type: Boolean },
|
|
45
|
-
width: {},
|
|
46
|
-
zIndex: {}
|
|
47
|
-
},
|
|
48
|
-
emits: ["update:modelValue"],
|
|
49
|
-
setup(i, { expose: r, emit: l }) {
|
|
50
|
-
const e = i, c = l, P = Z, s = ne({ visible: !1 }), T = Q("tooltip"), b = E(), y = E(""), x = E(), C = E(!1);
|
|
51
|
-
let d;
|
|
52
|
-
function f(t) {
|
|
53
|
-
if (!(t === void 0 || t === ""))
|
|
54
|
-
return typeof t == "number" ? `${t}px` : t;
|
|
55
|
-
}
|
|
56
|
-
const R = p(() => {
|
|
57
|
-
const t = b.value;
|
|
58
|
-
return !t || !s.visible ? { display: "none" } : {
|
|
59
|
-
height: `${Math.max(t.height, 1)}px`,
|
|
60
|
-
left: `${t.left}px`,
|
|
61
|
-
pointerEvents: "none",
|
|
62
|
-
position: "fixed",
|
|
63
|
-
top: `${t.top}px`,
|
|
64
|
-
width: `${Math.max(t.width, 1)}px`
|
|
65
|
-
};
|
|
66
|
-
}), $ = p(() => ({
|
|
67
|
-
cursor: e.enterable ? "text" : void 0,
|
|
68
|
-
height: f(e.height),
|
|
69
|
-
maxHeight: f(e.maxHeight),
|
|
70
|
-
maxWidth: f(e.maxWidth),
|
|
71
|
-
minHeight: f(e.minHeight),
|
|
72
|
-
minWidth: f(e.minWidth),
|
|
73
|
-
userSelect: e.enterable ? "text" : void 0,
|
|
74
|
-
width: f(e.width)
|
|
75
|
-
})), A = p(() => ({
|
|
76
|
-
...e.popupClassName ? { overlayClassName: e.popupClassName } : {},
|
|
77
|
-
...e.zIndex === void 0 ? {} : { zIndex: Number(e.zIndex) }
|
|
78
|
-
}));
|
|
79
|
-
function B(t) {
|
|
80
|
-
return t.closest("body") ?? document.body;
|
|
81
|
-
}
|
|
82
|
-
function M(t) {
|
|
83
|
-
return t || (typeof e.selector == "string" ? document.querySelector(e.selector) ?? void 0 : e.selector);
|
|
84
|
-
}
|
|
85
|
-
function o() {
|
|
86
|
-
const t = x.value;
|
|
87
|
-
if (!t?.isConnected)
|
|
88
|
-
return m();
|
|
89
|
-
const u = t.getBoundingClientRect();
|
|
90
|
-
return b.value = {
|
|
91
|
-
height: u.height,
|
|
92
|
-
left: u.left,
|
|
93
|
-
top: u.top,
|
|
94
|
-
width: u.width
|
|
95
|
-
}, I(() => T.value?.forcePopupAlign?.());
|
|
96
|
-
}
|
|
97
|
-
function n(t, u) {
|
|
98
|
-
const N = M(t);
|
|
99
|
-
return N ? (x.value = N, y.value = u ?? e.content ?? "", C.value = !0, s.visible = !0, c("update:modelValue", !0), o()) : I();
|
|
100
|
-
}
|
|
101
|
-
function a(t, u, N) {
|
|
102
|
-
const oe = t.currentTarget instanceof HTMLElement ? t.currentTarget : void 0;
|
|
103
|
-
return n(u ?? oe, N);
|
|
104
|
-
}
|
|
105
|
-
function m() {
|
|
106
|
-
return C.value = !1, x.value = void 0, b.value = void 0, s.visible = !1, c("update:modelValue", !1), I();
|
|
107
|
-
}
|
|
108
|
-
function g(t) {
|
|
109
|
-
t && d && (clearTimeout(d), d = void 0), C.value = t;
|
|
110
|
-
}
|
|
111
|
-
function z() {
|
|
112
|
-
return C.value;
|
|
113
|
-
}
|
|
114
|
-
function _() {
|
|
115
|
-
s.visible && o();
|
|
116
|
-
}
|
|
117
|
-
function te() {
|
|
118
|
-
g(!1), e.enterable && (d = setTimeout(() => {
|
|
119
|
-
d = void 0, C.value || m();
|
|
120
|
-
}, e.leaveDelay ?? 0));
|
|
121
|
-
}
|
|
122
|
-
return F(() => {
|
|
123
|
-
window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), e.modelValue && n(void 0, e.content);
|
|
124
|
-
}), re(() => {
|
|
125
|
-
d && clearTimeout(d), window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
126
|
-
}), r({
|
|
127
|
-
close: m,
|
|
128
|
-
isActived: z,
|
|
129
|
-
open: n,
|
|
130
|
-
openByEvent: a,
|
|
131
|
-
reactData: s,
|
|
132
|
-
setActived: g,
|
|
133
|
-
toVisible: n,
|
|
134
|
-
updatePlacement: o
|
|
135
|
-
}), (t, u) => (w(), G(S(P), K({ ref: "tooltip" }, A.value, {
|
|
136
|
-
arrow: e.isArrow !== !1,
|
|
137
|
-
"get-popup-container": B,
|
|
138
|
-
open: s.visible,
|
|
139
|
-
"overlay-inner-style": $.value,
|
|
140
|
-
placement: "top"
|
|
141
|
-
}), {
|
|
142
|
-
title: v(() => [
|
|
143
|
-
H("div", {
|
|
144
|
-
class: "yee-ui-grid-tooltip-content",
|
|
145
|
-
onMouseenter: u[0] || (u[0] = (N) => e.enterable && g(!0)),
|
|
146
|
-
onMouseleave: te
|
|
147
|
-
}, [
|
|
148
|
-
V(t.$slots, "content", {}, () => [
|
|
149
|
-
J(X(y.value), 1)
|
|
150
|
-
])
|
|
151
|
-
], 32)
|
|
152
|
-
]),
|
|
153
|
-
default: v(() => [
|
|
154
|
-
H("span", {
|
|
155
|
-
"aria-hidden": "true",
|
|
156
|
-
class: "yee-ui-grid-tooltip-anchor",
|
|
157
|
-
style: ie(R.value)
|
|
158
|
-
}, null, 4)
|
|
159
|
-
]),
|
|
160
|
-
_: 3
|
|
161
|
-
}, 16, ["arrow", "open", "overlay-inner-style"]));
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
let U = !1;
|
|
165
|
-
const W = /* @__PURE__ */ new Set();
|
|
166
|
-
function Me() {
|
|
167
|
-
const i = h.modal.confirm.bind(h.modal);
|
|
168
|
-
h.modal.confirm = ((r, l, e) => {
|
|
169
|
-
const c = typeof r == "object" && r !== null ? r : typeof e == "object" && e !== null ? e : void 0;
|
|
170
|
-
if ((typeof c?.className == "string" ? c.className.split(/\s+/) : []).includes("vxe-table--ignore-clear")) {
|
|
171
|
-
const s = [...W], T = s[s.length - 1];
|
|
172
|
-
if (T) {
|
|
173
|
-
const b = typeof c?.content == "string" ? c.content : String(c?.content ?? r);
|
|
174
|
-
return T(b);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return i(r, l, e);
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
function Ie(i) {
|
|
181
|
-
return W.add(i), () => W.delete(i);
|
|
182
|
-
}
|
|
183
|
-
function Le() {
|
|
184
|
-
if (U) return;
|
|
185
|
-
h.hasLanguage("zh-CN") || (h.setI18n("zh-CN", ke), h.setLanguage("zh-CN")), [
|
|
186
|
-
Re,
|
|
187
|
-
Ee,
|
|
188
|
-
_e,
|
|
189
|
-
ee,
|
|
190
|
-
$e,
|
|
191
|
-
xe,
|
|
192
|
-
Ce,
|
|
193
|
-
Te,
|
|
194
|
-
we,
|
|
195
|
-
Ve,
|
|
196
|
-
ze,
|
|
197
|
-
Ne,
|
|
198
|
-
Se,
|
|
199
|
-
He,
|
|
200
|
-
Pe,
|
|
201
|
-
Be
|
|
202
|
-
].forEach((r) => h.component(r)), Me(), U = !0;
|
|
203
|
-
}
|
|
204
|
-
const Oe = {
|
|
205
|
-
key: 1,
|
|
206
|
-
class: "yee-ui-grid__separator"
|
|
207
|
-
}, je = { class: "yee-ui-grid__table-container" }, De = {
|
|
208
|
-
key: 0,
|
|
209
|
-
class: "yee-ui-grid__title"
|
|
210
|
-
}, Ge = /* @__PURE__ */ q({
|
|
211
|
-
name: "YeeGrid",
|
|
212
|
-
__name: "YeeGrid",
|
|
213
|
-
props: {
|
|
214
|
-
api: {},
|
|
215
|
-
tableTitle: {},
|
|
216
|
-
tableTitleHelp: {}
|
|
217
|
-
},
|
|
218
|
-
setup(i) {
|
|
219
|
-
const r = i, l = ae(), e = Q("gridRef"), c = Y(he), P = Y(ye, void 0), [s, T] = ge.useModal();
|
|
220
|
-
Le();
|
|
221
|
-
const b = Ie((o) => new Promise((n) => {
|
|
222
|
-
s.confirm({
|
|
223
|
-
title: "恢复默认列配置",
|
|
224
|
-
content: o,
|
|
225
|
-
centered: !0,
|
|
226
|
-
okText: "确认",
|
|
227
|
-
cancelText: "取消",
|
|
228
|
-
keyboard: !0,
|
|
229
|
-
wrapClassName: "vxe-table--ignore-clear",
|
|
230
|
-
onOk: () => n("confirm"),
|
|
231
|
-
onCancel: () => n("cancel")
|
|
232
|
-
});
|
|
233
|
-
})), y = p(() => r.api.state.value), x = p(() => y.value.formOptions), C = p(() => !!(r.tableTitle || l["table-title"] || l["toolbar-actions"] || l["toolbar-tools"])), d = p(() => Object.keys(l).filter((o) => ![
|
|
234
|
-
"empty",
|
|
235
|
-
"loading",
|
|
236
|
-
"table-title",
|
|
237
|
-
"toolbar-actions",
|
|
238
|
-
"toolbar-tools"
|
|
239
|
-
].includes(o))), f = p(() => P?.value ?? !1), R = p(() => {
|
|
240
|
-
const o = y.value.gridOptions, n = o.proxyConfig, a = n?.ajax?.query, m = o.toolbarConfig, g = o.pagerConfig;
|
|
241
|
-
return {
|
|
242
|
-
align: "left",
|
|
243
|
-
border: "inner",
|
|
244
|
-
minHeight: 180,
|
|
245
|
-
showHeaderOverflow: "tooltip",
|
|
246
|
-
showOverflow: "tooltip",
|
|
247
|
-
size: "medium",
|
|
248
|
-
...f.value ? { height: "auto" } : {},
|
|
249
|
-
...o,
|
|
250
|
-
columnConfig: {
|
|
251
|
-
resizable: !0,
|
|
252
|
-
...o.columnConfig
|
|
253
|
-
},
|
|
254
|
-
tooltipConfig: {
|
|
255
|
-
enterable: !0,
|
|
256
|
-
leaveDelay: 300,
|
|
257
|
-
...o.tooltipConfig
|
|
258
|
-
},
|
|
259
|
-
...g ? {
|
|
260
|
-
pagerConfig: {
|
|
261
|
-
pageSize: 20,
|
|
262
|
-
pageSizes: [10, 20, 30, 50, 100, 200],
|
|
263
|
-
layouts: ["Total", "Sizes", "Home", "PrevPage", "Number", "NextPage", "End"],
|
|
264
|
-
...g,
|
|
265
|
-
slots: {
|
|
266
|
-
sizes: "pagerSizes",
|
|
267
|
-
...g.slots
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
} : {},
|
|
271
|
-
...n ? {
|
|
272
|
-
proxyConfig: {
|
|
273
|
-
autoLoad: !0,
|
|
274
|
-
showResponseMsg: !1,
|
|
275
|
-
...n,
|
|
276
|
-
response: {
|
|
277
|
-
list: "items",
|
|
278
|
-
result: "items",
|
|
279
|
-
total: "total",
|
|
280
|
-
...n.response
|
|
281
|
-
},
|
|
282
|
-
...n.ajax ? {
|
|
283
|
-
ajax: {
|
|
284
|
-
...n.ajax,
|
|
285
|
-
...a ? {
|
|
286
|
-
query: (z) => a(z, r.api.formApi.getValues())
|
|
287
|
-
} : {}
|
|
288
|
-
}
|
|
289
|
-
} : {}
|
|
290
|
-
}
|
|
291
|
-
} : {},
|
|
292
|
-
...m || C.value ? {
|
|
293
|
-
toolbarConfig: {
|
|
294
|
-
custom: !0,
|
|
295
|
-
refresh: !0,
|
|
296
|
-
zoom: !0,
|
|
297
|
-
...m,
|
|
298
|
-
slots: {
|
|
299
|
-
...r.tableTitle || l["table-title"] || l["toolbar-actions"] ? { buttons: "toolbarActions" } : {},
|
|
300
|
-
...l["toolbar-tools"] ? { tools: "toolbarTools" } : {}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
} : {}
|
|
304
|
-
};
|
|
305
|
-
}), $ = p(() => y.value.gridEvents ?? {});
|
|
306
|
-
le(
|
|
307
|
-
() => c?.value.mode ?? "light",
|
|
308
|
-
(o) => h.setTheme(o),
|
|
309
|
-
{ immediate: !0 }
|
|
310
|
-
);
|
|
311
|
-
async function A() {
|
|
312
|
-
await r.api.reload();
|
|
313
|
-
}
|
|
314
|
-
async function B() {
|
|
315
|
-
await r.api.reload();
|
|
316
|
-
}
|
|
317
|
-
function M(o, n) {
|
|
318
|
-
typeof n != "number" && typeof n != "string" || o.setPageSizeByEvent(new Event("change"), n);
|
|
319
|
-
}
|
|
320
|
-
return F(() => {
|
|
321
|
-
e.value && r.api.mount(e.value);
|
|
322
|
-
}), se(() => {
|
|
323
|
-
b(), r.api.unmount();
|
|
324
|
-
}), (o, n) => (w(), L("section", {
|
|
325
|
-
class: ue(["yee-ui-grid", { "yee-ui-grid--fill-page-content": f.value }])
|
|
326
|
-
}, [
|
|
327
|
-
x.value ? ce((w(), G(be, {
|
|
328
|
-
key: 0,
|
|
329
|
-
api: i.api.formApi,
|
|
330
|
-
options: x.value,
|
|
331
|
-
"on-reset": B,
|
|
332
|
-
"on-submit": A
|
|
333
|
-
}, null, 8, ["api", "options"])), [
|
|
334
|
-
[me, i.api.searchFormVisible.value]
|
|
335
|
-
]) : k("", !0),
|
|
336
|
-
x.value && y.value.separator !== !1 ? (w(), L("div", Oe)) : k("", !0),
|
|
337
|
-
H("div", je, [
|
|
338
|
-
O(S(ee), K({
|
|
339
|
-
ref_key: "gridRef",
|
|
340
|
-
ref: e,
|
|
341
|
-
class: "yee-ui-grid__table"
|
|
342
|
-
}, R.value, pe($.value)), de({
|
|
343
|
-
toolbarActions: v((a) => [
|
|
344
|
-
V(o.$slots, "table-title", {}, () => [
|
|
345
|
-
i.tableTitle ? (w(), L("div", De, [
|
|
346
|
-
J(X(i.tableTitle) + " ", 1),
|
|
347
|
-
i.tableTitleHelp ? (w(), G(S(Z), {
|
|
348
|
-
key: 0,
|
|
349
|
-
title: i.tableTitleHelp
|
|
350
|
-
}, {
|
|
351
|
-
default: v(() => [...n[0] || (n[0] = [
|
|
352
|
-
H("span", {
|
|
353
|
-
class: "yee-ui-grid__help",
|
|
354
|
-
tabindex: "0"
|
|
355
|
-
}, "?", -1)
|
|
356
|
-
])]),
|
|
357
|
-
_: 1
|
|
358
|
-
}, 8, ["title"])) : k("", !0)
|
|
359
|
-
])) : k("", !0)
|
|
360
|
-
], !0),
|
|
361
|
-
V(o.$slots, "toolbar-actions", j(D(a)), void 0, !0)
|
|
362
|
-
]),
|
|
363
|
-
toolbarTools: v((a) => [
|
|
364
|
-
V(o.$slots, "toolbar-tools", j(D(a)), void 0, !0)
|
|
365
|
-
]),
|
|
366
|
-
pagerSizes: v(({ $pager: a, options: m, pageSize: g }) => [
|
|
367
|
-
O(S(ve), {
|
|
368
|
-
class: "yee-ui-grid__page-size",
|
|
369
|
-
options: m,
|
|
370
|
-
value: g,
|
|
371
|
-
onChange: (z) => M(a, z)
|
|
372
|
-
}, null, 8, ["options", "value", "onChange"])
|
|
373
|
-
]),
|
|
374
|
-
empty: v(() => [
|
|
375
|
-
V(o.$slots, "empty", {}, () => [
|
|
376
|
-
n[1] || (n[1] = H("div", { class: "yee-ui-grid__empty" }, "暂无数据", -1))
|
|
377
|
-
], !0)
|
|
378
|
-
]),
|
|
379
|
-
_: 2
|
|
380
|
-
}, [
|
|
381
|
-
fe(d.value, (a) => ({
|
|
382
|
-
name: a,
|
|
383
|
-
fn: v((m) => [
|
|
384
|
-
V(o.$slots, a, j(D(m)), void 0, !0)
|
|
385
|
-
])
|
|
386
|
-
}))
|
|
387
|
-
]), 1040)
|
|
388
|
-
]),
|
|
389
|
-
O(S(T))
|
|
390
|
-
], 2));
|
|
391
|
-
}
|
|
392
|
-
}), dt = /* @__PURE__ */ Ae(Ge, [["__scopeId", "data-v-b69f5a93"]]);
|
|
393
|
-
export {
|
|
394
|
-
dt as default
|
|
395
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { YeeFormSlots, YeeFormValues, YeeFormProps } from './types';
|
|
2
|
-
declare const _default: <TValues extends object = YeeFormValues>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & YeeFormProps<TValues> & Partial<{}>> & import('vue').PublicProps;
|
|
4
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
5
|
-
attrs: any;
|
|
6
|
-
slots: Readonly<YeeFormSlots<TValues>> & YeeFormSlots<TValues>;
|
|
7
|
-
emit: {};
|
|
8
|
-
}>) => import('vue').VNode & {
|
|
9
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
type __VLS_PrettifyLocal<T> = {
|
|
13
|
-
[K in keyof T]: T[K];
|
|
14
|
-
} & {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Component } from 'vue';
|
|
2
|
-
import { YeeFormBuiltInComponent } from './types';
|
|
3
|
-
export declare const yeeFormComponentMap: Record<YeeFormBuiltInComponent, Component>;
|
|
4
|
-
export declare const yeeFormModelPropMap: {
|
|
5
|
-
readonly Checkbox: "checked";
|
|
6
|
-
readonly Radio: "checked";
|
|
7
|
-
readonly Switch: "checked";
|
|
8
|
-
readonly Upload: "fileList";
|
|
9
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { default as YeeForm } from './YeeForm.vue';
|
|
2
|
-
export { YeeFormApi } from './form-api';
|
|
3
|
-
export type { YeeFormBuiltInComponent, YeeFormComponent, YeeFormComponentPropsMap, YeeFormOptions, YeeFormSchema, YeeFormSchemaUpdate, YeeFormSlotProps, YeeFormSlots, YeeFormValues, YeeFormProps, } from './types';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { VxeGridProps } from 'vxe-table';
|
|
2
|
-
import { YeeGridInternalProps, YeeGridSlots } from './types';
|
|
3
|
-
type __VLS_Props = YeeGridInternalProps;
|
|
4
|
-
declare function __VLS_template(): {
|
|
5
|
-
attrs: Partial<{}>;
|
|
6
|
-
slots: Readonly<YeeGridSlots<Record<string, unknown>>> & YeeGridSlots<Record<string, unknown>>;
|
|
7
|
-
refs: {
|
|
8
|
-
gridRef: (import('vxe-table').VxeGridMethods<any> & {
|
|
9
|
-
$props: VxeGridProps<any> & import('vxe-table').VxeGridEventProps<any>;
|
|
10
|
-
$slots: import('vxe-table').VxeGridSlots<any>;
|
|
11
|
-
}) | null;
|
|
12
|
-
};
|
|
13
|
-
rootEl: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
-
gridRef: (import('vxe-table').VxeGridMethods<any> & {
|
|
18
|
-
$props: VxeGridProps<any> & import('vxe-table').VxeGridEventProps<any>;
|
|
19
|
-
$slots: import('vxe-table').VxeGridSlots<any>;
|
|
20
|
-
}) | null;
|
|
21
|
-
}, HTMLElement>;
|
|
22
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
-
export default _default;
|
|
24
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
-
new (): {
|
|
26
|
-
$slots: S;
|
|
27
|
-
};
|
|
28
|
-
};
|