rayyy-vue-table-components 1.3.18 → 1.3.20
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 -13
- package/dist/index.es.js +14586 -10742
- package/dist/index.umd.js +41 -20
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/{views/demo/BaseMultipleInputDemo.vue.d.ts → components/LanguageSwitcher.vue.d.ts} +1 -1
- package/dist/src/components/index.d.ts +2 -3
- package/dist/src/const/tableConst.d.ts +0 -51
- package/dist/src/index.d.ts +1 -1
- package/dist/src/plugins/i18n.d.ts +79 -0
- package/dist/src/router/constants.d.ts +2 -2
- package/dist/src/types/components.d.ts +0 -17
- package/dist/src/utils/languageSwitcher.d.ts +40 -0
- package/dist/src/views/demo/I18nDemo.vue.d.ts +2 -0
- package/package.json +6 -2
- package/src/components/LanguageSwitcher.vue +53 -0
- package/src/components/index.ts +2 -3
- package/src/components/items/BaseDialog.vue +2 -2
- package/src/components/layout/FunctionHeader.vue +1 -0
- package/src/components/tables/SortTable.vue +2 -3
- package/src/components/tables/TitleTable.vue +1 -2
- package/src/types/components.d.ts +0 -17
- package/src/utils/languageSwitcher.ts +112 -0
- package/dist/src/components/form/BaseMultipleInput.vue.d.ts +0 -549
- package/dist/src/utils/locale.d.ts +0 -1894
- package/src/components/form/BaseMultipleInput.vue +0 -112
- package/src/components/form/BaseSelector.vue +0 -62
- package/src/utils/locale.ts +0 -53
package/README.md
CHANGED
|
@@ -38,8 +38,6 @@ pnpm add rayyy-vue-table-components
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
> **注意**: 本組件庫需要 Vue 3.0+ 和 Element Plus 作為對等依賴。
|
|
41
|
-
>
|
|
42
|
-
> **重要**: 請確保在外部專案中正確配置 Element Plus 的語言設定,組件庫內部不會自動設定語言。
|
|
43
41
|
|
|
44
42
|
## 🚀 快速開始
|
|
45
43
|
|
|
@@ -50,7 +48,6 @@ pnpm add rayyy-vue-table-components
|
|
|
50
48
|
```typescript
|
|
51
49
|
import { createApp } from 'vue'
|
|
52
50
|
import ElementPlus from 'element-plus'
|
|
53
|
-
import { getElementPlusConfig } from 'rayyy-vue-table-components'
|
|
54
51
|
import 'element-plus/dist/index.css'
|
|
55
52
|
import VueTableComponents from 'rayyy-vue-table-components'
|
|
56
53
|
import 'rayyy-vue-table-components/styles'
|
|
@@ -59,8 +56,10 @@ import App from './App.vue'
|
|
|
59
56
|
|
|
60
57
|
const app = createApp(App)
|
|
61
58
|
|
|
62
|
-
// 安裝 Element Plus
|
|
63
|
-
app.use(ElementPlus,
|
|
59
|
+
// 安裝 Element Plus(可自定義語系)
|
|
60
|
+
app.use(ElementPlus, {
|
|
61
|
+
locale: zhTw // 設定繁體中文
|
|
62
|
+
})
|
|
64
63
|
|
|
65
64
|
// 安裝組件庫
|
|
66
65
|
app.use(VueTableComponents)
|
|
@@ -70,23 +69,26 @@ app.mount('#app')
|
|
|
70
69
|
|
|
71
70
|
### 語系設定
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
組件庫依賴 Element Plus,請在安裝 Element Plus 時設定語系:
|
|
74
73
|
|
|
75
74
|
```typescript
|
|
76
75
|
import { createApp } from 'vue'
|
|
77
76
|
import ElementPlus from 'element-plus'
|
|
78
|
-
import
|
|
77
|
+
import zhTw from 'element-plus/es/locale/lang/zh-tw'
|
|
78
|
+
import en from 'element-plus/es/locale/lang/en'
|
|
79
79
|
import VueTableComponents from 'rayyy-vue-table-components'
|
|
80
80
|
|
|
81
81
|
const app = createApp(App)
|
|
82
82
|
|
|
83
|
-
//
|
|
84
|
-
app.use(ElementPlus,
|
|
85
|
-
|
|
83
|
+
// 使用繁體中文
|
|
84
|
+
app.use(ElementPlus, {
|
|
85
|
+
locale: zhTw
|
|
86
|
+
})
|
|
86
87
|
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
// 或使用英文
|
|
89
|
+
app.use(ElementPlus, {
|
|
90
|
+
locale: en
|
|
91
|
+
})
|
|
90
92
|
|
|
91
93
|
app.use(VueTableComponents)
|
|
92
94
|
app.mount('#app')
|