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
package/README.md
CHANGED
|
@@ -671,26 +671,26 @@ import 'rayyy-vue-table-components/styles'
|
|
|
671
671
|
#### 預定義樣式
|
|
672
672
|
|
|
673
673
|
```typescript
|
|
674
|
-
import {
|
|
674
|
+
import { STYLE_CLASSES } from 'rayyy-vue-table-components/utils/styles'
|
|
675
675
|
|
|
676
676
|
// 表格樣式常量
|
|
677
677
|
const styles = {
|
|
678
|
-
cell:
|
|
679
|
-
header:
|
|
680
|
-
content:
|
|
681
|
-
dismissed:
|
|
682
|
-
footer:
|
|
683
|
-
blueText:
|
|
684
|
-
redText:
|
|
678
|
+
cell: STYLE_CLASSES.tableCell, // 'table-cell'
|
|
679
|
+
header: STYLE_CLASSES.tableHeader, // 'table-header'
|
|
680
|
+
content: STYLE_CLASSES.tableCellContent, // 'table-cell-content'
|
|
681
|
+
dismissed: STYLE_CLASSES.dismissedRow, // 'dismissed-row'
|
|
682
|
+
footer: STYLE_CLASSES.tableFooter, // 'table-footer'
|
|
683
|
+
blueText: STYLE_CLASSES.blueText, // 'blue-text'
|
|
684
|
+
redText: STYLE_CLASSES.redText, // 'red-text'
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
// 組件樣式常量
|
|
688
688
|
const componentClasses = {
|
|
689
|
-
sortTableContainer:
|
|
690
|
-
filterBtn:
|
|
691
|
-
transferActiveBg:
|
|
692
|
-
baseDialogTitle:
|
|
693
|
-
cursorGrab:
|
|
689
|
+
sortTableContainer: STYLE_CLASSES.sortTableContainer,
|
|
690
|
+
filterBtn: STYLE_CLASSES.filterBtn,
|
|
691
|
+
transferActiveBg: STYLE_CLASSES.transferActiveBg,
|
|
692
|
+
baseDialogTitle: STYLE_CLASSES.baseDialogTitle,
|
|
693
|
+
cursorGrab: STYLE_CLASSES.cursorGrab,
|
|
694
694
|
}
|
|
695
695
|
```
|
|
696
696
|
|
|
@@ -714,12 +714,12 @@ const textClass = createTextClass('blue') // 'blue' | 'red' | 'normal'
|
|
|
714
714
|
#### Element Plus 表格配置
|
|
715
715
|
|
|
716
716
|
```typescript
|
|
717
|
-
import {
|
|
717
|
+
import { STYLE_CLASSES } from 'rayyy-vue-table-components/utils/styles'
|
|
718
718
|
|
|
719
719
|
// 在 Element Plus 原生表格中使用
|
|
720
720
|
<el-table
|
|
721
|
-
:cell-class-name="
|
|
722
|
-
:header-cell-class-name="
|
|
721
|
+
:cell-class-name="STYLE_CLASSES.tableCell"
|
|
722
|
+
:header-cell-class-name="STYLE_CLASSES.tableHeader"
|
|
723
723
|
:data="tableData"
|
|
724
724
|
>
|
|
725
725
|
<el-table-column prop="name" label="姓名" />
|
|
@@ -832,8 +832,10 @@ src/
|
|
|
832
832
|
│ └── transfer/ # 穿梭框組件
|
|
833
833
|
├── assets/styles/ # 樣式文件
|
|
834
834
|
│ ├── tailwind.scss # 主樣式入口
|
|
835
|
-
│ ├──
|
|
836
|
-
│ ├──
|
|
835
|
+
│ ├── _base.scss # 基礎樣式(表格基礎、文字樣式等)
|
|
836
|
+
│ ├── _tables.scss # 表格相關樣式(Element Plus 表格覆蓋)
|
|
837
|
+
│ ├── _dialogs.scss # 對話框相關樣式
|
|
838
|
+
│ ├── _components.scss # 組件樣式(SortTable、FilterBtn等)
|
|
837
839
|
│ └── element/ # Element Plus 主題
|
|
838
840
|
├── types/ # 類型定義
|
|
839
841
|
├── utils/ # 工具函數
|