rayyy-vue-table-components 2.0.36 → 2.0.38
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/dist/index.es.js +3274 -3272
- package/dist/index.umd.js +6 -6
- package/dist/src/locales/en-US.json.d.ts +2 -1
- package/dist/src/locales/index.d.ts +2 -0
- package/dist/src/locales/zh-TW.json.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/tables/BaseTable.vue +1 -11
- package/src/locales/en-US.json +2 -1
- package/src/locales/zh-TW.json +2 -1
|
@@ -37,6 +37,7 @@ export declare const messages: {
|
|
|
37
37
|
"button.delete": string;
|
|
38
38
|
"common.save": string;
|
|
39
39
|
"common.discard": string;
|
|
40
|
+
"table.empty": string;
|
|
40
41
|
};
|
|
41
42
|
'en-US': {
|
|
42
43
|
"common.select": string;
|
|
@@ -74,6 +75,7 @@ export declare const messages: {
|
|
|
74
75
|
"button.delete": string;
|
|
75
76
|
"common.save": string;
|
|
76
77
|
"common.discard": string;
|
|
78
|
+
"table.empty": string;
|
|
77
79
|
};
|
|
78
80
|
};
|
|
79
81
|
export type LocaleType = keyof typeof messages;
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import { useI18n } from 'vue-i18n'
|
|
|
5
5
|
import type { TableColumnCtx } from 'element-plus'
|
|
6
6
|
import type { SortChangValue, TableColumn } from '@/types'
|
|
7
7
|
import type { Language } from 'element-plus/es/locale'
|
|
8
|
-
import { useComponentElementLocale } from '@/utils/i18n'
|
|
9
8
|
|
|
10
9
|
const { t } = useI18n()
|
|
11
10
|
|
|
@@ -80,15 +79,6 @@ const operatorWidth = computed(() => {
|
|
|
80
79
|
return 60
|
|
81
80
|
}
|
|
82
81
|
})
|
|
83
|
-
|
|
84
|
-
// 優先使用 prop,沒有 prop 則使用 composable
|
|
85
|
-
const elementLocale = computed(() => {
|
|
86
|
-
if (props.locale) {
|
|
87
|
-
return props.locale
|
|
88
|
-
}
|
|
89
|
-
// 回退:使用簡化的 composable
|
|
90
|
-
return useComponentElementLocale().value
|
|
91
|
-
})
|
|
92
82
|
</script>
|
|
93
83
|
|
|
94
84
|
<template>
|
|
@@ -157,7 +147,7 @@ const elementLocale = computed(() => {
|
|
|
157
147
|
</template>
|
|
158
148
|
</el-table-column>
|
|
159
149
|
</el-table>
|
|
160
|
-
<el-empty
|
|
150
|
+
<el-empty :description="t('table.empty')" v-else />
|
|
161
151
|
</template>
|
|
162
152
|
|
|
163
153
|
<style scoped lang="scss"></style>
|
package/src/locales/en-US.json
CHANGED