@gx-design-vue/pro-layout-components 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/AppsLogoComponents/AppLogoList.d.ts +24 -0
- package/dist/AppsLogoComponents/AppLogoList.js +43 -0
- package/dist/AppsLogoComponents/AppsLogo.d.ts +10 -0
- package/dist/AppsLogoComponents/AppsLogo.js +12 -0
- package/dist/AppsLogoComponents/DefaultContent.d.ts +27 -0
- package/dist/AppsLogoComponents/DefaultContent.js +43 -0
- package/dist/AppsLogoComponents/SimpleContent.d.ts +38 -0
- package/dist/AppsLogoComponents/SimpleContent.js +63 -0
- package/dist/AppsLogoComponents/index.d.ts +32 -0
- package/dist/AppsLogoComponents/index.js +71 -0
- package/dist/AppsLogoComponents/props.d.ts +26 -0
- package/dist/AppsLogoComponents/props.js +12 -0
- package/dist/AppsLogoComponents/style/default.d.ts +6 -0
- package/dist/AppsLogoComponents/style/default.js +70 -0
- package/dist/AppsLogoComponents/style/index.d.ts +7 -0
- package/dist/AppsLogoComponents/style/index.js +60 -0
- package/dist/AppsLogoComponents/style/simple.d.ts +6 -0
- package/dist/AppsLogoComponents/style/simple.js +83 -0
- package/dist/Icon/components/Paintbrush.d.ts +6 -0
- package/dist/Icon/components/Paintbrush.js +21 -0
- package/dist/Icon/components/Palette.d.ts +6 -0
- package/dist/Icon/components/Palette.js +20 -0
- package/dist/Icon/components/index.d.ts +10 -0
- package/dist/Icon/components/index.js +11 -0
- package/dist/Icon/index.d.ts +37 -0
- package/dist/Icon/index.js +24 -0
- package/dist/PageLock/Popup.d.ts +43 -0
- package/dist/PageLock/Popup.js +68 -0
- package/dist/PageLock/UserForm.d.ts +42 -0
- package/dist/PageLock/UserForm.js +68 -0
- package/dist/PageLock/index.d.ts +52 -0
- package/dist/PageLock/index.js +92 -0
- package/dist/PageLock/props.d.ts +51 -0
- package/dist/PageLock/props.js +29 -0
- package/dist/PageLock/style.d.ts +7 -0
- package/dist/PageLock/style.js +108 -0
- package/dist/PageLock/useFormState.d.ts +16 -0
- package/dist/PageLock/useFormState.js +19 -0
- package/dist/Paintbrush-EfUpNqey.js +14 -0
- package/dist/Palette-B5wq9KtV.js +13 -0
- package/dist/RightContent/Search/Panel.d.ts +42 -0
- package/dist/RightContent/Search/Panel.js +146 -0
- package/dist/RightContent/Search/index.d.ts +50 -0
- package/dist/RightContent/Search/index.js +118 -0
- package/dist/RightContent/Search/props.d.ts +17 -0
- package/dist/RightContent/Search/props.js +15 -0
- package/dist/RightContent/Search/style.d.ts +10 -0
- package/dist/RightContent/Search/style.js +96 -0
- package/dist/RightContent/index.d.ts +407 -0
- package/dist/RightContent/index.js +152 -0
- package/dist/RightContent/props.d.ts +64 -0
- package/dist/RightContent/props.js +63 -0
- package/dist/RightContent/style.d.ts +10 -0
- package/dist/RightContent/style.js +73 -0
- package/dist/ThemeEditor/components/BlockCheckbox.d.ts +39 -0
- package/dist/ThemeEditor/components/BlockCheckbox.js +42 -0
- package/dist/ThemeEditor/components/RegionalChange.d.ts +21 -0
- package/dist/ThemeEditor/components/RegionalChange.js +43 -0
- package/dist/ThemeEditor/components/Setting/index.d.ts +52 -0
- package/dist/ThemeEditor/components/Setting/index.js +125 -0
- package/dist/ThemeEditor/components/SwitchTab/index.d.ts +51 -0
- package/dist/ThemeEditor/components/SwitchTab/index.js +52 -0
- package/dist/ThemeEditor/components/SwitchTab/style.d.ts +6 -0
- package/dist/ThemeEditor/components/SwitchTab/style.js +54 -0
- package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.d.ts +7 -0
- package/dist/ThemeEditor/components/Tokens/Colors/ColorSvg.js +453 -0
- package/dist/ThemeEditor/components/Tokens/Colors/Primary.d.ts +7 -0
- package/dist/ThemeEditor/components/Tokens/Colors/Primary.js +58 -0
- package/dist/ThemeEditor/components/Tokens/Colors/Side.d.ts +7 -0
- package/dist/ThemeEditor/components/Tokens/Colors/Side.js +18 -0
- package/dist/ThemeEditor/components/Tokens/Colors/index.d.ts +7 -0
- package/dist/ThemeEditor/components/Tokens/Colors/index.js +15 -0
- package/dist/ThemeEditor/components/Tokens/context.d.ts +9 -0
- package/dist/ThemeEditor/components/Tokens/context.js +7 -0
- package/dist/ThemeEditor/components/Tokens/index.d.ts +45 -0
- package/dist/ThemeEditor/components/Tokens/index.js +69 -0
- package/dist/ThemeEditor/components/Tokens/utils/config.d.ts +10 -0
- package/dist/ThemeEditor/components/Tokens/utils/config.js +8 -0
- package/dist/ThemeEditor/components/Trigger.d.ts +21 -0
- package/dist/ThemeEditor/components/Trigger.js +46 -0
- package/dist/ThemeEditor/context.d.ts +14 -0
- package/dist/ThemeEditor/context.js +7 -0
- package/dist/ThemeEditor/index.d.ts +841 -0
- package/dist/ThemeEditor/index.js +165 -0
- package/dist/ThemeEditor/props.d.ts +57 -0
- package/dist/ThemeEditor/props.js +40 -0
- package/dist/ThemeEditor/style/animate.d.ts +9 -0
- package/dist/ThemeEditor/style/animate.js +38 -0
- package/dist/ThemeEditor/style/index.d.ts +10 -0
- package/dist/ThemeEditor/style/index.js +318 -0
- package/dist/ThemeEditor/style/theme.d.ts +6 -0
- package/dist/ThemeEditor/style/theme.js +71 -0
- package/dist/ThemeEditor/utils/config.d.ts +37 -0
- package/dist/ThemeEditor/utils/config.js +132 -0
- package/dist/ThemeEditor/utils/index.d.ts +9 -0
- package/dist/ThemeEditor/utils/index.js +64 -0
- package/dist/hooks/useClockTime/index.d.ts +11 -0
- package/dist/hooks/useClockTime/index.js +28 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +5 -0
- package/dist/pro-layout-components.esm.js +6258 -0
- package/dist/pro-layout-components.js +5 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/util.d.ts +10 -0
- package/dist/utils/util.js +17 -0
- package/global.d.ts +10 -0
- package/package.json +77 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ShortcutKeyProps } from "../PageLock/props.js";
|
|
2
|
+
import { ExtractPropTypes, PropType } from "vue";
|
|
3
|
+
import { CustomRender, WithFalse } from "@gx-design-vue/pro-utils";
|
|
4
|
+
import { DropdownProps } from "ant-design-vue";
|
|
5
|
+
import * as _gx_design_vue_pro_layout2 from "@gx-design-vue/pro-layout";
|
|
6
|
+
|
|
7
|
+
//#region src/RightContent/props.d.ts
|
|
8
|
+
type DropdownProps$1 = Omit<DropdownProps, 'placement' | 'overlay'>;
|
|
9
|
+
interface RightContentActions {
|
|
10
|
+
lock?: boolean;
|
|
11
|
+
theme?: boolean;
|
|
12
|
+
search?: boolean;
|
|
13
|
+
themeEditor?: boolean;
|
|
14
|
+
fullScreen?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare function getRightContentProps(): {
|
|
17
|
+
actions: {
|
|
18
|
+
type: PropType<RightContentActions | false>;
|
|
19
|
+
default: () => {};
|
|
20
|
+
};
|
|
21
|
+
shortsKey: {
|
|
22
|
+
type: PropType<ShortcutKeyProps["search"]>;
|
|
23
|
+
default: () => ShortcutKeyProps["search"];
|
|
24
|
+
};
|
|
25
|
+
name: {
|
|
26
|
+
type: PropType<string>;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
avatar: PropType<string>;
|
|
30
|
+
actionsRender: {
|
|
31
|
+
type: PropType<WithFalse<(classNames: string[]) => CustomRender>>;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
dropdownProps: {
|
|
35
|
+
type: PropType<DropdownProps$1>;
|
|
36
|
+
default: () => {};
|
|
37
|
+
};
|
|
38
|
+
dropdownRender: {
|
|
39
|
+
type: PropType<WithFalse<CustomRender>>;
|
|
40
|
+
default: any;
|
|
41
|
+
};
|
|
42
|
+
dropdownMenuRender: {
|
|
43
|
+
type: PropType<WithFalse<CustomRender>>;
|
|
44
|
+
default: any;
|
|
45
|
+
};
|
|
46
|
+
dropdownMenuExtraItemRender: {
|
|
47
|
+
type: PropType<WithFalse<CustomRender>>;
|
|
48
|
+
default: any;
|
|
49
|
+
};
|
|
50
|
+
onLogout: PropType<(callback?: () => void) => void>;
|
|
51
|
+
onClick: PropType<(type: keyof RightContentActions) => void>;
|
|
52
|
+
dataSource: {
|
|
53
|
+
type: PropType<_gx_design_vue_pro_layout2.AppRouteModule[]>;
|
|
54
|
+
default: () => any[];
|
|
55
|
+
};
|
|
56
|
+
historyKey: PropType<string>;
|
|
57
|
+
emptyProps: {
|
|
58
|
+
type: PropType<any>;
|
|
59
|
+
default: () => {};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
type RightContentProps = Partial<ExtractPropTypes<ReturnType<typeof getRightContentProps>>>;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { RightContentActions, RightContentProps, getRightContentProps };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { commonProps } from "./Search/props.js";
|
|
2
|
+
|
|
3
|
+
//#region src/RightContent/props.ts
|
|
4
|
+
function getRightContentProps() {
|
|
5
|
+
return {
|
|
6
|
+
...commonProps,
|
|
7
|
+
actions: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => ({})
|
|
10
|
+
},
|
|
11
|
+
shortsKey: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => ({ disabled: false })
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: [String],
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
avatar: String,
|
|
20
|
+
actionsRender: {
|
|
21
|
+
type: [
|
|
22
|
+
Array,
|
|
23
|
+
Function,
|
|
24
|
+
Object
|
|
25
|
+
],
|
|
26
|
+
default: void 0
|
|
27
|
+
},
|
|
28
|
+
dropdownProps: {
|
|
29
|
+
type: [Object],
|
|
30
|
+
default: () => ({})
|
|
31
|
+
},
|
|
32
|
+
dropdownRender: {
|
|
33
|
+
type: [
|
|
34
|
+
Array,
|
|
35
|
+
Function,
|
|
36
|
+
Object
|
|
37
|
+
],
|
|
38
|
+
default: void 0
|
|
39
|
+
},
|
|
40
|
+
dropdownMenuRender: {
|
|
41
|
+
type: [
|
|
42
|
+
Array,
|
|
43
|
+
Function,
|
|
44
|
+
Object
|
|
45
|
+
],
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
dropdownMenuExtraItemRender: {
|
|
49
|
+
type: [
|
|
50
|
+
Array,
|
|
51
|
+
Function,
|
|
52
|
+
Object,
|
|
53
|
+
Boolean
|
|
54
|
+
],
|
|
55
|
+
default: void 0
|
|
56
|
+
},
|
|
57
|
+
onLogout: Function,
|
|
58
|
+
onClick: Function
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { getRightContentProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as vue244 from "vue";
|
|
2
|
+
import * as ant_design_vue_es__util_type22 from "ant-design-vue/es/_util/type";
|
|
3
|
+
|
|
4
|
+
//#region src/RightContent/style.d.ts
|
|
5
|
+
declare function useStyle(componentCls: string): {
|
|
6
|
+
wrapSSR: (node: ant_design_vue_es__util_type22.VueNode) => ant_design_vue_es__util_type22.VueNode;
|
|
7
|
+
hashId: vue244.ComputedRef<string>;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useStyle };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { setAlpha, unit, useStyle as useStyle$1 } from "@gx-design-vue/pro-provider";
|
|
2
|
+
|
|
3
|
+
//#region src/RightContent/style.ts
|
|
4
|
+
const genStyle = (token) => {
|
|
5
|
+
return { [`${token.componentCls}`]: { "&-header-actions": {
|
|
6
|
+
display: "flex",
|
|
7
|
+
alignItems: "center",
|
|
8
|
+
justifyContent: "flex-end",
|
|
9
|
+
height: "100%",
|
|
10
|
+
gap: token.paddingXS,
|
|
11
|
+
"&-item": {
|
|
12
|
+
display: "inline-flex",
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
paddingBlock: 0,
|
|
16
|
+
paddingInline: 2,
|
|
17
|
+
color: token.layout?.header?.colorTextRightActionsItem,
|
|
18
|
+
fontSize: 14,
|
|
19
|
+
cursor: "pointer",
|
|
20
|
+
borderRadius: token.borderRadius,
|
|
21
|
+
[`.anticon`]: {
|
|
22
|
+
color: token.layout?.header?.colorTextRightActionsItem,
|
|
23
|
+
transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
|
|
24
|
+
"&:hover": { color: token.layout?.header?.colorTextRightActionsItemHover }
|
|
25
|
+
},
|
|
26
|
+
[`&${token.componentCls}-header-actions-theme`]: { [`${token.componentCls}-header-actions-icon`]: {
|
|
27
|
+
paddingInline: 4,
|
|
28
|
+
paddingBlock: 4,
|
|
29
|
+
fontSize: 18
|
|
30
|
+
} },
|
|
31
|
+
"> *": {
|
|
32
|
+
paddingInline: 6,
|
|
33
|
+
paddingBlock: 6,
|
|
34
|
+
borderRadius: token.borderRadius,
|
|
35
|
+
transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
|
|
36
|
+
"&:hover": {
|
|
37
|
+
color: token.layout?.header?.colorTextRightActionsItemHover,
|
|
38
|
+
backgroundColor: token.layout?.header?.colorBgRightActionsItemHover
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
[`&>${token.antCls}-dropdown-trigger`]: {
|
|
43
|
+
color: token.colorTextTertiary,
|
|
44
|
+
paddingInline: 8,
|
|
45
|
+
paddingBlock: 8,
|
|
46
|
+
cursor: "pointer",
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
height: 44,
|
|
50
|
+
lineHeight: unit(44),
|
|
51
|
+
borderRadius: token.borderRadius,
|
|
52
|
+
"&:hover": { backgroundColor: setAlpha(token.colorTextBase, .03) }
|
|
53
|
+
},
|
|
54
|
+
"&-avatar": {
|
|
55
|
+
display: "inline-flex",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
justifyContent: "center",
|
|
58
|
+
gap: token.paddingXS,
|
|
59
|
+
paddingInlineStart: token.padding,
|
|
60
|
+
paddingInlineEnd: token.padding,
|
|
61
|
+
cursor: "pointer",
|
|
62
|
+
color: token.layout?.header?.colorTextRightActionsItem
|
|
63
|
+
}
|
|
64
|
+
} } };
|
|
65
|
+
};
|
|
66
|
+
function useStyle(componentCls) {
|
|
67
|
+
return useStyle$1("RightContent", (token) => {
|
|
68
|
+
return [genStyle(token)];
|
|
69
|
+
}, componentCls);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
export { useStyle };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as vue48 from "vue";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import { CustomRender } from "@gx-design-vue/pro-utils";
|
|
4
|
+
import * as vue_jsx_runtime2 from "vue/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/ThemeEditor/components/BlockCheckbox.d.ts
|
|
7
|
+
declare const _default: vue48.DefineComponent<vue48.ExtractPropTypes<{
|
|
8
|
+
value: PropType<string>;
|
|
9
|
+
list: {
|
|
10
|
+
type: PropType<{
|
|
11
|
+
title: string;
|
|
12
|
+
key: string;
|
|
13
|
+
icon?: CustomRender;
|
|
14
|
+
}[]>;
|
|
15
|
+
default: () => any[];
|
|
16
|
+
};
|
|
17
|
+
configType: PropType<"menuTheme" | "layout">;
|
|
18
|
+
onChange: PropType<(value: any, event: MouseEvent) => void>;
|
|
19
|
+
}>, () => vue_jsx_runtime2.JSX.Element, {}, {}, {}, vue48.ComponentOptionsMixin, vue48.ComponentOptionsMixin, {}, string, vue48.PublicProps, Readonly<vue48.ExtractPropTypes<{
|
|
20
|
+
value: PropType<string>;
|
|
21
|
+
list: {
|
|
22
|
+
type: PropType<{
|
|
23
|
+
title: string;
|
|
24
|
+
key: string;
|
|
25
|
+
icon?: CustomRender;
|
|
26
|
+
}[]>;
|
|
27
|
+
default: () => any[];
|
|
28
|
+
};
|
|
29
|
+
configType: PropType<"menuTheme" | "layout">;
|
|
30
|
+
onChange: PropType<(value: any, event: MouseEvent) => void>;
|
|
31
|
+
}>> & Readonly<{}>, {
|
|
32
|
+
list: {
|
|
33
|
+
title: string;
|
|
34
|
+
key: string;
|
|
35
|
+
icon?: CustomRender;
|
|
36
|
+
}[];
|
|
37
|
+
}, {}, {}, {}, string, vue48.ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { _default as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useThemeEditorContext } from "../context.js";
|
|
2
|
+
import { createVNode, defineComponent } from "vue";
|
|
3
|
+
import { classNames } from "@gx-design-vue/pro-utils";
|
|
4
|
+
import { Tooltip } from "ant-design-vue";
|
|
5
|
+
import { CheckOutlined } from "@ant-design/icons-vue";
|
|
6
|
+
|
|
7
|
+
//#region src/ThemeEditor/components/BlockCheckbox.tsx
|
|
8
|
+
var BlockCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
9
|
+
name: "BlockCheckbox",
|
|
10
|
+
props: {
|
|
11
|
+
value: String,
|
|
12
|
+
list: {
|
|
13
|
+
type: Array,
|
|
14
|
+
default: () => []
|
|
15
|
+
},
|
|
16
|
+
configType: String,
|
|
17
|
+
onChange: Function
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const { hashId, prefixCls } = useThemeEditorContext();
|
|
21
|
+
return () => {
|
|
22
|
+
const baseClassName = `${prefixCls}-block-checkbox`;
|
|
23
|
+
return createVNode("div", { "class": [baseClassName, hashId.value] }, [props.list.map((item) => createVNode(Tooltip, {
|
|
24
|
+
"title": item.title,
|
|
25
|
+
"key": item.key
|
|
26
|
+
}, { default: () => [createVNode("div", {
|
|
27
|
+
"class": classNames(hashId.value, `${baseClassName}-item`, `${baseClassName}-item-${item.key}`, `${baseClassName}-${props.configType}-item`),
|
|
28
|
+
"onClick": (e) => props.onChange?.(item.key, e)
|
|
29
|
+
}, [
|
|
30
|
+
item.key === "wide" && createVNode("div", { "class": [`${baseClassName}-item-${item.key}-content`, hashId.value] }, null),
|
|
31
|
+
createVNode(CheckOutlined, {
|
|
32
|
+
"class": `${baseClassName}-selectIcon ${hashId.value}`.trim(),
|
|
33
|
+
"style": { display: props.value === item.key ? "block" : "none" }
|
|
34
|
+
}, null),
|
|
35
|
+
item?.icon ? createVNode("div", { "class": `${baseClassName}-icon ${hashId.value}`.trim() }, [item.icon]) : null
|
|
36
|
+
])] }))]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
export { BlockCheckbox_default as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SettingsState } from "../utils/config.js";
|
|
2
|
+
import * as vue166 from "vue";
|
|
3
|
+
import { PropType } from "vue";
|
|
4
|
+
import * as vue_jsx_runtime4 from "vue/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/ThemeEditor/components/RegionalChange.d.ts
|
|
7
|
+
declare const _default: vue166.DefineComponent<vue166.ExtractPropTypes<{
|
|
8
|
+
label: PropType<string>;
|
|
9
|
+
value: PropType<boolean>;
|
|
10
|
+
valueKey: PropType<keyof SettingsState>;
|
|
11
|
+
disabled: PropType<boolean>;
|
|
12
|
+
onChange: PropType<(key: keyof SettingsState, value: boolean) => void>;
|
|
13
|
+
}>, () => vue_jsx_runtime4.JSX.Element, {}, {}, {}, vue166.ComponentOptionsMixin, vue166.ComponentOptionsMixin, {}, string, vue166.PublicProps, Readonly<vue166.ExtractPropTypes<{
|
|
14
|
+
label: PropType<string>;
|
|
15
|
+
value: PropType<boolean>;
|
|
16
|
+
valueKey: PropType<keyof SettingsState>;
|
|
17
|
+
disabled: PropType<boolean>;
|
|
18
|
+
onChange: PropType<(key: keyof SettingsState, value: boolean) => void>;
|
|
19
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, vue166.ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { _default as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useThemeEditorContext } from "../context.js";
|
|
2
|
+
import { createVNode, defineComponent } from "vue";
|
|
3
|
+
import { List, Switch, Tooltip } from "ant-design-vue";
|
|
4
|
+
|
|
5
|
+
//#region src/ThemeEditor/components/RegionalChange.tsx
|
|
6
|
+
var RegionalChange_default = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "RegionalChange",
|
|
8
|
+
props: {
|
|
9
|
+
label: String,
|
|
10
|
+
value: Boolean,
|
|
11
|
+
valueKey: String,
|
|
12
|
+
disabled: Boolean,
|
|
13
|
+
onChange: Function
|
|
14
|
+
},
|
|
15
|
+
setup(props) {
|
|
16
|
+
const { hashId, prefixCls } = useThemeEditorContext();
|
|
17
|
+
return () => {
|
|
18
|
+
return createVNode(List, {
|
|
19
|
+
"class": `${prefixCls}-list ${hashId.value}`.trim(),
|
|
20
|
+
"split": false,
|
|
21
|
+
"size": "small",
|
|
22
|
+
"renderItem": ({ item }) => createVNode(Tooltip, {
|
|
23
|
+
"title": item.disabled ? item.disabledReason : "",
|
|
24
|
+
"placement": "left"
|
|
25
|
+
}, { default: () => [createVNode(List.Item, { "actions": [item.action] }, { default: () => [createVNode("span", { "style": { opacity: item.disabled ? .5 : 1 } }, [item.title])] })] }),
|
|
26
|
+
"dataSource": [{
|
|
27
|
+
title: props.label,
|
|
28
|
+
action: createVNode(Switch, {
|
|
29
|
+
"size": "small",
|
|
30
|
+
"disabled": props.disabled,
|
|
31
|
+
"checked": !!props.value,
|
|
32
|
+
"onChange": (checked) => {
|
|
33
|
+
props.onChange && props.onChange(props.valueKey, checked);
|
|
34
|
+
}
|
|
35
|
+
}, null)
|
|
36
|
+
}]
|
|
37
|
+
}, null);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
//#endregion
|
|
43
|
+
export { RegionalChange_default as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { LayoutConfig } from "../../props.js";
|
|
2
|
+
import * as vue278 from "vue";
|
|
3
|
+
import { PropType } from "vue";
|
|
4
|
+
import { ThemeValue } from "@gx-design-vue/context";
|
|
5
|
+
import * as vue_jsx_runtime13 from "vue/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/ThemeEditor/components/Setting/index.d.ts
|
|
8
|
+
declare const _default: vue278.DefineComponent<vue278.ExtractPropTypes<{
|
|
9
|
+
theme: PropType<ThemeValue>;
|
|
10
|
+
onChange: PropType<(value: Partial<LayoutConfig>) => void>;
|
|
11
|
+
onChangeColorScheme: PropType<(value: ThemeValue) => void>;
|
|
12
|
+
copyButton: {
|
|
13
|
+
type: PropType<boolean>;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
width: PropType<number>;
|
|
17
|
+
isEqual: PropType<boolean>;
|
|
18
|
+
open: {
|
|
19
|
+
type: PropType<boolean>;
|
|
20
|
+
default: any;
|
|
21
|
+
};
|
|
22
|
+
onSync: PropType<() => void>;
|
|
23
|
+
onOpenChange: {
|
|
24
|
+
type: PropType<(val: boolean | undefined) => void>;
|
|
25
|
+
default: any;
|
|
26
|
+
};
|
|
27
|
+
}>, () => vue_jsx_runtime13.JSX.Element, {}, {}, {}, vue278.ComponentOptionsMixin, vue278.ComponentOptionsMixin, {}, string, vue278.PublicProps, Readonly<vue278.ExtractPropTypes<{
|
|
28
|
+
theme: PropType<ThemeValue>;
|
|
29
|
+
onChange: PropType<(value: Partial<LayoutConfig>) => void>;
|
|
30
|
+
onChangeColorScheme: PropType<(value: ThemeValue) => void>;
|
|
31
|
+
copyButton: {
|
|
32
|
+
type: PropType<boolean>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
width: PropType<number>;
|
|
36
|
+
isEqual: PropType<boolean>;
|
|
37
|
+
open: {
|
|
38
|
+
type: PropType<boolean>;
|
|
39
|
+
default: any;
|
|
40
|
+
};
|
|
41
|
+
onSync: PropType<() => void>;
|
|
42
|
+
onOpenChange: {
|
|
43
|
+
type: PropType<(val: boolean | undefined) => void>;
|
|
44
|
+
default: any;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
open: boolean;
|
|
48
|
+
onOpenChange: (val: boolean | undefined) => void;
|
|
49
|
+
copyButton: boolean;
|
|
50
|
+
}, {}, {}, {}, string, vue278.ComponentProvideOptions, true, {}, any>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { _default as default };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import Icon_default from "../../../Icon/index.js";
|
|
2
|
+
import { layout, layoutLabelRadioList, othersLabelRadioList, systemTheme } from "../../utils/config.js";
|
|
3
|
+
import { useThemeEditorContext } from "../../context.js";
|
|
4
|
+
import props_default, { commonProps } from "../../props.js";
|
|
5
|
+
import { handleSettingsDisabled } from "../../utils/index.js";
|
|
6
|
+
import BlockCheckbox_default from "../BlockCheckbox.js";
|
|
7
|
+
import RegionalChange_default from "../RegionalChange.js";
|
|
8
|
+
import { Body } from "../../index.js";
|
|
9
|
+
import { computed, createTextVNode, createVNode, defineComponent, watch } from "vue";
|
|
10
|
+
import { classNames } from "@gx-design-vue/pro-utils";
|
|
11
|
+
import { Badge, Button, Divider, Drawer, Segmented, Tooltip, message } from "ant-design-vue";
|
|
12
|
+
import { ClearOutlined, CopyOutlined } from "@ant-design/icons-vue";
|
|
13
|
+
import { useClipboard } from "@vueuse/core";
|
|
14
|
+
import { pick } from "es-toolkit";
|
|
15
|
+
import { GScrollbars } from "@gx-design-vue/scrollbar";
|
|
16
|
+
|
|
17
|
+
//#region src/ThemeEditor/components/Setting/index.tsx
|
|
18
|
+
var Setting_default = /* @__PURE__ */ defineComponent({
|
|
19
|
+
props: {
|
|
20
|
+
...commonProps,
|
|
21
|
+
...pick(props_default, ["copyButton"]),
|
|
22
|
+
theme: [Boolean, String],
|
|
23
|
+
onChange: Function,
|
|
24
|
+
onChangeColorScheme: Function
|
|
25
|
+
},
|
|
26
|
+
setup(props) {
|
|
27
|
+
const { hashId, drawerClass, prefixCls, config } = useThemeEditorContext();
|
|
28
|
+
const { copy, copied, isSupported } = useClipboard();
|
|
29
|
+
const disabled = computed(() => {
|
|
30
|
+
return handleSettingsDisabled(config.value);
|
|
31
|
+
});
|
|
32
|
+
watch(copied, (val) => {
|
|
33
|
+
if (val) message.success("拷贝成功,请到 /src/store/modules/layout.ts 文件中替换 layoutConfig 默认配置");
|
|
34
|
+
});
|
|
35
|
+
const handleCopySettings = () => {
|
|
36
|
+
if (isSupported.value) copy(JSON.stringify(config.value));
|
|
37
|
+
};
|
|
38
|
+
return () => {
|
|
39
|
+
return createVNode(Drawer, {
|
|
40
|
+
"width": props.width,
|
|
41
|
+
"closable": false,
|
|
42
|
+
"placement": "right",
|
|
43
|
+
"open": props.open,
|
|
44
|
+
"bodyStyle": {
|
|
45
|
+
padding: 0,
|
|
46
|
+
overflow: "hidden"
|
|
47
|
+
},
|
|
48
|
+
"maskStyle": { background: "transparent" },
|
|
49
|
+
"onClose": () => props.onOpenChange?.(false)
|
|
50
|
+
}, { default: () => [createVNode("div", { "class": classNames([`${drawerClass}-wrapper`, hashId.value]) }, [createVNode(GScrollbars, null, { default: () => [createVNode("div", { "class": classNames([`${drawerClass}-content`, hashId.value]) }, [createVNode("div", { "class": classNames([`${prefixCls}-card`, hashId.value]) }, [createVNode("div", { "class": classNames(`${prefixCls}-card-header`, hashId.value) }, [createVNode("div", { "class": classNames(`${prefixCls}-card-header-title`, hashId.value) }, [createVNode("span", null, [createTextVNode("系统配置")]), createVNode(Tooltip, {
|
|
51
|
+
"title": !props.isEqual && "数据有变化,点击可进行重置",
|
|
52
|
+
"placement": "left"
|
|
53
|
+
}, { default: () => [createVNode(Badge, { "dot": !props.isEqual }, { default: () => [createVNode("div", {
|
|
54
|
+
"class": classNames(`${prefixCls}-card-header-action`, hashId.value),
|
|
55
|
+
"onClick": () => !props.isEqual && props.onSync?.()
|
|
56
|
+
}, [createVNode(Icon_default, { "type": "reload" }, null)])] })] })]), createVNode("div", { "class": classNames(`${prefixCls}-card-header-subtitle`, hashId.value) }, [config.value.title])]), createVNode("div", { "class": classNames(`${prefixCls}-card-content`, hashId.value) }, [
|
|
57
|
+
createVNode(Body, {
|
|
58
|
+
"prefixCls": `${prefixCls}`,
|
|
59
|
+
"hashId": hashId.value,
|
|
60
|
+
"title": "整体风格"
|
|
61
|
+
}, { default: () => [createVNode(Segmented, {
|
|
62
|
+
"value": props.theme,
|
|
63
|
+
"options": systemTheme,
|
|
64
|
+
"onChange": (value) => props.onChangeColorScheme?.(value)
|
|
65
|
+
}, null)] }),
|
|
66
|
+
createVNode(Divider, null, null),
|
|
67
|
+
createVNode(Body, {
|
|
68
|
+
"hashId": hashId.value,
|
|
69
|
+
"prefixCls": prefixCls,
|
|
70
|
+
"title": "导航模式"
|
|
71
|
+
}, { default: () => [createVNode(BlockCheckbox_default, {
|
|
72
|
+
"value": config.value.layout,
|
|
73
|
+
"key": "layout",
|
|
74
|
+
"configType": "layout",
|
|
75
|
+
"list": layout,
|
|
76
|
+
"onChange": (val) => props.onChange?.({ layout: val })
|
|
77
|
+
}, null)] }),
|
|
78
|
+
layoutLabelRadioList.map(({ label, title }) => createVNode(RegionalChange_default, {
|
|
79
|
+
"label": title,
|
|
80
|
+
"valueKey": label,
|
|
81
|
+
"value": config.value[label],
|
|
82
|
+
"disabled": disabled.value?.[label],
|
|
83
|
+
"onChange": (key, value) => props.onChange?.({ [key]: value })
|
|
84
|
+
}, null)),
|
|
85
|
+
createVNode(Divider, null, null),
|
|
86
|
+
createVNode(Body, {
|
|
87
|
+
"hashId": hashId.value,
|
|
88
|
+
"prefixCls": prefixCls,
|
|
89
|
+
"title": "其他设置"
|
|
90
|
+
}, { default: () => [
|
|
91
|
+
othersLabelRadioList.map(({ label, title }) => createVNode(RegionalChange_default, {
|
|
92
|
+
"label": title,
|
|
93
|
+
"valueKey": label,
|
|
94
|
+
"value": config.value[label],
|
|
95
|
+
"disabled": disabled.value[label],
|
|
96
|
+
"onChange": (key, value) => props.onChange?.({ [key]: value })
|
|
97
|
+
}, null)),
|
|
98
|
+
createVNode(RegionalChange_default, {
|
|
99
|
+
"label": "色弱模式",
|
|
100
|
+
"valueKey": "colorWeak",
|
|
101
|
+
"value": config.value?.colorWeak,
|
|
102
|
+
"onChange": (key, value) => props.onChange?.({ [key]: value })
|
|
103
|
+
}, null),
|
|
104
|
+
createVNode(RegionalChange_default, {
|
|
105
|
+
"label": "顶部进度条",
|
|
106
|
+
"valueKey": "progress",
|
|
107
|
+
"value": config.value?.progress,
|
|
108
|
+
"onChange": (key, value) => props.onChange?.({ [key]: value })
|
|
109
|
+
}, null)
|
|
110
|
+
] }),
|
|
111
|
+
props.copyButton && createVNode(Divider, null, null),
|
|
112
|
+
createVNode("div", { "style": {
|
|
113
|
+
display: "flex",
|
|
114
|
+
gap: "10px"
|
|
115
|
+
} }, [props.copyButton && createVNode(Button, {
|
|
116
|
+
"onClick": () => handleCopySettings(),
|
|
117
|
+
"block": true
|
|
118
|
+
}, { default: () => [createVNode(CopyOutlined, null, null), createTextVNode("拷贝设置")] }), createVNode(Button, { "block": true }, { default: () => [createVNode(ClearOutlined, null, null), createTextVNode("清空缓存")] })])
|
|
119
|
+
])])])] })])] });
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
export { Setting_default as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as vue173 from "vue";
|
|
2
|
+
import { PropType } from "vue";
|
|
3
|
+
import * as ant_design_vue_es__util_type20 from "ant-design-vue/es/_util/type";
|
|
4
|
+
|
|
5
|
+
//#region src/ThemeEditor/components/SwitchTab/index.d.ts
|
|
6
|
+
interface SwitchTabItem {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: vue173.DefineComponent<vue173.ExtractPropTypes<{
|
|
11
|
+
activeKey: {
|
|
12
|
+
type: PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
dataSource: {
|
|
16
|
+
type: PropType<SwitchTabItem[]>;
|
|
17
|
+
default: () => any[];
|
|
18
|
+
};
|
|
19
|
+
renderItem: {
|
|
20
|
+
type: PropType<(item: any) => any>;
|
|
21
|
+
};
|
|
22
|
+
renderContent: {
|
|
23
|
+
type: PropType<(item: any) => any>;
|
|
24
|
+
};
|
|
25
|
+
onChange: {
|
|
26
|
+
type: PropType<(val: any) => void>;
|
|
27
|
+
};
|
|
28
|
+
}>, () => ant_design_vue_es__util_type20.VueNode, {}, {}, {}, vue173.ComponentOptionsMixin, vue173.ComponentOptionsMixin, {}, string, vue173.PublicProps, Readonly<vue173.ExtractPropTypes<{
|
|
29
|
+
activeKey: {
|
|
30
|
+
type: PropType<string>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
dataSource: {
|
|
34
|
+
type: PropType<SwitchTabItem[]>;
|
|
35
|
+
default: () => any[];
|
|
36
|
+
};
|
|
37
|
+
renderItem: {
|
|
38
|
+
type: PropType<(item: any) => any>;
|
|
39
|
+
};
|
|
40
|
+
renderContent: {
|
|
41
|
+
type: PropType<(item: any) => any>;
|
|
42
|
+
};
|
|
43
|
+
onChange: {
|
|
44
|
+
type: PropType<(val: any) => void>;
|
|
45
|
+
};
|
|
46
|
+
}>> & Readonly<{}>, {
|
|
47
|
+
activeKey: string;
|
|
48
|
+
dataSource: SwitchTabItem[];
|
|
49
|
+
}, {}, {}, {}, string, vue173.ComponentProvideOptions, true, {}, any>;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { SwitchTabItem, _default as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { switchTabStyleToken } from "./style.js";
|
|
2
|
+
import { createVNode, defineComponent, ref, watch } from "vue";
|
|
3
|
+
import { useProStyle } from "@gx-design-vue/pro-provider";
|
|
4
|
+
import { classNames, getPrefixCls } from "@gx-design-vue/pro-utils";
|
|
5
|
+
import { GScrollbars } from "@gx-design-vue/scrollbar";
|
|
6
|
+
|
|
7
|
+
//#region src/ThemeEditor/components/SwitchTab/index.tsx
|
|
8
|
+
var SwitchTab_default = /* @__PURE__ */ defineComponent({
|
|
9
|
+
props: {
|
|
10
|
+
activeKey: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ""
|
|
13
|
+
},
|
|
14
|
+
dataSource: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
renderItem: { type: Function },
|
|
19
|
+
renderContent: { type: Function },
|
|
20
|
+
onChange: { type: Function }
|
|
21
|
+
},
|
|
22
|
+
setup(props) {
|
|
23
|
+
const baseClassName = getPrefixCls({
|
|
24
|
+
suffixCls: "switch-tab",
|
|
25
|
+
isPor: true
|
|
26
|
+
});
|
|
27
|
+
const { wrapSSR, hashId } = useProStyle("SwitchTab", [switchTabStyleToken], baseClassName);
|
|
28
|
+
const activeKey = ref(props.activeKey);
|
|
29
|
+
watch(() => props.activeKey, (val) => {
|
|
30
|
+
activeKey.value = val;
|
|
31
|
+
});
|
|
32
|
+
function onChange(val) {
|
|
33
|
+
activeKey.value = val;
|
|
34
|
+
props.onChange?.(val);
|
|
35
|
+
}
|
|
36
|
+
return () => {
|
|
37
|
+
return wrapSSR(createVNode("div", { "class": classNames(`${baseClassName}`, hashId.value) }, [createVNode("div", { "class": classNames(`${baseClassName}-nav`, hashId.value) }, [props.dataSource.map((item) => {
|
|
38
|
+
return createVNode("div", {
|
|
39
|
+
"key": item.value,
|
|
40
|
+
"class": classNames(`${baseClassName}-panel`, hashId.value, activeKey.value === item.value && `${baseClassName}-panel-active`),
|
|
41
|
+
"onClick": () => onChange(item.value)
|
|
42
|
+
}, [props.renderItem?.(item), createVNode("div", { "class": classNames(`${baseClassName}-panel-title`, hashId.value) }, [item.label])]);
|
|
43
|
+
}), createVNode("div", {
|
|
44
|
+
"class": classNames(`${baseClassName}-line`, hashId.value),
|
|
45
|
+
"style": { top: `${88 * props.dataSource.findIndex((item) => item.value === activeKey.value)}px` }
|
|
46
|
+
}, null)]), createVNode("div", { "class": classNames(`${baseClassName}-content`, hashId.value) }, [createVNode(GScrollbars, null, { default: () => [props.renderContent?.(activeKey.value)] })])]));
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { SwitchTab_default as default };
|