rayyy-vue-table-components 1.2.16 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -18
- package/dist/index.es.js +7523 -7726
- package/dist/index.umd.js +31 -35
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/index.d.ts +5 -3
- package/dist/src/components/items/FilterBtn.vue.d.ts +9 -1
- package/dist/src/components/items/FunctionHeader.vue.d.ts +53 -0
- package/dist/src/components/items/MainPanel.vue.d.ts +28 -0
- package/dist/src/components/{SearchBar.vue.d.ts → items/SearchBar.vue.d.ts} +2 -0
- package/dist/src/const/tableConst.d.ts +83 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/types/components.d.ts +1 -0
- package/dist/src/utils/routeFormatters.d.ts +1 -0
- package/dist/src/utils/tableStyles.d.ts +50 -92
- package/dist/src/views/DemoPage.vue.d.ts +1 -1
- package/package.json +1 -1
- package/src/assets/styles/_base.scss +45 -0
- package/src/assets/styles/_components.scss +61 -17
- package/src/assets/styles/{_dialog.scss → _dialogs.scss} +14 -1
- package/src/assets/styles/{_table.scss → _tables.scss} +41 -3
- package/src/assets/styles/tailwind.scss +4 -3
- package/src/components/index.ts +5 -3
- package/src/components/items/FilterBtn.vue +15 -7
- package/src/components/items/FunctionHeader.vue +46 -0
- package/src/components/items/MainPanel.vue +37 -0
- package/src/components/{SearchBar.vue → items/SearchBar.vue} +7 -4
- package/src/components/transfer/TransferDialog.vue +3 -4
- package/src/types/components.d.ts +1 -0
- package/src/utils/routeFormatters.ts +10 -0
- package/src/utils/tableStyles.ts +88 -133
- package/dist/src/stores/layoutStore.d.ts +0 -5
|
@@ -5,16 +5,18 @@ export { default as FilterBtn } from './items/FilterBtn.vue';
|
|
|
5
5
|
export { default as BaseDialog } from './BaseDialog.vue';
|
|
6
6
|
export { default as BaseForm } from './BaseForm.vue';
|
|
7
7
|
export { default as SortTable } from './tables/SortTable.vue';
|
|
8
|
-
export { default as SearchBar } from './SearchBar.vue';
|
|
8
|
+
export { default as SearchBar } from './items/SearchBar.vue';
|
|
9
9
|
export { default as TransferDialog } from './transfer/TransferDialog.vue';
|
|
10
10
|
export { default as TransferItem } from './transfer/transferItem.vue';
|
|
11
|
-
export
|
|
11
|
+
export { default as FunctionHeader } from './items/FunctionHeader.vue';
|
|
12
|
+
export { default as MainPanel } from './items/MainPanel.vue';
|
|
13
|
+
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, PluginOptions, VueTableComponentsPlugin, } from '../types/components';
|
|
12
14
|
export type { default as BaseTableType } from './tables/BaseTable.vue';
|
|
13
15
|
export type { default as BaseBtnType } from './items/BaseBtn.vue';
|
|
14
16
|
export type { default as BaseInputType } from './items/BaseInput.vue';
|
|
15
17
|
export type { default as FilterBtnType } from './items/FilterBtn.vue';
|
|
16
18
|
export type { default as BaseDialogType } from './BaseDialog.vue';
|
|
17
19
|
export type { default as SortTableType } from './tables/SortTable.vue';
|
|
18
|
-
export type { default as SearchBarType } from './SearchBar.vue';
|
|
20
|
+
export type { default as SearchBarType } from './items/SearchBar.vue';
|
|
19
21
|
export type { default as TransferDialogType } from './transfer/TransferDialog.vue';
|
|
20
22
|
export type { default as TransferItemType } from './transfer/transferItem.vue';
|
|
@@ -4,13 +4,21 @@ type __VLS_Props = {
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: {
|
|
7
|
+
'fill-filter'?(_: {}): any;
|
|
8
|
+
'filter-icon'?(_: {}): any;
|
|
7
9
|
default?(_: {}): any;
|
|
8
10
|
};
|
|
9
11
|
refs: {};
|
|
10
12
|
rootEl: any;
|
|
11
13
|
};
|
|
12
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
16
|
+
"update:reset": () => any;
|
|
17
|
+
"update:submit": () => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
"onUpdate:reset"?: (() => any) | undefined;
|
|
20
|
+
"onUpdate:submit"?: (() => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
15
23
|
export default _default;
|
|
16
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLDivElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
11
|
+
title: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: false;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
showBack: {
|
|
17
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor)[];
|
|
18
|
+
required: false;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
depth: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
required: false;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
title: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
required: false;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
32
|
+
showBack: {
|
|
33
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor)[];
|
|
34
|
+
required: false;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
depth: {
|
|
38
|
+
type: NumberConstructor;
|
|
39
|
+
required: false;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
}>> & Readonly<{}>, {
|
|
43
|
+
title: string;
|
|
44
|
+
showBack: string | boolean | Record<string, any>;
|
|
45
|
+
depth: number;
|
|
46
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title?: string;
|
|
3
|
+
showBack?: boolean | string | object;
|
|
4
|
+
depth?: number;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
searchBar?(_: {}): any;
|
|
10
|
+
main?(_: {}): any;
|
|
11
|
+
footer?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
title: string;
|
|
19
|
+
showBack: boolean | string | object;
|
|
20
|
+
depth: number;
|
|
21
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -17,9 +17,11 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
17
17
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
18
18
|
"keydown:enter": (data: string) => any;
|
|
19
19
|
"update:clear": () => any;
|
|
20
|
+
"update:resetFilter": () => any;
|
|
20
21
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
22
|
"onKeydown:enter"?: ((data: string) => any) | undefined;
|
|
22
23
|
"onUpdate:clear"?: (() => any) | undefined;
|
|
24
|
+
"onUpdate:resetFilter"?: (() => any) | undefined;
|
|
23
25
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
26
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
27
|
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export declare const NAVIGATION_ITEMS: readonly [{
|
|
2
|
+
readonly id: "transfer-dialog";
|
|
3
|
+
readonly title: "TransferDialog 示範";
|
|
4
|
+
readonly description: "表格列配置功能";
|
|
5
|
+
readonly icon: "⚙️";
|
|
6
|
+
readonly section: "transfer-demo";
|
|
7
|
+
}, {
|
|
8
|
+
readonly id: "sort-table";
|
|
9
|
+
readonly title: "排序表格示範";
|
|
10
|
+
readonly description: "排序和選擇功能";
|
|
11
|
+
readonly icon: "📊";
|
|
12
|
+
readonly section: "sort-table-demo";
|
|
13
|
+
}, {
|
|
14
|
+
readonly id: "search-bar";
|
|
15
|
+
readonly title: "搜尋欄示範";
|
|
16
|
+
readonly description: "搜尋和篩選功能";
|
|
17
|
+
readonly icon: "🔍";
|
|
18
|
+
readonly section: "search-bar-demo";
|
|
19
|
+
}, {
|
|
20
|
+
readonly id: "buttons-dialogs";
|
|
21
|
+
readonly title: "按鈕和對話框示範";
|
|
22
|
+
readonly description: "基礎組件展示";
|
|
23
|
+
readonly icon: "🎯";
|
|
24
|
+
readonly section: "buttons-dialogs-demo";
|
|
25
|
+
}];
|
|
26
|
+
export declare const DEMO_CONSTANTS: {
|
|
27
|
+
readonly LOADING_DURATION: 2000;
|
|
28
|
+
readonly STATUS_CONFIG: {
|
|
29
|
+
readonly active: {
|
|
30
|
+
readonly icon: "●";
|
|
31
|
+
readonly text: "啟用";
|
|
32
|
+
readonly class: "text-green-500 text-lg";
|
|
33
|
+
};
|
|
34
|
+
readonly inactive: {
|
|
35
|
+
readonly icon: "●";
|
|
36
|
+
readonly text: "停用";
|
|
37
|
+
readonly class: "text-red-500 text-lg";
|
|
38
|
+
};
|
|
39
|
+
readonly pending: {
|
|
40
|
+
readonly icon: "○";
|
|
41
|
+
readonly text: "待處理";
|
|
42
|
+
readonly class: "text-yellow-500 text-lg";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type UserStatus = 'active' | 'inactive' | 'pending';
|
|
47
|
+
export interface User extends Record<string, unknown> {
|
|
48
|
+
id: number;
|
|
49
|
+
name: string;
|
|
50
|
+
email: string;
|
|
51
|
+
age: number;
|
|
52
|
+
department: string;
|
|
53
|
+
salary: number;
|
|
54
|
+
status: UserStatus;
|
|
55
|
+
joinDate: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const DEMO_USER_DATA: User[];
|
|
58
|
+
export declare const DEPARTMENT_OPTIONS: readonly [{
|
|
59
|
+
readonly label: "全部";
|
|
60
|
+
readonly value: "";
|
|
61
|
+
}, {
|
|
62
|
+
readonly label: "工程部";
|
|
63
|
+
readonly value: "engineering";
|
|
64
|
+
}, {
|
|
65
|
+
readonly label: "設計部";
|
|
66
|
+
readonly value: "design";
|
|
67
|
+
}, {
|
|
68
|
+
readonly label: "行銷部";
|
|
69
|
+
readonly value: "marketing";
|
|
70
|
+
}];
|
|
71
|
+
export declare const STATUS_OPTIONS: readonly [{
|
|
72
|
+
readonly label: "全部";
|
|
73
|
+
readonly value: "";
|
|
74
|
+
}, {
|
|
75
|
+
readonly label: "啟用";
|
|
76
|
+
readonly value: "active";
|
|
77
|
+
}, {
|
|
78
|
+
readonly label: "停用";
|
|
79
|
+
readonly value: "inactive";
|
|
80
|
+
}, {
|
|
81
|
+
readonly label: "待處理";
|
|
82
|
+
readonly value: "pending";
|
|
83
|
+
}];
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { default as BaseInput } from './components/items/BaseInput.vue';
|
|
|
5
5
|
import { default as FilterBtn } from './components/items/FilterBtn.vue';
|
|
6
6
|
import { default as BaseDialog } from './components/BaseDialog.vue';
|
|
7
7
|
import { default as SortTable } from './components/tables/SortTable.vue';
|
|
8
|
-
import { default as SearchBar } from './components/SearchBar.vue';
|
|
8
|
+
import { default as SearchBar } from './components/items/SearchBar.vue';
|
|
9
9
|
export * from './types';
|
|
10
10
|
export * from './utils/tableHelper';
|
|
11
11
|
export * from './utils/tableStyles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function extractSubRoutes(path: string, layer?: number): string;
|
|
@@ -1,100 +1,58 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Table 樣式工具類
|
|
3
|
-
*
|
|
3
|
+
* 注意:樣式定義已移至 src/assets/styles/_components.scss
|
|
4
|
+
* 此檔案僅保留工具函數和類型定義
|
|
4
5
|
*/
|
|
5
|
-
export declare const tableCell = "p-0 h-10";
|
|
6
|
-
export declare const tableHeader = "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
7
|
-
export declare const tableCellContent = "truncate";
|
|
8
|
-
export declare const dismissedRow = "bg-blue-20";
|
|
9
|
-
export declare const tableFooter = "font-bold";
|
|
10
|
-
export declare const blueText = "text-blue-10";
|
|
11
|
-
export declare const redText = "text-redText";
|
|
12
|
-
export declare const sortTableContainer = "w-full mb-4";
|
|
13
|
-
export declare const sortTableFunctionBar = "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
14
|
-
export declare const sortTableSettingsBtn = "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
15
|
-
export declare const filterBtn = "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
16
|
-
export declare const filterBtnText = "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
17
|
-
export declare const filterBtnIcon = "text-xl";
|
|
18
|
-
export declare const transferSortWrapper = "border border-gray-200 h-96 overflow-auto";
|
|
19
|
-
export declare const transferActiveBg = "bg-primary/10";
|
|
20
|
-
export declare const transferActiveBorder = "border border-primary-10 rounded";
|
|
21
|
-
export declare const transferItemWrapper = "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
22
|
-
export declare const transferArrowWrapper = "w-28 text-primary-10";
|
|
23
|
-
export declare const baseDialogTitle = "font-bold text-base";
|
|
24
|
-
export declare const cursorGrab = "cursor-grab";
|
|
25
|
-
export declare const cursorGrabbing = "cursor-grabbing";
|
|
26
|
-
export declare const tableStyles: {
|
|
27
|
-
readonly cell: "p-0 h-10";
|
|
28
|
-
readonly header: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
29
|
-
readonly content: "truncate";
|
|
30
|
-
readonly dismissed: "bg-blue-20";
|
|
31
|
-
readonly footer: "font-bold";
|
|
32
|
-
readonly blueText: "text-blue-10";
|
|
33
|
-
readonly redText: "text-redText";
|
|
34
|
-
};
|
|
35
|
-
export declare const componentStyles: {
|
|
36
|
-
readonly sortTableContainer: "w-full mb-4";
|
|
37
|
-
readonly sortTableFunctionBar: "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
38
|
-
readonly sortTableSettingsBtn: "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
39
|
-
readonly filterBtn: "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
40
|
-
readonly filterBtnText: "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
41
|
-
readonly filterBtnIcon: "text-xl";
|
|
42
|
-
readonly transferSortWrapper: "border border-gray-200 h-96 overflow-auto";
|
|
43
|
-
readonly transferActiveBg: "bg-primary/10";
|
|
44
|
-
readonly transferActiveBorder: "border border-primary-10 rounded";
|
|
45
|
-
readonly transferItemWrapper: "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
46
|
-
readonly transferArrowWrapper: "w-28 text-primary-10";
|
|
47
|
-
readonly baseDialogTitle: "font-bold text-base";
|
|
48
|
-
readonly cursorGrab: "cursor-grab";
|
|
49
|
-
readonly cursorGrabbing: "cursor-grabbing";
|
|
50
|
-
};
|
|
51
|
-
export declare const dataTableConfig: {
|
|
52
|
-
readonly cellClass: "p-0 h-10";
|
|
53
|
-
readonly headerClass: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
54
|
-
readonly contentClass: "truncate";
|
|
55
|
-
readonly dismissedClass: "bg-blue-20";
|
|
56
|
-
readonly footerClass: "font-bold";
|
|
57
|
-
readonly blueTextClass: "text-blue-10";
|
|
58
|
-
readonly redTextClass: "text-redText";
|
|
59
|
-
};
|
|
60
|
-
export declare const allComponentStyles: {
|
|
61
|
-
readonly dataTableConfig: {
|
|
62
|
-
readonly cellClass: "p-0 h-10";
|
|
63
|
-
readonly headerClass: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
64
|
-
readonly contentClass: "truncate";
|
|
65
|
-
readonly dismissedClass: "bg-blue-20";
|
|
66
|
-
readonly footerClass: "font-bold";
|
|
67
|
-
readonly blueTextClass: "text-blue-10";
|
|
68
|
-
readonly redTextClass: "text-redText";
|
|
69
|
-
};
|
|
70
|
-
readonly sortTableContainer: "w-full mb-4";
|
|
71
|
-
readonly sortTableFunctionBar: "flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end";
|
|
72
|
-
readonly sortTableSettingsBtn: "cursor-pointer text-primary-dark text-xl flex items-center justify-center hover:text-primary-40";
|
|
73
|
-
readonly filterBtn: "text-sky-500 hover:text-white hover:bg-sky-500 disabled:bg-white disabled:opacity-50";
|
|
74
|
-
readonly filterBtnText: "text-black ml-2 font-bold hover:text-white disabled:text-black/20";
|
|
75
|
-
readonly filterBtnIcon: "text-xl";
|
|
76
|
-
readonly transferSortWrapper: "border border-gray-200 h-96 overflow-auto";
|
|
77
|
-
readonly transferActiveBg: "bg-primary/10";
|
|
78
|
-
readonly transferActiveBorder: "border border-primary-10 rounded";
|
|
79
|
-
readonly transferItemWrapper: "border-t border-gray-200 px-4 flex items-center justify-between w-full";
|
|
80
|
-
readonly transferArrowWrapper: "w-28 text-primary-10";
|
|
81
|
-
readonly baseDialogTitle: "font-bold text-base";
|
|
82
|
-
readonly cursorGrab: "cursor-grab";
|
|
83
|
-
readonly cursorGrabbing: "cursor-grabbing";
|
|
84
|
-
readonly cell: "p-0 h-10";
|
|
85
|
-
readonly header: "bg-primary-15 font-bold text-text text-sm leading-4";
|
|
86
|
-
readonly content: "truncate";
|
|
87
|
-
readonly dismissed: "bg-blue-20";
|
|
88
|
-
readonly footer: "font-bold";
|
|
89
|
-
readonly blueText: "text-blue-10";
|
|
90
|
-
readonly redText: "text-redText";
|
|
91
|
-
};
|
|
92
6
|
export declare const createTableCellClass: (options?: {
|
|
93
7
|
isDismissed?: boolean;
|
|
94
8
|
isHeader?: boolean;
|
|
95
9
|
}) => string;
|
|
96
10
|
export declare const createTextClass: (type?: "blue" | "red" | "normal") => "" | "text-blue-10" | "text-redText";
|
|
97
|
-
export
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
11
|
+
export declare const STYLE_CLASSES: {
|
|
12
|
+
readonly tableCell: "table-cell";
|
|
13
|
+
readonly tableHeader: "table-header";
|
|
14
|
+
readonly tableCellContent: "table-cell-content";
|
|
15
|
+
readonly dismissedRow: "dismissed-row";
|
|
16
|
+
readonly tableFooter: "table-footer";
|
|
17
|
+
readonly blueText: "blue-text";
|
|
18
|
+
readonly redText: "red-text";
|
|
19
|
+
readonly sortTableContainer: "sort-table-container";
|
|
20
|
+
readonly sortTableFunctionBar: "sort-table-function-bar";
|
|
21
|
+
readonly sortTableSettingsBtn: "sort-table-settings-btn";
|
|
22
|
+
readonly filterBtn: "filter-btn";
|
|
23
|
+
readonly filterBtnText: "filter-btn-text";
|
|
24
|
+
readonly filterBtnIcon: "filter-btn-icon";
|
|
25
|
+
readonly transferSortWrapper: "transfer-sort-wrapper";
|
|
26
|
+
readonly transferActiveBg: "transfer-active-bg";
|
|
27
|
+
readonly transferActiveBorder: "transfer-active-border";
|
|
28
|
+
readonly transferItemWrapper: "transfer-item-wrapper";
|
|
29
|
+
readonly transferArrowWrapper: "transfer-arrow-wrapper";
|
|
30
|
+
readonly baseDialogTitle: "base-dialog-title";
|
|
31
|
+
readonly cursorGrab: "cursor-grab";
|
|
32
|
+
readonly cursorGrabbing: "cursor-grabbing";
|
|
33
|
+
readonly dataTableConfig: "data-table-config";
|
|
34
|
+
readonly componentStyles: "component-styles";
|
|
35
|
+
};
|
|
36
|
+
export type StyleClassesType = typeof STYLE_CLASSES;
|
|
37
|
+
export interface TableCellStyleOptions {
|
|
38
|
+
isDismissed?: boolean;
|
|
39
|
+
isHeader?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type TextStyleType = 'blue' | 'red' | 'normal';
|
|
42
|
+
/**
|
|
43
|
+
* 使用方式:
|
|
44
|
+
*
|
|
45
|
+
* 1. 在 Vue 組件中使用樣式類名:
|
|
46
|
+
* <div :class="STYLE_CLASSES.tableCell">內容</div>
|
|
47
|
+
*
|
|
48
|
+
* 2. 使用樣式組合函數:
|
|
49
|
+
* <div :class="createTableCellClass({ isHeader: true })">標題</div>
|
|
50
|
+
*
|
|
51
|
+
* 3. 使用文字樣式函數:
|
|
52
|
+
* <span :class="createTextClass('blue')">藍色文字</span>
|
|
53
|
+
*
|
|
54
|
+
* 4. 在 SCSS 中使用對應的類名:
|
|
55
|
+
* .my-custom-class {
|
|
56
|
+
* @extend .table-cell;
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {},
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// ==================== 基礎樣式 ====================
|
|
2
|
+
// 包含表格基礎樣式、文字樣式等通用樣式
|
|
3
|
+
|
|
4
|
+
// 表格基礎樣式
|
|
5
|
+
.table-cell {
|
|
6
|
+
@apply p-0 h-10;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// 表格標題樣式
|
|
10
|
+
.table-header {
|
|
11
|
+
@apply bg-primary-15 font-bold text-text text-sm leading-4;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 表格內容樣式
|
|
15
|
+
.table-cell-content {
|
|
16
|
+
@apply truncate;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 被駁回行的樣式
|
|
20
|
+
.dismissed-row {
|
|
21
|
+
@apply bg-blue-20;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 表格底部樣式
|
|
25
|
+
.table-footer {
|
|
26
|
+
@apply font-bold;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// 文字顏色樣式
|
|
30
|
+
.blue-text {
|
|
31
|
+
@apply text-blue-10;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.red-text {
|
|
35
|
+
@apply text-redText;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 通用樣式
|
|
39
|
+
.cursor-grab {
|
|
40
|
+
cursor: grab;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cursor-grabbing {
|
|
44
|
+
cursor: grabbing;
|
|
45
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// ==================== 組件樣式 ====================
|
|
2
|
+
// 包含各個 Vue 組件的樣式定義
|
|
2
3
|
|
|
3
|
-
// SortTable 組件樣式
|
|
4
|
+
// ==================== SortTable 組件樣式 ====================
|
|
4
5
|
.sort-table-container {
|
|
5
6
|
@apply w-full mb-4;
|
|
6
7
|
}
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
// FilterBtn 組件樣式
|
|
21
|
+
// ==================== FilterBtn 組件樣式 ====================
|
|
21
22
|
.filter-btn {
|
|
22
23
|
@apply text-sky-500;
|
|
23
24
|
|
|
@@ -28,21 +29,26 @@
|
|
|
28
29
|
i {
|
|
29
30
|
@apply text-xl;
|
|
30
31
|
}
|
|
32
|
+
|
|
31
33
|
.filter-icon {
|
|
32
34
|
@apply w-5 h-5 stroke-primary;
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
|
|
38
|
+
|
|
35
39
|
&:hover {
|
|
36
40
|
@apply text-white bg-sky-500;
|
|
37
41
|
|
|
38
42
|
p {
|
|
39
43
|
@apply text-white;
|
|
40
44
|
}
|
|
45
|
+
|
|
41
46
|
.filter-icon {
|
|
42
|
-
@apply
|
|
47
|
+
@apply stroke-white;
|
|
43
48
|
}
|
|
49
|
+
|
|
44
50
|
.fill-icon path {
|
|
45
|
-
@apply stroke-white;
|
|
51
|
+
@apply stroke-white ;
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -59,7 +65,7 @@
|
|
|
59
65
|
}
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
// TransferItem 組件樣式
|
|
68
|
+
// ==================== TransferItem 組件樣式 ====================
|
|
63
69
|
.transfer-item-wrapper {
|
|
64
70
|
@apply border-t border-gray-200 px-4 flex items-center justify-between w-full;
|
|
65
71
|
}
|
|
@@ -68,7 +74,7 @@
|
|
|
68
74
|
@apply w-28 text-primary-10;
|
|
69
75
|
}
|
|
70
76
|
|
|
71
|
-
// TransferDialog 組件樣式
|
|
77
|
+
// ==================== TransferDialog 組件樣式 ====================
|
|
72
78
|
.transfer-sort-wrapper {
|
|
73
79
|
@apply border border-gray-200 h-96 overflow-auto;
|
|
74
80
|
}
|
|
@@ -81,16 +87,54 @@
|
|
|
81
87
|
@apply border border-primary-10 rounded;
|
|
82
88
|
}
|
|
83
89
|
|
|
84
|
-
//
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
|
|
90
|
+
// ==================== 組件樣式配置 ====================
|
|
91
|
+
.component-styles {
|
|
92
|
+
// SortTable
|
|
93
|
+
.sort-table-container {
|
|
94
|
+
@apply w-full mb-4;
|
|
95
|
+
}
|
|
88
96
|
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
.sort-table-function-bar {
|
|
98
|
+
@apply flex items-center h-12 bg-primary-20 px-1.5 rounded-t justify-end;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.sort-table-settings-btn {
|
|
102
|
+
@apply cursor-pointer text-primary-dark text-xl flex items-center justify-center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// FilterBtn
|
|
106
|
+
.filter-btn {
|
|
107
|
+
@apply text-sky-500;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.filter-btn-text {
|
|
111
|
+
@apply text-primary-80 ml-2 text-base font-bold;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.filter-btn-icon {
|
|
115
|
+
@apply text-xl;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// TransferDialog
|
|
119
|
+
.transfer-sort-wrapper {
|
|
120
|
+
@apply border border-gray-200 h-96 overflow-auto;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.transfer-active-bg {
|
|
124
|
+
background-color: rgba(103, 133, 193, 0.1);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.transfer-active-border {
|
|
128
|
+
@apply border border-primary-10 rounded;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// TransferItem
|
|
132
|
+
.transfer-item-wrapper {
|
|
133
|
+
@apply border-t border-gray-200 px-4 flex items-center justify-between w-full;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.transfer-arrow-wrapper {
|
|
137
|
+
@apply w-28 text-primary-10;
|
|
138
|
+
}
|
|
93
139
|
|
|
94
|
-
.cursor-grabbing {
|
|
95
|
-
cursor: grabbing;
|
|
96
140
|
}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
// ==================== 對話框相關樣式 ====================
|
|
2
|
+
// 包含 BaseDialog 組件樣式和 Element Plus 對話框樣式覆蓋
|
|
3
|
+
|
|
4
|
+
// BaseDialog 組件樣式
|
|
5
|
+
.base-dialog-title {
|
|
6
|
+
@apply font-bold text-base;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Element Plus 對話框樣式覆蓋
|
|
1
10
|
.el-dialog.base-dialog {
|
|
2
|
-
@apply p-0
|
|
11
|
+
@apply p-0;
|
|
3
12
|
|
|
4
13
|
.el-dialog__header {
|
|
5
14
|
@apply h-12 pt-2 bg-primary-15 border-b;
|
|
@@ -24,20 +33,24 @@
|
|
|
24
33
|
}
|
|
25
34
|
}
|
|
26
35
|
|
|
36
|
+
// 警告對話框樣式
|
|
27
37
|
.waring-dialog {
|
|
28
38
|
.el-dialog__header {
|
|
29
39
|
@apply border-b-orange;
|
|
30
40
|
}
|
|
31
41
|
}
|
|
32
42
|
|
|
43
|
+
// 上傳結果對話框樣式
|
|
33
44
|
.upload-result-dialog {
|
|
34
45
|
.el-dialog__header {
|
|
35
46
|
@apply border-b-blue-10;
|
|
36
47
|
}
|
|
37
48
|
}
|
|
38
49
|
|
|
50
|
+
// 上下文包裝器樣式
|
|
39
51
|
.context-wrapper {
|
|
40
52
|
@apply w-full flex items-center justify-center flex-col gap-2;
|
|
53
|
+
|
|
41
54
|
p {
|
|
42
55
|
@apply font-bold text-xl;
|
|
43
56
|
}
|