vue3-element-plus DatePicker type=week 设置从周一到周日展示

main.js

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

app
.use(ElementPlus, { locale: zhCn, })
.mount('#app')

页面

<el-date-picker
  class="wdh-200"
  v-model="filter.date"
  :clearable="false"
    type="week"
   format="第ww周"
  placeholder="选择周"
/>
 
<script setup>
import { reactive } from "vue";
import { dayjs } from 'element-plus';
dayjs.en.weekStart = 1;
 
const filter = reactive({
  date: dayjs()
})
 
</script>
 
 

 

posted @ 2023-05-31 16:21  凹润之之之  阅读(1479)  评论(0编辑  收藏  举报