Jelajahi Sumber

feat: (dashborad) datepicker

gemercheung 2 tahun lalu
induk
melakukan
f3fb448e45

+ 5 - 5
src/views/dashboard/analysis/enterprise.vue

@@ -108,9 +108,9 @@
           lg: 24,
           md: 24,
           xl: 12,
-          xxl: 5,
+          xxl: 12,
           // xl: 5,
-          // xxl: 5,
+          // xxl: 12,
         },
       },
       {
@@ -121,7 +121,7 @@
           lg: 24,
           md: 24,
           xl: 12,
-          xxl: 5,
+          xxl: 12,
         },
         componentProps: {
           api: listRoomsApi,
@@ -149,7 +149,7 @@
           lg: 24,
           md: 24,
           xl: 12,
-          xxl: 5,
+          xxl: 12,
         },
         componentProps: {
           api: ListLiveApi,
@@ -173,7 +173,7 @@
           lg: 24,
           md: 24,
           xl: 12,
-          xxl: 5,
+          xxl: 12,
         },
         componentProps: {
           disabledDate(current) {

+ 5 - 1
src/views/dashboard/analysis/index.vue

@@ -54,6 +54,8 @@
   import { listRoomsApi } from '/@/api/scene/list';
   import { formatToDate } from '/@/utils/dateUtil';
   import dayjs from 'dayjs';
+  import 'dayjs/locale/zh-cn';
+  import locale from 'ant-design-vue/es/date-picker/locale/zh_CN';
 
   const today = formatToDate(dayjs(new Date()));
   const priorDate = formatToDate(dayjs(new Date().setDate(new Date().getDate() - 30)));
@@ -120,12 +122,14 @@
         field: 'time',
         label: '时间段',
         component: 'RangePicker',
-        defaultValue: [priorDate, today],
+        // defaultValue: [priorDate, today],
         colProps: {
           xl: 16,
           xxl: 16,
         },
         componentProps: {
+          // mode: 'date',
+          locale: locale,
           disabledDate(current) {
             // console.log('current', current, date);
             return current && current > dayjs().endOf('day');