feat: 添加 primelocale 依赖并更新 PrimeVue 组件以支持多语言选择
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { usePrimeVue } from 'primevue/config';
|
||||
import zhCN from 'primelocale/zh-CN.json';
|
||||
|
||||
const primevue = usePrimeVue();
|
||||
primevue.config.locale = zhCN['zh-CN'];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="pppppppp">
|
||||
<InputText />
|
||||
|
||||
<Button>PButton</Button>
|
||||
|
||||
<Select
|
||||
:options="[
|
||||
{ name: 'New York', code: 'NY' },
|
||||
@@ -13,8 +18,12 @@
|
||||
{ name: 'Paris', code: 'PRS' },
|
||||
]"
|
||||
optionLabel="name"
|
||||
placeholder="Select a City"
|
||||
placeholder="选择城市"
|
||||
class="min-w-[200px]"
|
||||
/>
|
||||
|
||||
<DatePicker dateFormat="dd/mm/yy" />
|
||||
|
||||
<Button>PButton</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user