vft 0.0.397 → 0.0.399
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/index.css +1 -1
- package/es/component.js +83 -81
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/client-only/client-only.vue.d.ts +12 -0
- package/es/components/client-only/client-only.vue.js +4 -0
- package/es/components/client-only/client-only.vue2.js +13 -0
- package/es/components/client-only/index.d.ts +19 -0
- package/es/components/client-only/index.js +13 -0
- package/es/components/client-only/style/css.d.ts +1 -0
- package/es/components/client-only/style/css.js +2 -0
- package/es/components/client-only/style/index.d.ts +1 -0
- package/es/components/client-only/style/index.js +2 -0
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +391 -389
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/side-menu/side-menu.vue2.js +87 -88
- package/es/components/skeleton/skeleton.vue.d.ts +0 -1
- package/es/components/skeleton/skeleton.vue2.js +0 -1
- package/es/components/super-form/super-form-item.vue2.js +4 -3
- package/es/components/table/table.vue2.js +123 -118
- package/es/index.js +1 -0
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/client-only/client-only.vue.cjs +1 -0
- package/lib/components/client-only/client-only.vue.d.ts +12 -0
- package/lib/components/client-only/client-only.vue2.cjs +1 -0
- package/lib/components/client-only/index.cjs +1 -0
- package/lib/components/client-only/index.d.ts +19 -0
- package/lib/components/client-only/style/css.cjs +1 -0
- package/lib/components/client-only/style/css.d.ts +1 -0
- package/lib/components/client-only/style/index.cjs +1 -0
- package/lib/components/client-only/style/index.d.ts +1 -0
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue.d.ts +0 -1
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/theme-style/index.css +1 -1
- package/theme-style/src/client-only.scss +0 -0
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/tabs.scss +0 -5
- package/theme-style/vft-client-only.css +0 -0
- package/theme-style/vft-tabs.css +1 -1
- package/web-types.json +1 -1
|
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
|
|
|
13
13
|
import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
|
|
14
14
|
import { useAttrs as Ze, useCursor as _e } from "@vft/use";
|
|
15
15
|
import { calcTextareaHeight as ye } from "./utils.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
16
|
+
import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
|
|
17
|
+
import { useFormSize as at, useFormDisabled as ot } from "../form/hooks/use-form-common-props.js";
|
|
18
18
|
const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
|
|
19
19
|
__name: "input",
|
|
20
20
|
props: {
|
|
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
|
|
|
85
85
|
o.is("focus", v.value)
|
|
86
86
|
]), d = Ze({
|
|
87
87
|
excludeKeys: l(() => Object.keys(X.value))
|
|
88
|
-
}), { form: Ce, formItem: F } =
|
|
88
|
+
}), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(xe.props, {
|
|
89
89
|
formItemContext: F
|
|
90
|
-
}), ke =
|
|
90
|
+
}), ke = at(), h = ot(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
|
|
91
91
|
icon: "icon-circle-close",
|
|
92
92
|
size: 16
|
|
93
93
|
})), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
2
|
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
-
import { CHANGE_EVENT as i,
|
|
3
|
+
import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import { isUndefined as K } from "@vft/utils";
|
|
6
6
|
import { debugWarn as C } from "../../../utils/error.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineComponent as j, toRefs as
|
|
2
|
-
import { listenerRouteChange as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as j, toRefs as oe, useSlots as le, getCurrentInstance as ne, ref as h, computed as g, watch as ae, onMounted as ue, nextTick as se, createVNode as p, h as b, isVNode as ie } from "vue";
|
|
2
|
+
import { listenerRouteChange as de, useRouterHelper as re } from "@vft/router";
|
|
3
|
+
import { useSortable as ce } from "@vft/use/sortable";
|
|
4
|
+
import { isNullOrUndefined as W, isNumber as pe, isUrl as fe } from "@vft/utils";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import { addUnit as I } from "../../utils/helper.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { VftIcon as
|
|
10
|
-
import { VftMenu as
|
|
11
|
-
import { useNamespace as
|
|
9
|
+
import { VftIcon as me } from "../icon/index.js";
|
|
10
|
+
import { VftMenu as ve, VftSubMenu as he, VftMenuItem as V } from "../menu/index.js";
|
|
11
|
+
import { useNamespace as ge } from "../../hooks/use-namespace/index.js";
|
|
12
12
|
import "../../hooks/use-model-toggle/index.js";
|
|
13
13
|
import "@popperjs/core";
|
|
14
14
|
import "../../hooks/use-z-index/index.js";
|
|
15
|
-
import { useDragLine as
|
|
16
|
-
function
|
|
17
|
-
return typeof
|
|
15
|
+
import { useDragLine as be } from "./use-drag-line.js";
|
|
16
|
+
function ye(m) {
|
|
17
|
+
return typeof m == "function" || Object.prototype.toString.call(m) === "[object Object]" && !ie(m);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
19
|
+
const Ce = j({
|
|
20
20
|
name: "vft-side-menu"
|
|
21
|
-
}),
|
|
22
|
-
...
|
|
21
|
+
}), Ve = /* @__PURE__ */ j({
|
|
22
|
+
...Ce,
|
|
23
23
|
props: {
|
|
24
24
|
isFixedLeft: {
|
|
25
25
|
type: Boolean,
|
|
@@ -79,17 +79,17 @@ const Me = j({
|
|
|
79
79
|
defaultOpeneds: {}
|
|
80
80
|
},
|
|
81
81
|
emits: ["update:collapse", "update:width", "dragEnd", "dragWidthEnd", "select", "subMenuClick", "menuItemMouseenter", "menuItemMouseleave"],
|
|
82
|
-
setup(
|
|
82
|
+
setup(m, {
|
|
83
83
|
expose: q,
|
|
84
84
|
emit: J
|
|
85
85
|
}) {
|
|
86
|
-
const t =
|
|
86
|
+
const t = m, {
|
|
87
87
|
defaultActive: E,
|
|
88
88
|
collapse: f,
|
|
89
89
|
uniqueOpened: L,
|
|
90
90
|
defaultOpeneds: P,
|
|
91
91
|
openMenuCollapse: H
|
|
92
|
-
} =
|
|
92
|
+
} = oe(t), r = J, u = ge("side-menu"), s = le(), S = ne(), M = h(), a = g(() => ({
|
|
93
93
|
path: "path",
|
|
94
94
|
children: "children",
|
|
95
95
|
title: "title",
|
|
@@ -98,15 +98,15 @@ const Me = j({
|
|
|
98
98
|
disabled: "disabled",
|
|
99
99
|
...t.attrMapping
|
|
100
100
|
}));
|
|
101
|
-
|
|
101
|
+
de(({
|
|
102
102
|
route: e
|
|
103
103
|
}) => {
|
|
104
|
-
!e || e.meta?.hideSide && !t.useRouterJump || (
|
|
104
|
+
!e || e.meta?.hideSide && !t.useRouterJump || (M.value = e.path);
|
|
105
105
|
});
|
|
106
106
|
const U = (e) => {
|
|
107
107
|
const n = e.e;
|
|
108
108
|
if (t.autoScrollActiveDom && n) {
|
|
109
|
-
const o =
|
|
109
|
+
const o = pe(t.autoScrollActiveDom) ? t.autoScrollActiveDom : 0, l = n.target;
|
|
110
110
|
O({
|
|
111
111
|
activeDom: l,
|
|
112
112
|
offset: o
|
|
@@ -118,9 +118,9 @@ const Me = j({
|
|
|
118
118
|
offset: n = 0,
|
|
119
119
|
delay: o = 300
|
|
120
120
|
} = {}) => {
|
|
121
|
-
|
|
121
|
+
v.value?.menu && setTimeout(() => {
|
|
122
122
|
const l = e || document.querySelector(".vft-menu-item.is-active") || document.querySelector(".vft-sub-menu.is-active");
|
|
123
|
-
l && (
|
|
123
|
+
l && (v.value.menu.scrollTop = v.value.menu.scrollTop + (l.getBoundingClientRect().top - v.value.menu.getBoundingClientRect().top) + n);
|
|
124
124
|
}, o);
|
|
125
125
|
}, F = (e) => {
|
|
126
126
|
r("menuItemMouseenter", e);
|
|
@@ -130,7 +130,7 @@ const Me = j({
|
|
|
130
130
|
const o = e[a.value.path], l = e[a.value.title], i = e?.[a.value.children], c = e?.[a.value.index], D = e?.[a.value.icon], T = !!e?.[a.value.disabled], R = t.disabledJudgeTurnOver ? !T : T, k = c || o || n + l;
|
|
131
131
|
return i?.length ? b(
|
|
132
132
|
// @ts-ignore
|
|
133
|
-
|
|
133
|
+
he,
|
|
134
134
|
{
|
|
135
135
|
...e,
|
|
136
136
|
popperAppendToBody: !0,
|
|
@@ -142,18 +142,18 @@ const Me = j({
|
|
|
142
142
|
popperClass: u.e("popper")
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
default: () => i?.map((d,
|
|
146
|
-
const C = d[a.value.path], A = d[a.value.index],
|
|
147
|
-
return d?.[a.value.children]?.length ? _(d,
|
|
145
|
+
default: () => i?.map((d, Q) => {
|
|
146
|
+
const C = d[a.value.path], A = d[a.value.index], X = d[a.value.icon], ee = d[a.value.title], N = !!d[a.value.disabled], te = t.disabledJudgeTurnOver ? !N : N;
|
|
147
|
+
return d?.[a.value.children]?.length ? _(d, Q) : (
|
|
148
148
|
// @ts-ignore
|
|
149
149
|
b(V, {
|
|
150
150
|
...d,
|
|
151
151
|
key: A || C,
|
|
152
152
|
index: A || C,
|
|
153
153
|
route: C,
|
|
154
|
-
icon:
|
|
155
|
-
title:
|
|
156
|
-
disabled: t.openDisabled &&
|
|
154
|
+
icon: X,
|
|
155
|
+
title: ee,
|
|
156
|
+
disabled: t.openDisabled && te
|
|
157
157
|
}, s.menuItem ? () => s.menuItem?.({
|
|
158
158
|
item: d
|
|
159
159
|
}) : "")
|
|
@@ -174,33 +174,17 @@ const Me = j({
|
|
|
174
174
|
item: e,
|
|
175
175
|
index: n
|
|
176
176
|
}) : "");
|
|
177
|
-
},
|
|
177
|
+
}, v = h(), $ = g(() => ({
|
|
178
178
|
...t.collapseWidth === 0 && f.value ? {
|
|
179
179
|
width: 0
|
|
180
180
|
} : {},
|
|
181
181
|
height: `calc(100% - ${t.menuTopBottomHeight}px)`
|
|
182
|
-
})),
|
|
183
|
-
|
|
184
|
-
return b(p(he, {
|
|
185
|
-
ref: h,
|
|
186
|
-
onSelect: Y,
|
|
187
|
-
onOpen: U,
|
|
188
|
-
defaultActive: E?.value || S.value,
|
|
189
|
-
defaultOpeneds: P?.value,
|
|
190
|
-
class: [u.e("con"), t.dragOption?.dragClassName ? u.e(t.dragOption?.dragClassName) : ""],
|
|
191
|
-
style: $.value,
|
|
192
|
-
collapse: H.value ? f.value : !1,
|
|
193
|
-
uniqueOpened: L.value,
|
|
194
|
-
collapseTransition: !1
|
|
195
|
-
}, Ce(e = t.menus.map((n, o) => _(n, o))) ? e : {
|
|
196
|
-
default: () => [e]
|
|
197
|
-
}));
|
|
198
|
-
}), x = M.appContext.config.globalProperties.$router;
|
|
199
|
-
async function Y(e) {
|
|
182
|
+
})), x = S.appContext.config.globalProperties.$router;
|
|
183
|
+
async function z(e) {
|
|
200
184
|
if (t.useRouterJump) {
|
|
201
185
|
const {
|
|
202
186
|
go: n
|
|
203
|
-
} =
|
|
187
|
+
} = re(x), o = e.route;
|
|
204
188
|
let l = e.route;
|
|
205
189
|
e.indexPath.some((c) => fe(c)) && (l = e.indexPath.slice(-2).join("/"));
|
|
206
190
|
const i = x.getRoutes().filter((c) => c.path === l)?.[0]?.meta?.linkTarget;
|
|
@@ -213,12 +197,25 @@ const Me = j({
|
|
|
213
197
|
}
|
|
214
198
|
r("select", e);
|
|
215
199
|
}
|
|
216
|
-
|
|
200
|
+
const y = h(), w = h(), B = h(), Y = g(() => ({
|
|
201
|
+
...t.collapseWidth === 0 && f.value ? {
|
|
202
|
+
borderRight: "none"
|
|
203
|
+
} : {},
|
|
204
|
+
width: I(t.width),
|
|
205
|
+
height: t.height
|
|
206
|
+
}));
|
|
207
|
+
ae(() => f.value, (e) => {
|
|
208
|
+
e ? r("update:width", t.collapseWidth) : r("update:width", B.value || t.width), B.value = t.width;
|
|
209
|
+
}), t.dragWidthCfg && be(y, w, S);
|
|
210
|
+
const G = g(() => ({
|
|
211
|
+
left: I(t.width)
|
|
212
|
+
})), K = g(() => [u.b(), t.isFixedLeft ? u.m("fixed") : ""]);
|
|
213
|
+
return ue(() => {
|
|
217
214
|
se(() => {
|
|
218
215
|
if (t.dragOption?.dragClassName) {
|
|
219
216
|
const e = document.querySelectorAll("." + u.e(t.dragOption?.dragClassName))?.[0], {
|
|
220
217
|
initSortable: n
|
|
221
|
-
} =
|
|
218
|
+
} = ce(e, {
|
|
222
219
|
draggable: ".vft-menu-item",
|
|
223
220
|
onEnd: (o) => {
|
|
224
221
|
const {
|
|
@@ -232,47 +229,49 @@ const Me = j({
|
|
|
232
229
|
n();
|
|
233
230
|
}
|
|
234
231
|
});
|
|
235
|
-
})
|
|
236
|
-
const y = g(), w = g(), B = g(), G = m(() => ({
|
|
237
|
-
...t.collapseWidth === 0 && f.value ? {
|
|
238
|
-
borderRight: "none"
|
|
239
|
-
} : {},
|
|
240
|
-
width: I(t.width),
|
|
241
|
-
height: t.height
|
|
242
|
-
}));
|
|
243
|
-
ie(() => f.value, (e) => {
|
|
244
|
-
e ? r("update:width", t.collapseWidth) : r("update:width", B.value || t.width), B.value = t.width;
|
|
245
|
-
}), t.dragWidthCfg && ye(y, w, M);
|
|
246
|
-
const K = m(() => ({
|
|
247
|
-
left: I(t.width)
|
|
248
|
-
})), Q = m(() => [u.b(), t.isFixedLeft ? u.m("fixed") : ""]);
|
|
249
|
-
return q({
|
|
232
|
+
}), q({
|
|
250
233
|
sideRef: y,
|
|
251
234
|
jumpActiveDom: O
|
|
252
|
-
}), () =>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
235
|
+
}), () => {
|
|
236
|
+
let e;
|
|
237
|
+
return p("div", {
|
|
238
|
+
ref: y,
|
|
239
|
+
class: K.value,
|
|
240
|
+
style: Y.value
|
|
241
|
+
}, [s.top ? p("div", {
|
|
242
|
+
class: u.e("top")
|
|
243
|
+
}, [s.top()]) : null, b(p(ve, {
|
|
244
|
+
ref: v,
|
|
245
|
+
onSelect: z,
|
|
246
|
+
onOpen: U,
|
|
247
|
+
defaultActive: E?.value || M.value,
|
|
248
|
+
defaultOpeneds: P?.value,
|
|
249
|
+
class: [u.e("con"), t.dragOption?.dragClassName ? u.e(t.dragOption?.dragClassName) : ""],
|
|
250
|
+
style: $.value,
|
|
251
|
+
collapse: H.value ? f.value : !1,
|
|
252
|
+
uniqueOpened: L.value,
|
|
253
|
+
collapseTransition: !1
|
|
254
|
+
}, ye(e = t.menus.map((n, o) => _(n, o))) ? e : {
|
|
255
|
+
default: () => [e]
|
|
256
|
+
})), s.bottom ? p("div", {
|
|
257
|
+
class: u.e("bottom")
|
|
258
|
+
}, [s.bottom()]) : t.showCollapse ? p("div", {
|
|
259
|
+
onClick: () => r("update:collapse", !f.value),
|
|
260
|
+
class: [u.e("bottom"), u.e("collapse")]
|
|
261
|
+
}, [p(me, {
|
|
262
|
+
style: {
|
|
263
|
+
transform: f.value ? "rotateY(180deg)" : ""
|
|
264
|
+
},
|
|
265
|
+
size: 20,
|
|
266
|
+
icon: "icon-sidebar-collapse"
|
|
267
|
+
}, null)]) : null, s.default?.(), t.dragWidthCfg ? p("div", {
|
|
268
|
+
ref: w,
|
|
269
|
+
style: G.value,
|
|
270
|
+
class: u.e("drag-bar")
|
|
271
|
+
}, null) : null]);
|
|
272
|
+
};
|
|
274
273
|
}
|
|
275
274
|
});
|
|
276
275
|
export {
|
|
277
|
-
|
|
276
|
+
Ve as default
|
|
278
277
|
};
|
|
@@ -14,7 +14,6 @@ declare function __VLS_template(): {
|
|
|
14
14
|
}): any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {
|
|
17
|
-
/** @description loading state */
|
|
18
17
|
uiLoading: import("vue").Ref<boolean, boolean>;
|
|
19
18
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne,
|
|
1
|
+
import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, createTextVNode as G, isVNode as le, resolveComponent as V } from "vue";
|
|
2
2
|
import "../alert/index.js";
|
|
3
3
|
import "../avatar/index.js";
|
|
4
4
|
import "../avatar-stack/index.js";
|
|
@@ -10,6 +10,7 @@ import "../cascader-panel/index.js";
|
|
|
10
10
|
import "../check-tag/index.js";
|
|
11
11
|
import "../checkbox/index.js";
|
|
12
12
|
import "../clamp/index.js";
|
|
13
|
+
import "../client-only/index.js";
|
|
13
14
|
import "../clamp-toggle/index.js";
|
|
14
15
|
import "../clamp-tooltip/index.js";
|
|
15
16
|
import { VftCol as X } from "../col/index.js";
|
|
@@ -116,7 +117,7 @@ function q(o) {
|
|
|
116
117
|
}
|
|
117
118
|
const Ce = Q({
|
|
118
119
|
inheritAttrs: !1
|
|
119
|
-
}),
|
|
120
|
+
}), Ar = /* @__PURE__ */ Q({
|
|
120
121
|
...Ce,
|
|
121
122
|
__name: "super-form-item",
|
|
122
123
|
props: {
|
|
@@ -493,5 +494,5 @@ const Ce = Q({
|
|
|
493
494
|
}
|
|
494
495
|
});
|
|
495
496
|
export {
|
|
496
|
-
|
|
497
|
+
Ar as default
|
|
497
498
|
};
|