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/README.md
CHANGED
|
@@ -170,14 +170,12 @@ import 'rayyy-vue-table-components/styles'
|
|
|
170
170
|
|
|
171
171
|
### TypeScript 樣式工具
|
|
172
172
|
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
isHeader: false
|
|
180
|
-
})
|
|
173
|
+
```vue
|
|
174
|
+
<template>
|
|
175
|
+
<!-- 直接使用預定義的樣式類別 -->
|
|
176
|
+
<div class="table-cell bg-blue-20">被駁回的單元格</div>
|
|
177
|
+
<div class="table-header">標題行</div>
|
|
178
|
+
</template>
|
|
181
179
|
```
|
|
182
180
|
|
|
183
181
|
## 📚 組件示例
|
|
@@ -836,66 +834,17 @@ import 'rayyy-vue-table-components/styles'
|
|
|
836
834
|
@import 'rayyy-vue-table-components/styles/element';
|
|
837
835
|
```
|
|
838
836
|
|
|
839
|
-
###
|
|
840
|
-
|
|
841
|
-
提供類型安全的樣式工具函數:
|
|
842
|
-
|
|
843
|
-
#### 預定義樣式
|
|
844
|
-
|
|
845
|
-
```typescript
|
|
846
|
-
import { STYLE_CLASSES } from 'rayyy-vue-table-components/utils/styles'
|
|
847
|
-
|
|
848
|
-
// 表格樣式常量
|
|
849
|
-
const styles = {
|
|
850
|
-
cell: STYLE_CLASSES.tableCell, // 'table-cell'
|
|
851
|
-
header: STYLE_CLASSES.tableHeader, // 'table-header'
|
|
852
|
-
content: STYLE_CLASSES.tableCellContent, // 'table-cell-content'
|
|
853
|
-
dismissed: STYLE_CLASSES.dismissedRow, // 'dismissed-row'
|
|
854
|
-
footer: STYLE_CLASSES.tableFooter, // 'table-footer'
|
|
855
|
-
blueText: STYLE_CLASSES.blueText, // 'blue-text'
|
|
856
|
-
redText: STYLE_CLASSES.redText, // 'red-text'
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
// 組件樣式常量
|
|
860
|
-
const componentClasses = {
|
|
861
|
-
sortTableContainer: STYLE_CLASSES.sortTableContainer,
|
|
862
|
-
filterBtn: STYLE_CLASSES.filterBtn,
|
|
863
|
-
transferActiveBg: STYLE_CLASSES.transferActiveBg,
|
|
864
|
-
baseDialogTitle: STYLE_CLASSES.baseDialogTitle,
|
|
865
|
-
cursorGrab: STYLE_CLASSES.cursorGrab,
|
|
866
|
-
}
|
|
867
|
-
```
|
|
868
|
-
|
|
869
|
-
#### 動態樣式生成器
|
|
837
|
+
### 樣式類別
|
|
870
838
|
|
|
871
|
-
|
|
872
|
-
import { createTableCellClass, createTextClass } from 'rayyy-vue-table-components/utils/styles'
|
|
839
|
+
組件庫提供預定義的 CSS 類別,您可以直接在組件中使用:
|
|
873
840
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
// 動態生成文字顏色樣式
|
|
882
|
-
const textClass = createTextClass('blue') // 'blue' | 'red' | 'normal'
|
|
883
|
-
// 輸出: 'text-blue-10'
|
|
884
|
-
```
|
|
885
|
-
|
|
886
|
-
#### Element Plus 表格配置
|
|
887
|
-
|
|
888
|
-
```typescript
|
|
889
|
-
import { STYLE_CLASSES } from 'rayyy-vue-table-components/utils/styles'
|
|
890
|
-
|
|
891
|
-
// 在 Element Plus 原生表格中使用
|
|
892
|
-
<el-table
|
|
893
|
-
:cell-class-name="STYLE_CLASSES.tableCell"
|
|
894
|
-
:header-cell-class-name="STYLE_CLASSES.tableHeader"
|
|
895
|
-
:data="tableData"
|
|
896
|
-
>
|
|
897
|
-
<el-table-column prop="name" label="姓名" />
|
|
898
|
-
</el-table>
|
|
841
|
+
```vue
|
|
842
|
+
<template>
|
|
843
|
+
<!-- 使用預定義的樣式類別 -->
|
|
844
|
+
<div class="filter-btn">篩選按鈕</div>
|
|
845
|
+
<div class="transfer-active-bg">轉移項目</div>
|
|
846
|
+
<div class="table-cell">表格單元格</div>
|
|
847
|
+
</template>
|
|
899
848
|
```
|
|
900
849
|
|
|
901
850
|
### 自定義主題
|