savor-ui 0.8.0 → 0.9.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 +12 -0
- package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs +2 -2
- package/dist/es/components/src/list/index.d.ts +13 -11
- package/dist/es/components/src/list/list.d.ts +9 -8
- package/dist/es/components/src/list/list.vue_vue_type_script_setup_true_vapor_true_lang.mjs +33 -28
- package/dist/es/components/src/list/types.d.ts +13 -13
- package/dist/es/components/src/modal/index.d.ts +2 -2
- package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs +14 -14
- package/dist/es/components/src/modal/types.d.ts +4 -4
- package/dist/es/theme/components/grid.scss +3 -0
- package/dist/es/theme/components/list.scss +10 -16
- package/dist/es/theme/components/menu.scss +1 -0
- package/dist/es/theme/components/modal.scss +1 -1
- package/dist/json/vetur-attributes.json +7 -35
- package/dist/json/vetur-tags.json +2 -14
- package/dist/json/web-types.json +17 -86
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
# [0.9.0](https://gitee.com/mach552/savor-ui/compare/v0.8.0...v0.9.0) (2026-07-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **grid:** 修复item内部高度虚高的问题 ([47221fc](https://gitee.com/mach552/savor-ui/commits/47221fcc9db115831e011ea43f386704e57c08ef))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **list:** 新增选择事件 ([2d132d3](https://gitee.com/mach552/savor-ui/commits/2d132d3e37ddc4b201272fa6a708dd7ac778436e))
|
|
16
|
+
|
|
5
17
|
# [0.8.0](https://gitee.com/mach552/savor-ui/compare/v0.7.0...v0.8.0) (2026-07-03)
|
|
6
18
|
|
|
7
19
|
|
package/dist/es/components/src/grid/grid-item.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var v = p("<div>", 1), y = /*@__PURE__*/ i({
|
|
|
11
11
|
offset: { default: 0 }
|
|
12
12
|
},
|
|
13
13
|
setup(i) {
|
|
14
|
-
let p = i, y = g("gridItemRef"), b = e("grid
|
|
14
|
+
let p = i, y = g("gridItemRef"), b = e("grid"), x = "grid-item-" + h(), S = a(t, {}), C = n(() => {
|
|
15
15
|
if (!S?.positionList) return {};
|
|
16
16
|
let e = S?.positionList.value[x];
|
|
17
17
|
return e ? { gridColumn: `${e.start} / ${e.end}` } : {};
|
|
@@ -40,7 +40,7 @@ var v = p("<div>", 1), y = /*@__PURE__*/ i({
|
|
|
40
40
|
});
|
|
41
41
|
let T = v();
|
|
42
42
|
return c(() => {
|
|
43
|
-
l(T, [m(b).
|
|
43
|
+
l(T, [m(b).e("item")]), f(T, C.value);
|
|
44
44
|
}), u(T, null, 0), r(), d(T, y, null, "gridItemRef"), T;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { ListSlots } from './types';
|
|
2
2
|
import { PublicProps, VNode, Plugin } from 'vue';
|
|
3
|
-
export declare const SList: (
|
|
3
|
+
export declare const SList: (<T extends {
|
|
4
|
+
id: number;
|
|
5
|
+
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
4
6
|
attrs: any;
|
|
5
|
-
slots: ListSlots
|
|
6
|
-
emit: ((
|
|
7
|
+
slots: ListSlots<T>;
|
|
8
|
+
emit: ((evt: "select", item: T, index: number) => void) & ((event: "update:modelValue", value: T) => void);
|
|
7
9
|
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
10
|
props: PublicProps & {
|
|
9
|
-
modelValue?:
|
|
10
|
-
data?:
|
|
11
|
+
modelValue?: T | undefined;
|
|
12
|
+
data?: T[] | undefined;
|
|
11
13
|
hover?: boolean | undefined;
|
|
12
14
|
selectable?: boolean | undefined;
|
|
13
|
-
selectKey?: string | undefined;
|
|
14
15
|
border?: boolean | undefined;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
gap?: number | undefined;
|
|
17
|
+
size?: "mini" | "small" | "medium" | "large" | undefined;
|
|
18
|
+
onSelect?: ((item: T, index: number) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
18
20
|
} & (typeof globalThis extends {
|
|
19
21
|
__VLS_PROPS_FALLBACK: infer P;
|
|
20
22
|
} ? P : {});
|
|
21
23
|
expose: (exposed: {}) => void;
|
|
22
24
|
attrs: any;
|
|
23
|
-
slots: ListSlots
|
|
24
|
-
emit: ((
|
|
25
|
+
slots: ListSlots<T>;
|
|
26
|
+
emit: ((evt: "select", item: T, index: number) => void) & ((event: "update:modelValue", value: T) => void);
|
|
25
27
|
}>) => VNode & {
|
|
26
28
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
29
|
}) & Plugin;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { ListProps, ListSlots } from './types';
|
|
2
2
|
import { PublicProps, VNode } from 'vue';
|
|
3
|
-
declare const __VLS_export:
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
declare const __VLS_export: <T extends {
|
|
4
|
+
id: number;
|
|
5
|
+
}>(__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<{
|
|
6
|
+
props: PublicProps & __VLS_PrettifyLocal<(ListProps<T> & {
|
|
7
|
+
modelValue?: T;
|
|
6
8
|
}) & {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onDragEnd?: ((data: any) => any) | undefined;
|
|
9
|
+
onSelect?: ((item: T, index: number) => any) | undefined;
|
|
10
|
+
"onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
10
11
|
}> & (typeof globalThis extends {
|
|
11
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
12
13
|
} ? P : {});
|
|
13
14
|
expose: (exposed: {}) => void;
|
|
14
15
|
attrs: any;
|
|
15
|
-
slots: ListSlots
|
|
16
|
-
emit: ((
|
|
16
|
+
slots: ListSlots<T>;
|
|
17
|
+
emit: ((evt: "select", item: T, index: number) => void) & ((event: "update:modelValue", value: T) => void);
|
|
17
18
|
}>) => VNode & {
|
|
18
19
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
19
20
|
};
|
|
@@ -1,50 +1,55 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../hooks/src/use-namespace.mjs";
|
|
2
2
|
import "../../../hooks/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { createFor as t, createInvoker as n, createSlot as r, defineVaporComponent as i, delegateEvents as a, mergeModels as o, renderEffect as s, setClass as c, setInsertionState as l, setStyle as u, setText as d, template as f, toDisplayString as p, unref as m, useModel as h } from "vue";
|
|
4
4
|
//#region ../components/src/list/list.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
var
|
|
5
|
+
var g = f(" "), _ = f("<li>"), v = f("<div>", 1);
|
|
6
|
+
a("click");
|
|
7
|
+
var y = /*@__PURE__*/ i({
|
|
8
8
|
name: "SList",
|
|
9
9
|
__name: "list",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ o({
|
|
11
11
|
modelValue: {},
|
|
12
12
|
data: {},
|
|
13
13
|
hover: { type: Boolean },
|
|
14
14
|
selectable: { type: Boolean },
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
border: { type: Boolean },
|
|
16
|
+
gap: {},
|
|
17
|
+
size: { default: "medium" }
|
|
17
18
|
}, {
|
|
18
19
|
modelValue: { default: () => {} },
|
|
19
20
|
modelModifiers: {}
|
|
20
21
|
}),
|
|
21
|
-
emits: /*@__PURE__*/
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
}, S = (e) =>
|
|
26
|
-
return
|
|
27
|
-
let e =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
emits: /*@__PURE__*/ o(["select"], ["update:modelValue"]),
|
|
23
|
+
setup(i, { emit: a }) {
|
|
24
|
+
let o = i, f = a, y = e("list"), b = h(i, "modelValue"), x = (e, t) => {
|
|
25
|
+
o.selectable && (b.value?.id !== void 0 && b.value.id === e.id ? b.value = {} : b.value = e, f("select", e, t));
|
|
26
|
+
}, S = (e) => b.value?.id === e.id && o.selectable, C = v();
|
|
27
|
+
return s(() => {
|
|
28
|
+
let e = m(y);
|
|
29
|
+
c(C, [
|
|
30
|
+
e.b(),
|
|
31
|
+
e.m(i.size),
|
|
32
|
+
{ [e.m("border")]: i.border }
|
|
33
|
+
]), u(C, { gap: `${i.gap}px` });
|
|
34
|
+
}), l(C, null, 0), t(() => i.data, (e, t) => {
|
|
35
|
+
let a = _();
|
|
36
|
+
return s(() => {
|
|
37
|
+
let t = m(y);
|
|
38
|
+
c(a, [
|
|
34
39
|
t.e("item"),
|
|
35
40
|
t.is("selected", S(e.value)),
|
|
36
|
-
t.is("selectable",
|
|
37
|
-
{ [t.m("hover")]:
|
|
41
|
+
t.is("selectable", i.selectable),
|
|
42
|
+
{ [t.m("hover")]: i.hover }
|
|
38
43
|
]);
|
|
39
|
-
}),
|
|
44
|
+
}), l(a, null, 0), r("default", {
|
|
40
45
|
index: () => t.value,
|
|
41
46
|
item: () => e.value
|
|
42
47
|
}, () => {
|
|
43
|
-
let t =
|
|
44
|
-
return
|
|
45
|
-
}),
|
|
46
|
-
}, (e, t) => t, 9),
|
|
48
|
+
let t = g();
|
|
49
|
+
return s(() => d(t, p(e.value))), t;
|
|
50
|
+
}), a.$evtclick = n(() => x(e.value, t.value)), a;
|
|
51
|
+
}, (e, t) => t, 9), C;
|
|
47
52
|
}
|
|
48
53
|
});
|
|
49
54
|
//#endregion
|
|
50
|
-
export {
|
|
55
|
+
export { y as default };
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export interface ListProps {
|
|
1
|
+
export interface ListProps<T> {
|
|
2
2
|
/** 选中项(v-model) */
|
|
3
|
-
modelValue?:
|
|
3
|
+
modelValue?: T;
|
|
4
4
|
/** 列表项数据 */
|
|
5
|
-
data?:
|
|
5
|
+
data?: T[];
|
|
6
6
|
/** 是否显示悬停状态 */
|
|
7
7
|
hover?: boolean;
|
|
8
8
|
/** 是否可选择 */
|
|
9
9
|
selectable?: boolean;
|
|
10
|
-
/** 选中项键名
|
|
11
|
-
* @default id
|
|
12
|
-
*/
|
|
13
|
-
selectKey?: string;
|
|
14
10
|
/** 是否显示边框 */
|
|
15
11
|
border?: boolean;
|
|
12
|
+
/** 列表项间距 */
|
|
13
|
+
gap?: number;
|
|
14
|
+
/** 列表项大小 */
|
|
15
|
+
size?: "mini" | "small" | "medium" | "large";
|
|
16
16
|
}
|
|
17
|
-
export interface ListSlots {
|
|
18
|
-
/**
|
|
17
|
+
export interface ListSlots<T> {
|
|
18
|
+
/** 列表项内容 */
|
|
19
19
|
default: (props: {
|
|
20
|
-
item:
|
|
20
|
+
item: T;
|
|
21
21
|
index: number;
|
|
22
22
|
}) => any;
|
|
23
23
|
}
|
|
24
|
-
export interface ListEmits {
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export interface ListEmits<T> {
|
|
25
|
+
/** 选择事件 */
|
|
26
|
+
select: [item: T, index: number];
|
|
27
27
|
}
|
|
@@ -19,17 +19,17 @@ export declare const SModal: ((__VLS_props: NonNullable<Awaited<typeof __VLS_set
|
|
|
19
19
|
destroyOnClose?: boolean | undefined;
|
|
20
20
|
closeOnEsc?: boolean | undefined;
|
|
21
21
|
content?: (string | VNode) | undefined;
|
|
22
|
-
contentStyle?: Record<string, string> | undefined;
|
|
23
22
|
renderToBody?: boolean | undefined;
|
|
24
|
-
className?: string | undefined;
|
|
25
23
|
btnReverse?: boolean | undefined;
|
|
26
24
|
header?: boolean | undefined;
|
|
27
25
|
footer?: boolean | undefined;
|
|
28
26
|
mask?: boolean | undefined;
|
|
29
27
|
to?: (string | HTMLElement) | undefined;
|
|
30
28
|
draggable?: boolean | undefined;
|
|
29
|
+
className?: string | undefined;
|
|
31
30
|
modalStyle?: Record<string, string> | undefined;
|
|
32
31
|
maskStyle?: Record<string, string> | undefined;
|
|
32
|
+
bodyStyle?: Record<string, string> | undefined;
|
|
33
33
|
center?: boolean | undefined;
|
|
34
34
|
offset?: number | undefined;
|
|
35
35
|
scrollContent?: boolean | undefined;
|
package/dist/es/components/src/modal/modal.vue_vue_type_script_setup_true_vapor_true_lang.mjs
CHANGED
|
@@ -22,14 +22,11 @@ var M = /*@__PURE__*/ m({
|
|
|
22
22
|
__name: "modal",
|
|
23
23
|
props: /*@__PURE__*/ g({
|
|
24
24
|
modalValue: { type: Boolean },
|
|
25
|
-
width: { default: "
|
|
25
|
+
width: { default: "0px" },
|
|
26
26
|
height: {},
|
|
27
27
|
title: {},
|
|
28
28
|
fullscreen: { type: Boolean },
|
|
29
|
-
fullable: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: !0
|
|
32
|
-
},
|
|
29
|
+
fullable: { type: Boolean },
|
|
33
30
|
closable: {
|
|
34
31
|
type: Boolean,
|
|
35
32
|
default: !0
|
|
@@ -47,9 +44,7 @@ var M = /*@__PURE__*/ m({
|
|
|
47
44
|
default: !0
|
|
48
45
|
},
|
|
49
46
|
content: {},
|
|
50
|
-
contentStyle: {},
|
|
51
47
|
renderToBody: { type: Boolean },
|
|
52
|
-
className: {},
|
|
53
48
|
btnReverse: { type: Boolean },
|
|
54
49
|
header: {
|
|
55
50
|
type: Boolean,
|
|
@@ -65,8 +60,10 @@ var M = /*@__PURE__*/ m({
|
|
|
65
60
|
},
|
|
66
61
|
to: { default: "body" },
|
|
67
62
|
draggable: { type: Boolean },
|
|
63
|
+
className: {},
|
|
68
64
|
modalStyle: {},
|
|
69
65
|
maskStyle: {},
|
|
66
|
+
bodyStyle: {},
|
|
70
67
|
center: {
|
|
71
68
|
type: Boolean,
|
|
72
69
|
default: !0
|
|
@@ -105,7 +102,6 @@ var M = /*@__PURE__*/ m({
|
|
|
105
102
|
height: e(w.height),
|
|
106
103
|
top: `${U.value}px`,
|
|
107
104
|
left: `${W.value}px`,
|
|
108
|
-
maxHeight: K.value ? `${K.value - 40}px` : void 0,
|
|
109
105
|
...w.modalStyle
|
|
110
106
|
}), _e = () => {
|
|
111
107
|
M("opened");
|
|
@@ -169,7 +165,8 @@ var M = /*@__PURE__*/ m({
|
|
|
169
165
|
b(e, [
|
|
170
166
|
t.b(),
|
|
171
167
|
t.is("drag", m.draggable),
|
|
172
|
-
t.is("fullscreen", V.value)
|
|
168
|
+
t.is("fullscreen", V.value),
|
|
169
|
+
m.className
|
|
173
170
|
]), S(e, ge.value);
|
|
174
171
|
}), x(e, null, 0), f(() => m.header, () => {
|
|
175
172
|
let e = de(), t = l(e), n = se(t, 1);
|
|
@@ -180,20 +177,21 @@ var M = /*@__PURE__*/ m({
|
|
|
180
177
|
let e = A();
|
|
181
178
|
return y(() => C(e, T(m.title))), e;
|
|
182
179
|
}), y(() => b(n, [E(N).e("header-icon")])), x(n, null, 0), f(() => m.fullable, () => d(E(a), {
|
|
183
|
-
circle: "",
|
|
184
180
|
text: "",
|
|
185
|
-
size: "
|
|
181
|
+
size: "mini",
|
|
186
182
|
onClick: () => xe
|
|
187
183
|
}, { icon: () => f(() => V.value, () => d(E(ne)), () => d(E(re)), 645) })), x(n, null, 1), f(() => m.closable, () => d(E(a), {
|
|
188
|
-
circle: "",
|
|
189
184
|
text: "",
|
|
190
|
-
size: "
|
|
185
|
+
size: "mini",
|
|
191
186
|
onClick: () => X
|
|
192
187
|
}, { icon: () => d(E(te)) })), $(e, L, null, "headerRef"), e;
|
|
193
188
|
}), x(e, null, 1), f(() => !m.scrollContent, () => {
|
|
194
189
|
let e = k();
|
|
195
190
|
return y(() => {
|
|
196
|
-
b(e, [E(N).e("body")]), S(e,
|
|
191
|
+
b(e, [E(N).e("body")]), S(e, {
|
|
192
|
+
padding: "16px",
|
|
193
|
+
...m.bodyStyle
|
|
194
|
+
});
|
|
197
195
|
}), x(e, null, 0), p("default", null, () => {
|
|
198
196
|
let e = A();
|
|
199
197
|
return y(() => C(e, T(m.content))), e;
|
|
@@ -220,11 +218,13 @@ var M = /*@__PURE__*/ m({
|
|
|
220
218
|
onClick: () => X
|
|
221
219
|
})], () => [d(E(a), {
|
|
222
220
|
label: "取消",
|
|
221
|
+
size: "small",
|
|
223
222
|
secondary: "",
|
|
224
223
|
onClick: () => X
|
|
225
224
|
}), d(E(a), {
|
|
226
225
|
label: "确定",
|
|
227
226
|
loading: () => H.value,
|
|
227
|
+
size: "small",
|
|
228
228
|
type: "primary",
|
|
229
229
|
onClick: () => Y
|
|
230
230
|
})], 1930)), e;
|
|
@@ -23,12 +23,8 @@ export interface ModalProps {
|
|
|
23
23
|
closeOnEsc?: boolean;
|
|
24
24
|
/** 弹窗内容 */
|
|
25
25
|
content?: string | VNode;
|
|
26
|
-
/** 弹窗内容自定义样式 */
|
|
27
|
-
contentStyle?: Record<string, string>;
|
|
28
26
|
/** 是否渲染到 body 元素 */
|
|
29
27
|
renderToBody?: boolean;
|
|
30
|
-
/** 弹窗自定义类名 */
|
|
31
|
-
className?: string;
|
|
32
28
|
/** 是否反转按钮顺序 */
|
|
33
29
|
btnReverse?: boolean;
|
|
34
30
|
/** 是否显示弹窗头 */
|
|
@@ -41,10 +37,14 @@ export interface ModalProps {
|
|
|
41
37
|
to?: string | HTMLElement;
|
|
42
38
|
/** 是否开启拖动弹窗 */
|
|
43
39
|
draggable?: boolean;
|
|
40
|
+
/** 弹窗自定义类名 */
|
|
41
|
+
className?: string;
|
|
44
42
|
/** 弹窗自定义样式 */
|
|
45
43
|
modalStyle?: Record<string, string>;
|
|
46
44
|
/** 弹窗遮罩自定义样式 */
|
|
47
45
|
maskStyle?: Record<string, string>;
|
|
46
|
+
/** 弹窗内容自定义样式 */
|
|
47
|
+
bodyStyle?: Record<string, string>;
|
|
48
48
|
/** 是否居中显示弹窗
|
|
49
49
|
* @default true
|
|
50
50
|
*/
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
@use "../mixins/function.scss" as *;
|
|
2
2
|
@use "../mixins/mixins.scss" as *;
|
|
3
|
+
@use "../common/var.scss" as *;
|
|
3
4
|
|
|
4
5
|
@include b(list) {
|
|
5
6
|
width: 100%;
|
|
6
7
|
overflow: hidden;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
7
10
|
@include m(border) {
|
|
8
11
|
border-radius: getCssVar("radius", "medium");
|
|
9
12
|
border: 1px solid getCssVar("color", "fill-3");
|
|
@@ -14,17 +17,7 @@
|
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
@include e(wrapper) {
|
|
18
|
-
position: relative;
|
|
19
|
-
padding: 0;
|
|
20
|
-
margin: 0;
|
|
21
|
-
list-style-type: none;
|
|
22
|
-
}
|
|
23
|
-
@include m(wrapper-move) {
|
|
24
|
-
transition: transform 0.3s ease;
|
|
25
|
-
}
|
|
26
20
|
@include e(item) {
|
|
27
|
-
padding: 8px 16px;
|
|
28
21
|
display: flex;
|
|
29
22
|
align-items: center;
|
|
30
23
|
color: getCssVar("color", "text-1");
|
|
@@ -44,16 +37,17 @@
|
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
39
|
}
|
|
47
|
-
@include m(drag) {
|
|
48
|
-
cursor: move;
|
|
49
|
-
}
|
|
50
|
-
@include m(ghost) {
|
|
51
|
-
opacity: 1;
|
|
52
|
-
}
|
|
53
40
|
@include m(hover) {
|
|
54
41
|
border-radius: getCssVar("radius", "medium");
|
|
55
42
|
&:hover {
|
|
56
43
|
background-color: getCssVar("color", "fill-2");
|
|
57
44
|
}
|
|
58
45
|
}
|
|
46
|
+
@each $size in $size-list {
|
|
47
|
+
@include m($size) {
|
|
48
|
+
@include be(list, item) {
|
|
49
|
+
height: getCssVar("size", $size);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
59
53
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
@include b(modal) {
|
|
5
5
|
position: absolute;
|
|
6
|
+
min-width: 280px;
|
|
6
7
|
color: getCssVar("color", "text-1");
|
|
7
8
|
box-shadow: getCssVar("shadow", "1");
|
|
8
9
|
display: flex;
|
|
@@ -67,7 +68,6 @@
|
|
|
67
68
|
}
|
|
68
69
|
@include e(body) {
|
|
69
70
|
flex: 1;
|
|
70
|
-
padding: 16px;
|
|
71
71
|
overflow: hidden;
|
|
72
72
|
}
|
|
73
73
|
@include e(footer) {
|
|
@@ -1308,34 +1308,6 @@
|
|
|
1308
1308
|
"description": "链接是否禁用状态",
|
|
1309
1309
|
"type": "boolean"
|
|
1310
1310
|
},
|
|
1311
|
-
"s-list/dragStart": {
|
|
1312
|
-
"description": "—"
|
|
1313
|
-
},
|
|
1314
|
-
"s-list/dragEnd": {
|
|
1315
|
-
"description": "—"
|
|
1316
|
-
},
|
|
1317
|
-
"s-list/modelValue": {
|
|
1318
|
-
"description": "选中项(v-model)"
|
|
1319
|
-
},
|
|
1320
|
-
"s-list/data": {
|
|
1321
|
-
"description": "列表项数据"
|
|
1322
|
-
},
|
|
1323
|
-
"s-list/hover": {
|
|
1324
|
-
"description": "是否显示悬停状态",
|
|
1325
|
-
"type": "boolean"
|
|
1326
|
-
},
|
|
1327
|
-
"s-list/selectable": {
|
|
1328
|
-
"description": "是否可选择",
|
|
1329
|
-
"type": "boolean"
|
|
1330
|
-
},
|
|
1331
|
-
"s-list/selectKey": {
|
|
1332
|
-
"description": "选中项键名",
|
|
1333
|
-
"type": "string"
|
|
1334
|
-
},
|
|
1335
|
-
"s-list/border": {
|
|
1336
|
-
"description": "是否显示边框",
|
|
1337
|
-
"type": "boolean"
|
|
1338
|
-
},
|
|
1339
1311
|
"s-menu/itemClick": {
|
|
1340
1312
|
"description": "点击菜单项时触发"
|
|
1341
1313
|
},
|
|
@@ -1516,17 +1488,10 @@
|
|
|
1516
1488
|
"s-modal/content": {
|
|
1517
1489
|
"description": "弹窗内容"
|
|
1518
1490
|
},
|
|
1519
|
-
"s-modal/contentStyle": {
|
|
1520
|
-
"description": "弹窗内容自定义样式"
|
|
1521
|
-
},
|
|
1522
1491
|
"s-modal/renderToBody": {
|
|
1523
1492
|
"description": "是否渲染到 body 元素",
|
|
1524
1493
|
"type": "boolean"
|
|
1525
1494
|
},
|
|
1526
|
-
"s-modal/className": {
|
|
1527
|
-
"description": "弹窗自定义类名",
|
|
1528
|
-
"type": "string"
|
|
1529
|
-
},
|
|
1530
1495
|
"s-modal/btnReverse": {
|
|
1531
1496
|
"description": "是否反转按钮顺序",
|
|
1532
1497
|
"type": "boolean"
|
|
@@ -1550,12 +1515,19 @@
|
|
|
1550
1515
|
"description": "是否开启拖动弹窗",
|
|
1551
1516
|
"type": "boolean"
|
|
1552
1517
|
},
|
|
1518
|
+
"s-modal/className": {
|
|
1519
|
+
"description": "弹窗自定义类名",
|
|
1520
|
+
"type": "string"
|
|
1521
|
+
},
|
|
1553
1522
|
"s-modal/modalStyle": {
|
|
1554
1523
|
"description": "弹窗自定义样式"
|
|
1555
1524
|
},
|
|
1556
1525
|
"s-modal/maskStyle": {
|
|
1557
1526
|
"description": "弹窗遮罩自定义样式"
|
|
1558
1527
|
},
|
|
1528
|
+
"s-modal/bodyStyle": {
|
|
1529
|
+
"description": "弹窗内容自定义样式"
|
|
1530
|
+
},
|
|
1559
1531
|
"s-modal/center": {
|
|
1560
1532
|
"description": "是否居中显示弹窗",
|
|
1561
1533
|
"type": "boolean"
|
|
@@ -568,18 +568,6 @@
|
|
|
568
568
|
"disabled"
|
|
569
569
|
]
|
|
570
570
|
},
|
|
571
|
-
"s-list": {
|
|
572
|
-
"attributes": [
|
|
573
|
-
"dragStart",
|
|
574
|
-
"dragEnd",
|
|
575
|
-
"modelValue",
|
|
576
|
-
"data",
|
|
577
|
-
"hover",
|
|
578
|
-
"selectable",
|
|
579
|
-
"selectKey",
|
|
580
|
-
"border"
|
|
581
|
-
]
|
|
582
|
-
},
|
|
583
571
|
"s-menu": {
|
|
584
572
|
"attributes": [
|
|
585
573
|
"itemClick",
|
|
@@ -654,17 +642,17 @@
|
|
|
654
642
|
"destroyOnClose",
|
|
655
643
|
"closeOnEsc",
|
|
656
644
|
"content",
|
|
657
|
-
"contentStyle",
|
|
658
645
|
"renderToBody",
|
|
659
|
-
"className",
|
|
660
646
|
"btnReverse",
|
|
661
647
|
"header",
|
|
662
648
|
"footer",
|
|
663
649
|
"mask",
|
|
664
650
|
"to",
|
|
665
651
|
"draggable",
|
|
652
|
+
"className",
|
|
666
653
|
"modalStyle",
|
|
667
654
|
"maskStyle",
|
|
655
|
+
"bodyStyle",
|
|
668
656
|
"center",
|
|
669
657
|
"offset",
|
|
670
658
|
"scrollContent",
|
package/dist/json/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "savor-ui",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.8.0",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -3450,75 +3450,6 @@
|
|
|
3450
3450
|
}
|
|
3451
3451
|
]
|
|
3452
3452
|
},
|
|
3453
|
-
{
|
|
3454
|
-
"name": "s-list",
|
|
3455
|
-
"attributes": [
|
|
3456
|
-
{
|
|
3457
|
-
"name": "modelValue",
|
|
3458
|
-
"description": "选中项(v-model)",
|
|
3459
|
-
"value": {
|
|
3460
|
-
"type": "any",
|
|
3461
|
-
"kind": "expression"
|
|
3462
|
-
}
|
|
3463
|
-
},
|
|
3464
|
-
{
|
|
3465
|
-
"name": "data",
|
|
3466
|
-
"description": "列表项数据",
|
|
3467
|
-
"value": {
|
|
3468
|
-
"type": "any[]",
|
|
3469
|
-
"kind": "expression"
|
|
3470
|
-
}
|
|
3471
|
-
},
|
|
3472
|
-
{
|
|
3473
|
-
"name": "hover",
|
|
3474
|
-
"description": "是否显示悬停状态",
|
|
3475
|
-
"value": {
|
|
3476
|
-
"type": "boolean",
|
|
3477
|
-
"kind": "expression"
|
|
3478
|
-
}
|
|
3479
|
-
},
|
|
3480
|
-
{
|
|
3481
|
-
"name": "selectable",
|
|
3482
|
-
"description": "是否可选择",
|
|
3483
|
-
"value": {
|
|
3484
|
-
"type": "boolean",
|
|
3485
|
-
"kind": "expression"
|
|
3486
|
-
}
|
|
3487
|
-
},
|
|
3488
|
-
{
|
|
3489
|
-
"name": "selectKey",
|
|
3490
|
-
"description": "选中项键名",
|
|
3491
|
-
"value": {
|
|
3492
|
-
"type": "string",
|
|
3493
|
-
"kind": "expression"
|
|
3494
|
-
}
|
|
3495
|
-
},
|
|
3496
|
-
{
|
|
3497
|
-
"name": "border",
|
|
3498
|
-
"description": "是否显示边框",
|
|
3499
|
-
"value": {
|
|
3500
|
-
"type": "boolean",
|
|
3501
|
-
"kind": "expression"
|
|
3502
|
-
}
|
|
3503
|
-
}
|
|
3504
|
-
],
|
|
3505
|
-
"events": [
|
|
3506
|
-
{
|
|
3507
|
-
"name": "dragStart",
|
|
3508
|
-
"description": "—"
|
|
3509
|
-
},
|
|
3510
|
-
{
|
|
3511
|
-
"name": "dragEnd",
|
|
3512
|
-
"description": "—"
|
|
3513
|
-
}
|
|
3514
|
-
],
|
|
3515
|
-
"slots": [
|
|
3516
|
-
{
|
|
3517
|
-
"name": "default",
|
|
3518
|
-
"description": "自定义列表项内容"
|
|
3519
|
-
}
|
|
3520
|
-
]
|
|
3521
|
-
},
|
|
3522
3453
|
{
|
|
3523
3454
|
"name": "s-menu",
|
|
3524
3455
|
"attributes": [
|
|
@@ -3969,14 +3900,6 @@
|
|
|
3969
3900
|
"kind": "expression"
|
|
3970
3901
|
}
|
|
3971
3902
|
},
|
|
3972
|
-
{
|
|
3973
|
-
"name": "contentStyle",
|
|
3974
|
-
"description": "弹窗内容自定义样式",
|
|
3975
|
-
"value": {
|
|
3976
|
-
"type": "Record<string, string>",
|
|
3977
|
-
"kind": "expression"
|
|
3978
|
-
}
|
|
3979
|
-
},
|
|
3980
3903
|
{
|
|
3981
3904
|
"name": "renderToBody",
|
|
3982
3905
|
"description": "是否渲染到 body 元素",
|
|
@@ -3985,14 +3908,6 @@
|
|
|
3985
3908
|
"kind": "expression"
|
|
3986
3909
|
}
|
|
3987
3910
|
},
|
|
3988
|
-
{
|
|
3989
|
-
"name": "className",
|
|
3990
|
-
"description": "弹窗自定义类名",
|
|
3991
|
-
"value": {
|
|
3992
|
-
"type": "string",
|
|
3993
|
-
"kind": "expression"
|
|
3994
|
-
}
|
|
3995
|
-
},
|
|
3996
3911
|
{
|
|
3997
3912
|
"name": "btnReverse",
|
|
3998
3913
|
"description": "是否反转按钮顺序",
|
|
@@ -4041,6 +3956,14 @@
|
|
|
4041
3956
|
"kind": "expression"
|
|
4042
3957
|
}
|
|
4043
3958
|
},
|
|
3959
|
+
{
|
|
3960
|
+
"name": "className",
|
|
3961
|
+
"description": "弹窗自定义类名",
|
|
3962
|
+
"value": {
|
|
3963
|
+
"type": "string",
|
|
3964
|
+
"kind": "expression"
|
|
3965
|
+
}
|
|
3966
|
+
},
|
|
4044
3967
|
{
|
|
4045
3968
|
"name": "modalStyle",
|
|
4046
3969
|
"description": "弹窗自定义样式",
|
|
@@ -4057,6 +3980,14 @@
|
|
|
4057
3980
|
"kind": "expression"
|
|
4058
3981
|
}
|
|
4059
3982
|
},
|
|
3983
|
+
{
|
|
3984
|
+
"name": "bodyStyle",
|
|
3985
|
+
"description": "弹窗内容自定义样式",
|
|
3986
|
+
"value": {
|
|
3987
|
+
"type": "Record<string, string>",
|
|
3988
|
+
"kind": "expression"
|
|
3989
|
+
}
|
|
3990
|
+
},
|
|
4060
3991
|
{
|
|
4061
3992
|
"name": "center",
|
|
4062
3993
|
"description": "是否居中显示弹窗",
|