resolver-egretimp-plus 0.1.59 → 0.1.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.59",
3
+ "version": "0.1.61",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -4,6 +4,8 @@
4
4
  v-for="option in props.options"
5
5
  :key="option.columnValue"
6
6
  :value="option.columnValue"
7
+ :disabled="option.columnStatus == '0' || option.columnStatus == '2'"
8
+
7
9
  >
8
10
  {{lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}}
9
11
  <template v-for="(_, key) in slots" :key="key" v-slot:[key]="scope">
@@ -11,6 +11,7 @@ import { useAttrs, computed, watch, nextTick, useSlots } from 'vue'
11
11
  import { commonPropsType, formatDate, isDate, hasOwn } from '../../utils/index.js'
12
12
  import { useFormItem } from 'element-plus'
13
13
  import dateIcon from '../icons/date.vue'
14
+ import dayjs from 'dayjs'
14
15
 
15
16
  const slots = useSlots()
16
17
  const { formItem: elFormItem } = useFormItem()
@@ -70,21 +71,17 @@ watch(value, () => {
70
71
  })
71
72
 
72
73
  const disabledDate = (date) => {
73
- let dateTime = formatDate(date, 'yyyy-MM-dd')
74
- const newDate = new Date(dateTime)
74
+ const currentDateStr = dayjs(date).format('YYYY-MM-DD')
75
+ const currentDateUnix = dayjs(currentDateStr).unix()
75
76
  if (props.min) {
76
- if (isDate(props.min) && props.min.getTime() > newDate.getTime()) {
77
- return true
78
- }
79
- if (typeof props.min === 'string' && new Date(props.min).getTime() > newDate.getTime()) {
77
+ const minUnix = dayjs(props.min).unix()
78
+ if (minUnix > currentDateUnix) {
80
79
  return true
81
80
  }
82
81
  }
83
82
  if (props.max) {
84
- if (isDate(props.max) && props.max.getTime() < newDate.getTime()) {
85
- return true
86
- }
87
- if (typeof props.max === 'string' && new Date(props.max).getTime() < newDate.getTime()) {
83
+ const maxUnix = dayjs(props.max).unix()
84
+ if (maxUnix < currentDateUnix) {
88
85
  return true
89
86
  }
90
87
  }