Bladeren bron

fix:修复排班管理没有默认显示数据的问题

yangyi 4 maanden geleden
bovenliggende
commit
4bd83fa280
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. 2 1
      src/main.ts
  2. 1 1
      src/view/admin/AdminScheduleListView.vue

+ 2 - 1
src/main.ts

@@ -1,6 +1,7 @@
 import { createApp } from 'vue'
 import ElementPlus from 'element-plus'
 import 'element-plus/dist/index.css'
+import zhCn from 'element-plus/es/locale/lang/zh-cn'
 import './style.css'
 import App from './App.vue'
 import router from "./router";
@@ -11,6 +12,6 @@ const app = createApp(App)
 const pinia = createPinia()
 pinia.use(piniaPluginPersistedState)
 app.use(router)
-app.use(ElementPlus)
+app.use(ElementPlus, { locale: zhCn })
 app.use(pinia)
 app.mount('#app')

+ 1 - 1
src/view/admin/AdminScheduleListView.vue

@@ -74,7 +74,7 @@ import type { List2Params, ScheduleDto } from '@/api/models'
 
 const schedules = ref<Schedule[]>([])
 const loading = ref(false)
-const currentMonth = ref('')
+const currentMonth = ref(new Date().toISOString().slice(0, 7))
 const createVisible = ref(false)
 const scheduleForm = reactive({
   designerName: '',