savor-ui 0.6.1 → 0.7.0
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/CHANGELOG.md +20 -0
- package/dist/es/components/index.d.ts +3 -0
- package/dist/es/components/index.mjs +3 -0
- package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs +4 -2
- package/dist/es/components/src/button/index.d.ts +1 -0
- package/dist/es/components/src/button/types.d.ts +2 -0
- package/dist/es/components/src/descriptions/descriptions-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +3 -3
- package/dist/es/components/src/empty/empty.vue_vue_type_script_setup_true_vapor_true_lang.mjs +14 -12
- package/dist/es/components/src/highlight/highlight.d.ts +20 -0
- package/dist/es/components/src/highlight/highlight.vue.mjs +5 -0
- package/dist/es/components/src/highlight/highlight.vue_vue_type_script_setup_true_vapor_true_lang.mjs +45 -0
- package/dist/es/components/src/highlight/index.d.ts +22 -0
- package/dist/es/components/src/highlight/index.mjs +7 -0
- package/dist/es/components/src/highlight/types.d.ts +18 -0
- package/dist/es/components/src/image/image-group.d.ts +3 -1
- package/dist/es/components/src/image/image-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs +27 -26
- package/dist/es/components/src/image/index.d.ts +6 -2
- package/dist/es/components/src/menu/menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
- package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs +1 -1
- package/dist/es/components/src/modal/index.d.ts +0 -5
- package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -133
- package/dist/es/components/src/modal/types.d.ts +0 -10
- package/dist/es/components/src/pagination/pagination.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -1
- package/dist/es/components/src/steps/index.d.ts +30 -0
- package/dist/es/components/src/steps/index.mjs +7 -0
- package/dist/es/components/src/steps/steps.d.ts +25 -0
- package/dist/es/components/src/steps/steps.vue.mjs +5 -0
- package/dist/es/components/src/steps/steps.vue_vue_type_script_setup_true_vapor_true_lang.mjs +113 -0
- package/dist/es/components/src/steps/types.d.ts +34 -0
- package/dist/es/components/src/tag/index.d.ts +3 -0
- package/dist/es/components/src/tag/tag.vue_vue_type_script_setup_true_vapor_true_lang.mjs +11 -2
- package/dist/es/components/src/tag/types.d.ts +6 -0
- package/dist/es/components/src/tree/tree.vue_vue_type_script_setup_true_vapor_true_lang.mjs +62 -59
- package/dist/es/components/src/virtual-list/index.d.ts +24 -0
- package/dist/es/components/src/virtual-list/index.mjs +7 -0
- package/dist/es/components/src/virtual-list/types.d.ts +27 -0
- package/dist/es/components/src/virtual-list/virtual-list.d.ts +24 -0
- package/dist/es/components/src/virtual-list/virtual-list.vue.mjs +5 -0
- package/dist/es/components/src/virtual-list/virtual-list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +99 -0
- package/dist/es/core/components.mjs +49 -43
- package/dist/es/core/global.d.ts +4 -2
- package/dist/es/core/index.mjs +44 -41
- package/dist/es/hooks/index.d.ts +1 -0
- package/dist/es/hooks/index.mjs +1 -0
- package/dist/es/hooks/src/use-throttle.d.ts +8 -0
- package/dist/es/hooks/src/use-throttle.mjs +23 -0
- package/dist/es/icons/index.d.ts +3 -1
- package/dist/es/icons/index.mjs +2 -0
- package/dist/es/icons/src/check.d.ts +19 -0
- package/dist/es/icons/src/check.vue.mjs +11 -0
- package/dist/es/icons/src/empty.d.ts +19 -0
- package/dist/es/icons/src/empty.vue.mjs +11 -0
- package/dist/es/theme/components/anchor.scss +3 -4
- package/dist/es/theme/components/button.scss +28 -0
- package/dist/es/theme/components/card.scss +1 -1
- package/dist/es/theme/components/empty.scss +5 -3
- package/dist/es/theme/components/highlight.scss +13 -0
- package/dist/es/theme/components/index.scss +3 -0
- package/dist/es/theme/components/menu.scss +9 -0
- package/dist/es/theme/components/modal.scss +11 -12
- package/dist/es/theme/components/scrollbar.scss +4 -4
- package/dist/es/theme/components/steps.scss +237 -0
- package/dist/es/theme/components/tag.scss +17 -3
- package/dist/es/theme/components/timeline.scss +1 -1
- package/dist/es/theme/components/virtual-list.scss +59 -0
- package/dist/es/utils/src/theme/themeMap.mjs +3 -3
- package/dist/json/vetur-attributes.json +78 -20
- package/dist/json/vetur-tags.json +35 -7
- package/dist/json/web-types.json +196 -41
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
# [0.7.0](https://gitee.com/mach552/savor-ui/compare/v0.6.1...v0.7.0) (2026-06-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **card:** 调整样式 ([45b7155](https://gitee.com/mach552/savor-ui/commits/45b71559882ce9afcb64df0a5add0f34378d2da2))
|
|
11
|
+
* **descriptions:** 修复content没有内容时高度与label不一致问题 ([708f974](https://gitee.com/mach552/savor-ui/commits/708f9745c295ca66421c4954692e02f22d9e3f86))
|
|
12
|
+
* **menu:** 调整样式 ([2817e6a](https://gitee.com/mach552/savor-ui/commits/2817e6a361b0aa9cd90a46d936300871b45bdced))
|
|
13
|
+
* **scrollbar:** 调整样式 ([054eb92](https://gitee.com/mach552/savor-ui/commits/054eb929aca527c2d7db95718ceed59d2baa5e19))
|
|
14
|
+
* **tree:** 修复高度无法异步更新的问题 ([5884a9a](https://gitee.com/mach552/savor-ui/commits/5884a9aac150429ce6913433d0ff588736f5d132))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **button:** 新增轮廓和次要按钮 ([5d48f25](https://gitee.com/mach552/savor-ui/commits/5d48f2594010079e9b5d67af9356580bcef085ee))
|
|
20
|
+
* **highlight:** 新增高亮文本组件 ([8a53e5e](https://gitee.com/mach552/savor-ui/commits/8a53e5eaf8a74a2fa5ce1d624e60a7c70a7d87c4))
|
|
21
|
+
* **steps:** 新增步骤条组件 ([790465f](https://gitee.com/mach552/savor-ui/commits/790465f686ed5dc8ff30c8574f888d11f74af51b))
|
|
22
|
+
* **tag:** 新增多种类型 ([a448e67](https://gitee.com/mach552/savor-ui/commits/a448e678c48abf159f2c41256a0cd7c702df727d))
|
|
23
|
+
* **virtual-list:** 新增虚拟列表组件 ([bdf0dda](https://gitee.com/mach552/savor-ui/commits/bdf0dda038f1e5052e1feb058279183d5aaac706))
|
|
24
|
+
|
|
5
25
|
## [0.6.1](https://gitee.com/mach552/savor-ui/compare/v0.6.0...v0.6.1) (2026-06-26)
|
|
6
26
|
|
|
7
27
|
|
|
@@ -25,6 +25,7 @@ export * from './src/expand-card';
|
|
|
25
25
|
export * from './src/form';
|
|
26
26
|
export * from './src/galleria';
|
|
27
27
|
export * from './src/grid';
|
|
28
|
+
export * from './src/highlight';
|
|
28
29
|
export * from './src/icon';
|
|
29
30
|
export * from './src/image';
|
|
30
31
|
export * from './src/input';
|
|
@@ -49,6 +50,7 @@ export * from './src/select';
|
|
|
49
50
|
export * from './src/skeleton';
|
|
50
51
|
export * from './src/space';
|
|
51
52
|
export * from './src/statistic';
|
|
53
|
+
export * from './src/steps';
|
|
52
54
|
export * from './src/switch';
|
|
53
55
|
export * from './src/table';
|
|
54
56
|
export * from './src/tabs';
|
|
@@ -60,6 +62,7 @@ export * from './src/tooltip';
|
|
|
60
62
|
export * from './src/transition';
|
|
61
63
|
export * from './src/tree';
|
|
62
64
|
export * from './src/upload';
|
|
65
|
+
export * from './src/virtual-list';
|
|
63
66
|
export * from './src/waterfall';
|
|
64
67
|
export * from './src/watermark';
|
|
65
68
|
export * from './src/wheel';
|
|
@@ -42,6 +42,7 @@ import "./src/expand-card/index.mjs";
|
|
|
42
42
|
import "./src/galleria/index.mjs";
|
|
43
43
|
import "./src/grid/types.mjs";
|
|
44
44
|
import "./src/grid/index.mjs";
|
|
45
|
+
import "./src/highlight/index.mjs";
|
|
45
46
|
import "./src/image/types.mjs";
|
|
46
47
|
import "./src/image/index.mjs";
|
|
47
48
|
import "./src/input-number/index.mjs";
|
|
@@ -67,6 +68,7 @@ import "./src/segmented/index.mjs";
|
|
|
67
68
|
import "./src/skeleton/index.mjs";
|
|
68
69
|
import "./src/space/index.mjs";
|
|
69
70
|
import "./src/statistic/index.mjs";
|
|
71
|
+
import "./src/steps/index.mjs";
|
|
70
72
|
import "./src/switch/index.mjs";
|
|
71
73
|
import "./src/table/types.mjs";
|
|
72
74
|
import "./src/table/index.mjs";
|
|
@@ -79,6 +81,7 @@ import "./src/timeline/index.mjs";
|
|
|
79
81
|
import "./src/tree/types.mjs";
|
|
80
82
|
import "./src/tree/index.mjs";
|
|
81
83
|
import "./src/upload/index.mjs";
|
|
84
|
+
import "./src/virtual-list/index.mjs";
|
|
82
85
|
import "./src/waterfall/index.mjs";
|
|
83
86
|
import "./src/watermark/index.mjs";
|
|
84
87
|
import "./src/wheel/index.mjs";
|
package/dist/es/components/src/button/button.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -20,7 +20,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
|
|
|
20
20
|
block: { type: Boolean },
|
|
21
21
|
text: { type: Boolean },
|
|
22
22
|
link: { type: Boolean },
|
|
23
|
-
secondary: { type: Boolean }
|
|
23
|
+
secondary: { type: Boolean },
|
|
24
|
+
outline: { type: Boolean }
|
|
24
25
|
},
|
|
25
26
|
setup(c, { slots: g }) {
|
|
26
27
|
let S = c, C = e("button"), w = l(n, void 0), T = r(() => w?.size?.value || S.size), E = x();
|
|
@@ -37,7 +38,8 @@ var y = g("<div>"), b = g(" "), x = g("<button>", 1), S = /*@__PURE__*/ c({
|
|
|
37
38
|
e.is("link", c.link),
|
|
38
39
|
e.is("disabled", t),
|
|
39
40
|
e.is("loading", n),
|
|
40
|
-
e.is("only-icon", !g.default && !c.label)
|
|
41
|
+
e.is("only-icon", !g.default && !c.label),
|
|
42
|
+
e.is("outline", c.outline)
|
|
41
43
|
]), m(E, "disabled", t || n), d(E, "html-type", c.htmlType);
|
|
42
44
|
}), p(E, null, 0), o(() => (g.icon || c.icon) && !c.loading, () => {
|
|
43
45
|
let e = y();
|
|
@@ -18,6 +18,7 @@ export declare const SButton: ((__VLS_props: NonNullable<Awaited<typeof __VLS_se
|
|
|
18
18
|
text?: boolean | undefined;
|
|
19
19
|
link?: boolean | undefined;
|
|
20
20
|
secondary?: boolean | undefined;
|
|
21
|
+
outline?: boolean | undefined;
|
|
21
22
|
} & (typeof globalThis extends {
|
|
22
23
|
__VLS_PROPS_FALLBACK: infer P;
|
|
23
24
|
} ? P : {});
|
|
@@ -29,17 +29,17 @@ var y = h(" "), b = h("<div><div></div><div>", 1), x = /*@__PURE__*/ a({
|
|
|
29
29
|
if (!S?.positionList) return {
|
|
30
30
|
gridColumn: `span ${h.span}`,
|
|
31
31
|
display: "flex",
|
|
32
|
-
alignItems: "
|
|
32
|
+
alignItems: "stretch"
|
|
33
33
|
};
|
|
34
34
|
let e = S.positionList.value[C];
|
|
35
35
|
return e ? {
|
|
36
36
|
gridColumn: `${e.start} / ${e.end}`,
|
|
37
37
|
display: "flex",
|
|
38
|
-
alignItems: "
|
|
38
|
+
alignItems: "stretch"
|
|
39
39
|
} : {
|
|
40
40
|
gridColumn: `span ${h.span}`,
|
|
41
41
|
display: "flex",
|
|
42
|
-
alignItems: "
|
|
42
|
+
alignItems: "stretch"
|
|
43
43
|
};
|
|
44
44
|
}), T = r(() => {
|
|
45
45
|
let e = S?.labelAlign || h.labelAlign, t = S?.labelWidth, n = h.labelWidth || t, r = {
|
package/dist/es/components/src/empty/empty.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import
|
|
3
|
+
import t from "../../../icons/src/empty.vue.mjs";
|
|
4
|
+
import "../../../icons/index.mjs";
|
|
5
|
+
import { child as n, createComponent as r, createSlot as i, defineVaporComponent as a, next as o, renderEffect as s, setClass as c, setInsertionState as l, setText as u, template as d, toDisplayString as f, unref as p } from "vue";
|
|
4
6
|
//#region ../components/src/empty/empty.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
5
|
-
var
|
|
7
|
+
var m = d(" "), h = d("<div><div></div><div>", 1), g = /*@__PURE__*/ a({
|
|
6
8
|
name: "SEmpty",
|
|
7
9
|
__name: "empty",
|
|
8
10
|
props: { description: {} },
|
|
9
|
-
setup(
|
|
10
|
-
let
|
|
11
|
-
return
|
|
12
|
-
let e = d
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
let e =
|
|
16
|
-
return
|
|
17
|
-
}),
|
|
11
|
+
setup(a) {
|
|
12
|
+
let d = e("empty"), g = h(), _ = n(g), v = o(_, 1);
|
|
13
|
+
return s(() => {
|
|
14
|
+
let e = p(d);
|
|
15
|
+
c(g, [e.b()]), c(_, [e.e("image")]);
|
|
16
|
+
}), l(_, null, 0), i("image", null, () => r(p(t))), s(() => c(v, [p(d).e("description")])), l(v, null, 0), i("description", null, () => {
|
|
17
|
+
let e = m();
|
|
18
|
+
return s(() => u(e, f(a.description || "暂无数据"))), e;
|
|
19
|
+
}), g;
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
22
|
//#endregion
|
|
21
|
-
export {
|
|
23
|
+
export { g as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HighlightProps, HighlightSlots } from './types';
|
|
2
|
+
import { PublicProps, VNode } from 'vue';
|
|
3
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: PublicProps & __VLS_PrettifyLocal<HighlightProps> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: {}) => void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: HighlightSlots;
|
|
10
|
+
emit: {};
|
|
11
|
+
}>) => VNode & {
|
|
12
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
+
[K in keyof T]: T[K];
|
|
18
|
+
} : {
|
|
19
|
+
[K in keyof T as K]: T[K];
|
|
20
|
+
}) & {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
|
+
import "../../../hooks/index.mjs";
|
|
3
|
+
import { computed as t, createFor as n, createIf as r, createSlot as i, defineVaporComponent as a, renderEffect as o, setClass as s, setInsertionState as c, setText as l, template as u, toDisplayString as d, unref as f } from "vue";
|
|
4
|
+
//#region ../components/src/highlight/highlight.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
5
|
+
var p = u(" "), m = u("<span>"), h = u("<div>", 1), g = /*@__PURE__*/ a({
|
|
6
|
+
name: "SHighlight",
|
|
7
|
+
__name: "highlight",
|
|
8
|
+
props: {
|
|
9
|
+
content: { default: "" },
|
|
10
|
+
keyWords: { default: () => [] },
|
|
11
|
+
ignoreCase: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !1
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(a) {
|
|
17
|
+
let u = a, g = e("highlight"), _ = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), v = t(() => {
|
|
18
|
+
let e = u.keyWords.map((e) => e.trim()).filter(Boolean);
|
|
19
|
+
if (!e.length) return null;
|
|
20
|
+
let t = e.sort((e, t) => t.length - e.length).map(_).join("|"), n = u.ignoreCase ? "ig" : "g";
|
|
21
|
+
return RegExp(`(${t})`, n);
|
|
22
|
+
}), y = t(() => {
|
|
23
|
+
let e = u.content, t = v.value;
|
|
24
|
+
return !t || !e ? [{
|
|
25
|
+
isKey: !1,
|
|
26
|
+
text: e
|
|
27
|
+
}] : e.split(t).map((e) => ({
|
|
28
|
+
text: e,
|
|
29
|
+
isKey: t.test(e)
|
|
30
|
+
}));
|
|
31
|
+
}), b = h();
|
|
32
|
+
return o(() => s(b, [f(g).b()])), c(b, null, 0), n(() => y.value, (e, t) => r(() => e.value.text, () => {
|
|
33
|
+
let t = m();
|
|
34
|
+
return o(() => s(t, [e.value.isKey && f(g).e("key-word")])), c(t, null, 0), r(() => e.value.isKey, () => i("light", { text: () => e.value.text }, () => {
|
|
35
|
+
let t = p();
|
|
36
|
+
return o(() => l(t, d(e.value.text))), t;
|
|
37
|
+
}), () => i("default", { text: () => e.value.text }, () => {
|
|
38
|
+
let t = p();
|
|
39
|
+
return o(() => l(t, d(e.value.text))), t;
|
|
40
|
+
}), 261), t;
|
|
41
|
+
}, null, 10), (e, t) => `${e.text}-${t}`, 17), b;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { g as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HighlightSlots } from './types';
|
|
2
|
+
import { PublicProps, VNode, Plugin } from 'vue';
|
|
3
|
+
export declare const SHighlight: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
|
+
attrs: any;
|
|
5
|
+
slots: HighlightSlots;
|
|
6
|
+
emit: {};
|
|
7
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: PublicProps & {
|
|
9
|
+
content?: string | undefined;
|
|
10
|
+
keyWords?: string[] | undefined;
|
|
11
|
+
ignoreCase?: boolean | undefined;
|
|
12
|
+
} & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: {}) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: HighlightSlots;
|
|
18
|
+
emit: {};
|
|
19
|
+
}>) => VNode & {
|
|
20
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
21
|
+
}) & Plugin;
|
|
22
|
+
export * from './types';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface HighlightProps {
|
|
2
|
+
/** 要高亮的内容 */
|
|
3
|
+
content?: string;
|
|
4
|
+
/** 要高亮的关键词 */
|
|
5
|
+
keyWords?: string[];
|
|
6
|
+
/** 是否忽略大小写 */
|
|
7
|
+
ignoreCase?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface HighlightSlots {
|
|
10
|
+
/** 未高亮内容 */
|
|
11
|
+
default?: (props: {
|
|
12
|
+
text: string;
|
|
13
|
+
}) => any;
|
|
14
|
+
/** 高亮内容 */
|
|
15
|
+
light?: (props: {
|
|
16
|
+
text: string;
|
|
17
|
+
}) => any;
|
|
18
|
+
}
|
|
@@ -10,7 +10,9 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
10
10
|
} ? P : {});
|
|
11
11
|
expose: (exposed: {}) => void;
|
|
12
12
|
attrs: any;
|
|
13
|
-
slots: {
|
|
13
|
+
slots: {
|
|
14
|
+
default?: (props: {}) => any;
|
|
15
|
+
};
|
|
14
16
|
emit: (event: "update:modelValue", value: boolean) => void;
|
|
15
17
|
}>) => VNode & {
|
|
16
18
|
__ctx?: Awaited<typeof __VLS_setup>;
|
package/dist/es/components/src/image/image-group.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -4,15 +4,15 @@ import { useZIndex as n } from "../../../hooks/src/use-zIndex.mjs";
|
|
|
4
4
|
import "../../../hooks/index.mjs";
|
|
5
5
|
import r from "../../../icons/src/close.vue.mjs";
|
|
6
6
|
import ee from "../../../icons/src/left.vue.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
7
|
+
import te from "../../../icons/src/refresh-left.vue.mjs";
|
|
8
|
+
import i from "../../../icons/src/refresh-right.vue.mjs";
|
|
9
|
+
import a from "../../../icons/src/refresh.vue.mjs";
|
|
10
|
+
import o from "../../../icons/src/right.vue.mjs";
|
|
11
|
+
import ne from "../../../icons/src/zoom-in.vue.mjs";
|
|
12
|
+
import re from "../../../icons/src/zoom-out.vue.mjs";
|
|
13
13
|
import "../../../icons/index.mjs";
|
|
14
|
-
import { imageGroupContextKey as
|
|
15
|
-
import { VaporTeleport as
|
|
14
|
+
import { imageGroupContextKey as s } from "./types.mjs";
|
|
15
|
+
import { VaporTeleport as c, child as l, computed as u, createComponent as d, createIf as f, createInvoker as p, createSlot as m, defineVaporComponent as h, delegateEvents as g, mergeModels as _, next as v, on as y, onMounted as b, onUnmounted as x, provide as S, ref as C, renderEffect as w, setClass as T, setInsertionState as E, setProp as ie, setStyle as D, template as O, unref as k, useModel as ae, watch as A, withModifiers as j } from "vue";
|
|
16
16
|
//#region ../components/src/image/image-group.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
17
17
|
var M = O("<div><img alt>"), N = O("<div><div></div><div><div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div>");
|
|
18
18
|
g("click", "mousedown", "mouseup", "mousemove");
|
|
@@ -27,8 +27,9 @@ var P = /*@__PURE__*/ h({
|
|
|
27
27
|
modelModifiers: {}
|
|
28
28
|
}),
|
|
29
29
|
emits: ["update:modelValue"],
|
|
30
|
+
__multiRoot: !0,
|
|
30
31
|
setup(h) {
|
|
31
|
-
let g = h, _ = e("image"), { nextZIndex: O } = n(), { lockScroll: P, unlockScroll: F } = t(), I = C(0), L =
|
|
32
|
+
let g = h, _ = e("image"), { nextZIndex: O } = n(), { lockScroll: P, unlockScroll: F } = t(), I = C(0), L = ae(h, "modelValue"), R = C([]), z = C(0), B = u(() => R.value[z.value]), V = () => {
|
|
32
33
|
L.value = !1, F();
|
|
33
34
|
};
|
|
34
35
|
A(L, (e) => {
|
|
@@ -44,19 +45,19 @@ var P = /*@__PURE__*/ h({
|
|
|
44
45
|
U.value -= .2, U.value < .5 && (U.value = .5);
|
|
45
46
|
}, X = () => {
|
|
46
47
|
H.value = 0, U.value = 1, W.value = 0, G.value = 0;
|
|
47
|
-
},
|
|
48
|
+
}, oe = () => {
|
|
48
49
|
V();
|
|
49
50
|
}, Z = (e) => {
|
|
50
51
|
L.value && (e.preventDefault(), e.deltaY > 0 ? Y() : J());
|
|
51
|
-
}, Q = C(!1),
|
|
52
|
+
}, Q = C(!1), se = (e) => {
|
|
52
53
|
e.preventDefault(), Q.value = !0;
|
|
53
|
-
},
|
|
54
|
+
}, ce = (e) => {
|
|
54
55
|
e.preventDefault(), Q.value = !1;
|
|
55
|
-
},
|
|
56
|
+
}, le = (e) => {
|
|
56
57
|
e.preventDefault(), Q.value && (W.value += e.movementX, G.value += e.movementY);
|
|
57
|
-
},
|
|
58
|
+
}, $ = () => {
|
|
58
59
|
z.value--, X(), z.value < 0 && (z.value = R.value.length - 1);
|
|
59
|
-
},
|
|
60
|
+
}, ue = () => {
|
|
60
61
|
z.value++, X(), z.value > R.value.length - 1 && (z.value = 0);
|
|
61
62
|
};
|
|
62
63
|
return b(() => {
|
|
@@ -65,7 +66,7 @@ var P = /*@__PURE__*/ h({
|
|
|
65
66
|
document.removeEventListener("wheel", Z);
|
|
66
67
|
}), A(() => g.srcList, (e) => {
|
|
67
68
|
e && (R.value = e);
|
|
68
|
-
}, { immediate: !0 }), S(
|
|
69
|
+
}, { immediate: !0 }), S(s, {
|
|
69
70
|
addImage: (e) => {
|
|
70
71
|
R.value.push(e);
|
|
71
72
|
},
|
|
@@ -76,22 +77,22 @@ var P = /*@__PURE__*/ h({
|
|
|
76
77
|
let t = R.value.indexOf(e);
|
|
77
78
|
t !== -1 && (z.value = t, X(), L.value = !0);
|
|
78
79
|
}
|
|
79
|
-
}),
|
|
80
|
-
let e = N(), t =
|
|
81
|
-
return t.$evtclick =
|
|
80
|
+
}), [m(), d(c, { to: "body" }, () => f(() => L.value, () => {
|
|
81
|
+
let e = N(), t = l(e), n = v(t, 1), s = l(n, 1), c = l(s), u = v(c, 1), m = v(u, 2), h = v(m, 3), g = v(h, 4), b = v(g, 5), x = v(b, 6), S = v(x, 7);
|
|
82
|
+
return t.$evtclick = p(V), w(() => {
|
|
82
83
|
let r = k(_);
|
|
83
84
|
T(e, [r.e("preview")]), D(e, { zIndex: I.value }), T(t, [r.e("mask")]), T(n, [r.e("wrapper")]);
|
|
84
|
-
}), E(n, 0, 0),
|
|
85
|
-
let e = M(), t =
|
|
86
|
-
return e.$evtmousedown =
|
|
85
|
+
}), E(n, 0, 0), f(() => B.value, () => {
|
|
86
|
+
let e = M(), t = l(e);
|
|
87
|
+
return e.$evtmousedown = p(se), e.$evtmouseup = p(ce), e.$evtmousemove = p(le), w(() => {
|
|
87
88
|
let n = k(_);
|
|
88
|
-
T(e, [n.e("content")]), D(e, { transform: `translate(${W.value}px, ${G.value}px) rotate(${H.value}deg) scale(${U.value})` }),
|
|
89
|
+
T(e, [n.e("content")]), D(e, { transform: `translate(${W.value}px, ${G.value}px) rotate(${H.value}deg) scale(${U.value})` }), ie(t, "src", B.value), T(t, [n.e("content-img")]);
|
|
89
90
|
}), e;
|
|
90
91
|
}), w(() => {
|
|
91
92
|
let e = k(_);
|
|
92
|
-
T(
|
|
93
|
-
}), E(
|
|
94
|
-
}, null, 129)
|
|
93
|
+
T(s, [e.e("toolbar")]), T(c, [e.e("toolbar-item")]);
|
|
94
|
+
}), E(c, null, 0), d(k(te)), y(c, "click", j(K, ["stop"])), w(() => T(u, [k(_).e("toolbar-item")])), E(u, null, 0), d(k(i)), y(u, "click", j(q, ["stop"])), w(() => T(m, [k(_).e("toolbar-item")])), E(m, null, 0), d(k(ne)), y(m, "click", j(J, ["stop"])), w(() => T(h, [k(_).e("toolbar-item")])), E(h, null, 0), d(k(re)), y(h, "click", j(Y, ["stop"])), w(() => T(g, [k(_).e("toolbar-item")])), E(g, null, 0), d(k(a)), y(g, "click", j(X, ["stop"])), w(() => T(b, [k(_).e("toolbar-item")])), E(b, null, 0), d(k(ee)), y(b, "click", j($, ["stop"])), w(() => T(x, [k(_).e("toolbar-item")])), E(x, null, 0), d(k(o)), y(x, "click", j(ue, ["stop"])), w(() => T(S, [k(_).e("toolbar-item")])), E(S, null, 0), d(k(r)), y(S, "click", j(oe, ["stop"])), e;
|
|
95
|
+
}, null, 129))];
|
|
95
96
|
}
|
|
96
97
|
});
|
|
97
98
|
//#endregion
|
|
@@ -40,7 +40,9 @@ export declare const SImagePreview: ((__VLS_props: NonNullable<Awaited<typeof __
|
|
|
40
40
|
}) & Plugin;
|
|
41
41
|
export declare const SImageGroup: ((__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
42
42
|
attrs: any;
|
|
43
|
-
slots: {
|
|
43
|
+
slots: {
|
|
44
|
+
default?: (props: {}) => any;
|
|
45
|
+
};
|
|
44
46
|
emit: (event: "update:modelValue", value: boolean) => void;
|
|
45
47
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
46
48
|
props: PublicProps & {
|
|
@@ -52,7 +54,9 @@ export declare const SImageGroup: ((__VLS_props: NonNullable<Awaited<typeof __VL
|
|
|
52
54
|
} ? P : {});
|
|
53
55
|
expose: (exposed: {}) => void;
|
|
54
56
|
attrs: any;
|
|
55
|
-
slots: {
|
|
57
|
+
slots: {
|
|
58
|
+
default?: (props: {}) => any;
|
|
59
|
+
};
|
|
56
60
|
emit: (event: "update:modelValue", value: boolean) => void;
|
|
57
61
|
}>) => VNode & {
|
|
58
62
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
@@ -58,7 +58,7 @@ var C = v("<div>"), w = v("<div>", 1), T = /*@__PURE__*/ l({
|
|
|
58
58
|
return p(() => {
|
|
59
59
|
let e = b(E);
|
|
60
60
|
m(B, [e.b(), e.m(b(F))]), _(B, D.value);
|
|
61
|
-
}), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "
|
|
61
|
+
}), h(B, null, 0), s(() => b(F) === "vertical", () => o(b(r), { padding: "4px" }, () => {
|
|
62
62
|
let e = C();
|
|
63
63
|
return p(() => m(e, [b(E).e("content")])), h(e, null, 0), c(), e;
|
|
64
64
|
})), h(B, null, 1), s(() => b(F) === "horizontal", () => {
|
package/dist/es/components/src/menu/sub-menu.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -82,7 +82,7 @@ var N = /*@__PURE__*/ m({
|
|
|
82
82
|
let e = u(D(i), {
|
|
83
83
|
manual: "",
|
|
84
84
|
placement: () => D(F)?.mode.value === "horizontal" ? "bottom-start" : "right-start",
|
|
85
|
-
offset: [0,
|
|
85
|
+
offset: [0, 8],
|
|
86
86
|
onClickOutside: () => W
|
|
87
87
|
}, {
|
|
88
88
|
content: () => d(() => D(F)?.mode.value === "horizontal" && h.subContent, () => {
|
|
@@ -11,10 +11,6 @@ export declare const SModal: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
|
|
|
11
11
|
modalValue?: boolean | undefined;
|
|
12
12
|
width?: string | number | undefined;
|
|
13
13
|
height?: string | number | undefined;
|
|
14
|
-
minWidth?: number | undefined;
|
|
15
|
-
minHeight?: number | undefined;
|
|
16
|
-
maxWidth?: number | undefined;
|
|
17
|
-
maxHeight?: number | undefined;
|
|
18
14
|
title?: string | undefined;
|
|
19
15
|
fullscreen?: boolean | undefined;
|
|
20
16
|
fullable?: boolean | undefined;
|
|
@@ -32,7 +28,6 @@ export declare const SModal: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
|
|
|
32
28
|
mask?: boolean | undefined;
|
|
33
29
|
to?: (string | HTMLElement) | undefined;
|
|
34
30
|
draggable?: boolean | undefined;
|
|
35
|
-
resizable?: boolean | undefined;
|
|
36
31
|
modalStyle?: Record<string, string> | undefined;
|
|
37
32
|
maskStyle?: Record<string, string> | undefined;
|
|
38
33
|
center?: boolean | undefined;
|