rayyy-vue-table-components 2.0.17 → 2.0.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/dist/index.es.js +607 -607
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
- package/src/components/layout/SearchableListPanel.vue +5 -3
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@ import type { Pager } from '@/types'
|
|
|
4
4
|
import { MainPanel, SearchBar } from '@/components'
|
|
5
5
|
import { useComponentElementLocale } from '@/utils/i18n'
|
|
6
6
|
import type { Language } from 'element-plus/es/locale'
|
|
7
|
-
import zhTw from 'element-plus/es/locale/lang/zh-tw'
|
|
8
7
|
|
|
9
8
|
const props = withDefaults(
|
|
10
9
|
defineProps<{
|
|
@@ -56,14 +55,17 @@ const showPager = computed(() => {
|
|
|
56
55
|
}
|
|
57
56
|
})
|
|
58
57
|
|
|
58
|
+
// 在 computed 外部調用,保持引用穩定
|
|
59
|
+
const fallbackLocale = useComponentElementLocale()
|
|
60
|
+
|
|
59
61
|
// 優先使用 prop,沒有 prop 則使用 composable
|
|
60
62
|
const elementLocale = computed(() => {
|
|
61
63
|
// 檢查 props.locale 是否為真正的 Language 對象(不是預設值)
|
|
62
64
|
if (props.locale && typeof props.locale === 'object' && 'name' in props.locale) {
|
|
63
65
|
return props.locale
|
|
64
66
|
}
|
|
65
|
-
//
|
|
66
|
-
return
|
|
67
|
+
// 現在能正確追蹤響應式
|
|
68
|
+
return fallbackLocale.value
|
|
67
69
|
})
|
|
68
70
|
</script>
|
|
69
71
|
|