@coreui/vue-pro 4.10.0 → 4.10.1
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/dist/index.es.js +9 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/date-range-picker/CDateRangePicker.ts +4 -2
- package/src/components/smart-pagination/CSmartPagination.ts +20 -5
- package/src/components/time-picker/CTimePicker.ts +4 -2
package/package.json
CHANGED
|
@@ -477,7 +477,9 @@ const CDateRangePicker = defineComponent({
|
|
|
477
477
|
const maxDate = ref(props.maxDate && new Date(props.maxDate))
|
|
478
478
|
const minDate = ref(props.minDate && new Date(props.minDate))
|
|
479
479
|
const selectEndDate = ref(false)
|
|
480
|
-
const isValid = ref
|
|
480
|
+
const isValid = ref<boolean | undefined>(
|
|
481
|
+
props.valid ?? (props.invalid === true ? false : undefined),
|
|
482
|
+
)
|
|
481
483
|
const isMobile = ref(false)
|
|
482
484
|
|
|
483
485
|
onMounted(() => {
|
|
@@ -487,7 +489,7 @@ const CDateRangePicker = defineComponent({
|
|
|
487
489
|
watch(
|
|
488
490
|
() => [props.valid, props.invalid],
|
|
489
491
|
() => {
|
|
490
|
-
isValid.value = props.valid
|
|
492
|
+
isValid.value = props.valid ?? (props.invalid === true ? false : undefined)
|
|
491
493
|
},
|
|
492
494
|
)
|
|
493
495
|
|
|
@@ -140,11 +140,26 @@ const CSmartPagination = defineComponent({
|
|
|
140
140
|
const limit = ref(props.limit)
|
|
141
141
|
const pages = ref(props.pages)
|
|
142
142
|
|
|
143
|
-
watch(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
watch(
|
|
144
|
+
() => props.activePage,
|
|
145
|
+
() => {
|
|
146
|
+
activePage.value = props.activePage
|
|
147
|
+
},
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
watch(
|
|
151
|
+
() => props.limit,
|
|
152
|
+
() => {
|
|
153
|
+
limit.value = props.limit
|
|
154
|
+
},
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
watch(
|
|
158
|
+
() => props.pages,
|
|
159
|
+
() => {
|
|
160
|
+
pages.value = props.pages
|
|
161
|
+
},
|
|
162
|
+
)
|
|
148
163
|
|
|
149
164
|
const showDots = computed(() => {
|
|
150
165
|
return props.dots && limit.value > 4 && limit.value < pages.value
|
|
@@ -293,7 +293,9 @@ const CTimePicker = defineComponent({
|
|
|
293
293
|
listOfSeconds: [],
|
|
294
294
|
hour12: false,
|
|
295
295
|
})
|
|
296
|
-
const isValid = ref
|
|
296
|
+
const isValid = ref<boolean | undefined>(
|
|
297
|
+
props.valid ?? (props.invalid === true ? false : undefined),
|
|
298
|
+
)
|
|
297
299
|
|
|
298
300
|
watch(
|
|
299
301
|
() => props.time,
|
|
@@ -305,7 +307,7 @@ const CTimePicker = defineComponent({
|
|
|
305
307
|
watch(
|
|
306
308
|
() => [props.valid, props.invalid],
|
|
307
309
|
() => {
|
|
308
|
-
isValid.value = props.valid
|
|
310
|
+
isValid.value = props.valid ?? (props.invalid === true ? false : undefined)
|
|
309
311
|
},
|
|
310
312
|
)
|
|
311
313
|
|