Browse Source

🐛修复一波

shaogen1995 7 months ago
parent
commit
cff28acb0e

+ 3 - 0
后台管理/src/assets/styles/base.css

@@ -180,3 +180,6 @@ textarea {
   max-height: 500px !important;
   overflow-y: auto !important;
 }
+.ant-picker-dropdown {
+  text-align: center;
+}

+ 5 - 0
后台管理/src/assets/styles/base.less

@@ -285,3 +285,8 @@ textarea {
   max-height: 500px !important;
   overflow-y: auto !important;
 }
+
+// 多日期选择器居中 挡住 按钮(即必须失焦才能点击确定)
+.ant-picker-dropdown {
+  text-align: center;
+}

+ 3 - 3
后台管理/src/pages/A2orderSet/A2NoTime.tsx

@@ -1,4 +1,4 @@
-import React, { useCallback, useEffect, useState } from 'react'
+import React, { useCallback, useEffect, useRef, useState } from 'react'
 import styles from './index.module.scss'
 import { Button, DatePicker, Modal } from 'antd'
 import MyPopconfirm from '@/components/MyPopconfirm'
@@ -54,12 +54,12 @@ function A2NoTime({ baseTime, closeFu, editFu, num }: Props) {
         multiple
         onChange={onChange}
         maxTagCount='responsive'
-        value={value ? value.map(v => dayjs(`${dayjs().year()}-${v}`)) : null}
+        value={value ? value.map(v => dayjs(`${dayjs().year()}-${v}`)) : []}
         size='large'
         allowClear={false}
         format='MM月DD日'
         disabledDate={disabledDate}
-        needConfirm={true}
+        // needConfirm={true}
       />
 
       <div className='A2Nbtn'>

+ 1 - 1
后台管理/src/pages/A2orderSet/A2timeFlag.tsx

@@ -28,7 +28,7 @@ function A2timeFlag({ info, closeFu }: Props) {
   const btnClick = useCallback(
     (val: number) => {
       if (val === info.num)
-        return MessageFu.info(`当前已经是${info.num ? '' : ''}可预约状态!`)
+        return MessageFu.info(`当前已经是${info.num ? '' : ''}可预约状态!`)
       closeFu(val as 0)
     },
     [closeFu, info.num]