rayyy-vue-table-components 1.2.32 → 1.2.34
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 +15 -66
- package/dist/index.es.js +2737 -2785
- package/dist/index.umd.js +9 -9
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/index.d.ts +0 -1
- package/package.json +1 -1
- package/src/assets/styles/_components.scss +1 -6
- package/src/components/items/FilterBtn.vue +1 -1
- package/dist/src/utils/tableStyles.d.ts +0 -58
- package/src/utils/tableStyles.ts +0 -107
package/dist/src/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { default as SortTable } from './components/tables/SortTable.vue';
|
|
|
8
8
|
import { default as SearchBar } from './components/items/SearchBar.vue';
|
|
9
9
|
export * from './types';
|
|
10
10
|
export * from './utils/tableHelper';
|
|
11
|
-
export * from './utils/tableStyles';
|
|
12
11
|
export { BaseTable, BaseBtn, BaseInput, FilterBtn, BaseDialog, SortTable, SearchBar };
|
|
13
12
|
export type { BaseTableProps, BaseTableEmits, BaseTableInstance, BaseBtnProps, BaseBtnEmits, BaseBtnInstance, BaseDialogProps, BaseDialogEmits, BaseDialogInstance, PluginOptions, VueTableComponentsPlugin, } from './types/components';
|
|
14
13
|
export * from './components';
|
package/package.json
CHANGED
|
@@ -102,11 +102,7 @@
|
|
|
102
102
|
@apply cursor-pointer text-primary-dark text-xl flex items-center justify-center;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
// FilterBtn
|
|
106
|
-
.filter-btn {
|
|
107
|
-
@apply text-sky-500;
|
|
108
|
-
}
|
|
109
|
-
|
|
105
|
+
// FilterBtn 文字和圖標樣式
|
|
110
106
|
.filter-btn-text {
|
|
111
107
|
@apply text-primary-80 ml-2 text-base font-bold;
|
|
112
108
|
}
|
|
@@ -136,5 +132,4 @@
|
|
|
136
132
|
.transfer-arrow-wrapper {
|
|
137
133
|
@apply w-28 text-primary-10;
|
|
138
134
|
}
|
|
139
|
-
|
|
140
135
|
}
|
|
@@ -55,7 +55,7 @@ const submitFilter = () => {
|
|
|
55
55
|
</el-icon>
|
|
56
56
|
</slot>
|
|
57
57
|
</base-btn>
|
|
58
|
-
<el-drawer v-model="showDrawer"
|
|
58
|
+
<el-drawer v-model="showDrawer" :size="drawerSize">
|
|
59
59
|
<template #header>
|
|
60
60
|
<div class="flex justify-center text-base text-black font-semibold">
|
|
61
61
|
<span>查詢條件</span>
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Table 樣式工具類
|
|
3
|
-
* 注意:樣式定義已移至 src/assets/styles/_components.scss
|
|
4
|
-
* 此檔案僅保留工具函數和類型定義
|
|
5
|
-
*/
|
|
6
|
-
export declare const createTableCellClass: (options?: {
|
|
7
|
-
isDismissed?: boolean;
|
|
8
|
-
isHeader?: boolean;
|
|
9
|
-
}) => string;
|
|
10
|
-
export declare const createTextClass: (type?: "blue" | "red" | "normal") => "" | "text-blue-10" | "text-redText";
|
|
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
|
-
*/
|
package/src/utils/tableStyles.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Table 樣式工具類
|
|
3
|
-
* 注意:樣式定義已移至 src/assets/styles/_components.scss
|
|
4
|
-
* 此檔案僅保留工具函數和類型定義
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// ==================== 樣式組合函數 ====================
|
|
8
|
-
// 創建表格單元格樣式類名
|
|
9
|
-
export const createTableCellClass = (options?: { isDismissed?: boolean; isHeader?: boolean }) => {
|
|
10
|
-
const classes = ['p-0 h-10']
|
|
11
|
-
|
|
12
|
-
if (options?.isDismissed) {
|
|
13
|
-
classes.push('bg-blue-20')
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
if (options?.isHeader) {
|
|
17
|
-
classes.push('bg-primary-15 font-bold text-text text-sm leading-4')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return classes.join(' ')
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// 創建文字樣式類名
|
|
24
|
-
export const createTextClass = (type: 'blue' | 'red' | 'normal' = 'normal') => {
|
|
25
|
-
switch (type) {
|
|
26
|
-
case 'blue':
|
|
27
|
-
return 'text-blue-10'
|
|
28
|
-
case 'red':
|
|
29
|
-
return 'text-redText'
|
|
30
|
-
default:
|
|
31
|
-
return ''
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// ==================== 樣式類名常量 ====================
|
|
36
|
-
// 這些常量對應 _components.scss 中定義的 CSS 類名
|
|
37
|
-
export const STYLE_CLASSES = {
|
|
38
|
-
// 表格基礎樣式
|
|
39
|
-
tableCell: 'table-cell',
|
|
40
|
-
tableHeader: 'table-header',
|
|
41
|
-
tableCellContent: 'table-cell-content',
|
|
42
|
-
dismissedRow: 'dismissed-row',
|
|
43
|
-
tableFooter: 'table-footer',
|
|
44
|
-
blueText: 'blue-text',
|
|
45
|
-
redText: 'red-text',
|
|
46
|
-
|
|
47
|
-
// SortTable 組件樣式
|
|
48
|
-
sortTableContainer: 'sort-table-container',
|
|
49
|
-
sortTableFunctionBar: 'sort-table-function-bar',
|
|
50
|
-
sortTableSettingsBtn: 'sort-table-settings-btn',
|
|
51
|
-
|
|
52
|
-
// FilterBtn 組件樣式
|
|
53
|
-
filterBtn: 'filter-btn',
|
|
54
|
-
filterBtnText: 'filter-btn-text',
|
|
55
|
-
filterBtnIcon: 'filter-btn-icon',
|
|
56
|
-
|
|
57
|
-
// TransferDialog 組件樣式
|
|
58
|
-
transferSortWrapper: 'transfer-sort-wrapper',
|
|
59
|
-
transferActiveBg: 'transfer-active-bg',
|
|
60
|
-
transferActiveBorder: 'transfer-active-border',
|
|
61
|
-
|
|
62
|
-
// TransferItem 組件樣式
|
|
63
|
-
transferItemWrapper: 'transfer-item-wrapper',
|
|
64
|
-
transferArrowWrapper: 'transfer-arrow-wrapper',
|
|
65
|
-
|
|
66
|
-
// BaseDialog 組件樣式
|
|
67
|
-
baseDialogTitle: 'base-dialog-title',
|
|
68
|
-
|
|
69
|
-
// 通用樣式
|
|
70
|
-
cursorGrab: 'cursor-grab',
|
|
71
|
-
cursorGrabbing: 'cursor-grabbing',
|
|
72
|
-
|
|
73
|
-
// 配置樣式
|
|
74
|
-
dataTableConfig: 'data-table-config',
|
|
75
|
-
componentStyles: 'component-styles',
|
|
76
|
-
} as const
|
|
77
|
-
|
|
78
|
-
// ==================== 類型定義 ====================
|
|
79
|
-
export type StyleClassesType = typeof STYLE_CLASSES
|
|
80
|
-
|
|
81
|
-
// 樣式選項類型
|
|
82
|
-
export interface TableCellStyleOptions {
|
|
83
|
-
isDismissed?: boolean
|
|
84
|
-
isHeader?: boolean
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// 文字樣式類型
|
|
88
|
-
export type TextStyleType = 'blue' | 'red' | 'normal'
|
|
89
|
-
|
|
90
|
-
// ==================== 使用說明 ====================
|
|
91
|
-
/**
|
|
92
|
-
* 使用方式:
|
|
93
|
-
*
|
|
94
|
-
* 1. 在 Vue 組件中使用樣式類名:
|
|
95
|
-
* <div :class="STYLE_CLASSES.tableCell">內容</div>
|
|
96
|
-
*
|
|
97
|
-
* 2. 使用樣式組合函數:
|
|
98
|
-
* <div :class="createTableCellClass({ isHeader: true })">標題</div>
|
|
99
|
-
*
|
|
100
|
-
* 3. 使用文字樣式函數:
|
|
101
|
-
* <span :class="createTextClass('blue')">藍色文字</span>
|
|
102
|
-
*
|
|
103
|
-
* 4. 在 SCSS 中使用對應的類名:
|
|
104
|
-
* .my-custom-class {
|
|
105
|
-
* @extend .table-cell;
|
|
106
|
-
* }
|
|
107
|
-
*/
|