mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-07 09:38:44 +08:00
fix: 🐛 修复 RootPortal 及 Picker 相关组件 type-check 错误的问题
This commit is contained in:
parent
44dec5acb1
commit
185929461c
@ -13,9 +13,7 @@
|
|||||||
:clickable="!disabled && !readonly"
|
:clickable="!disabled && !readonly"
|
||||||
:value-align="alignRight ? 'right' : 'left'"
|
:value-align="alignRight ? 'right' : 'left'"
|
||||||
:center="center"
|
:center="center"
|
||||||
:custom-class="`wd-calendar__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${error && 'is-error'} ${
|
:custom-class="cellClass"
|
||||||
!showValue ? 'wd-calendar__cell--placeholder' : ''
|
|
||||||
}`"
|
|
||||||
:custom-style="customStyle"
|
:custom-style="customStyle"
|
||||||
:custom-title-class="customLabelClass"
|
:custom-title-class="customLabelClass"
|
||||||
:custom-value-class="customValueClass"
|
:custom-value-class="customValueClass"
|
||||||
@ -263,6 +261,15 @@ const showValue = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const cellClass = computed(() => {
|
||||||
|
const classes = ['wd-calendar__cell']
|
||||||
|
if (props.disabled) classes.push('is-disabled')
|
||||||
|
if (props.readonly) classes.push('is-readonly')
|
||||||
|
if (props.error) classes.push('is-error')
|
||||||
|
if (!showValue.value) classes.push('wd-calendar__cell--placeholder')
|
||||||
|
return classes.join(' ')
|
||||||
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
|
|||||||
@ -11,9 +11,7 @@
|
|||||||
:rules="rules"
|
:rules="rules"
|
||||||
:clickable="!disabled && !readonly"
|
:clickable="!disabled && !readonly"
|
||||||
:value-align="alignRight ? 'right' : 'left'"
|
:value-align="alignRight ? 'right' : 'left'"
|
||||||
:custom-class="`wd-col-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${error && 'is-error'} ${
|
:custom-class="cellClass"
|
||||||
!showValue ? 'wd-col-picker__cell--placeholder' : ''
|
|
||||||
}`"
|
|
||||||
:custom-style="customStyle"
|
:custom-style="customStyle"
|
||||||
:custom-title-class="customLabelClass"
|
:custom-title-class="customLabelClass"
|
||||||
:custom-value-class="customValueClass"
|
:custom-value-class="customValueClass"
|
||||||
@ -158,6 +156,15 @@ const showValue = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const cellClass = computed(() => {
|
||||||
|
const classes = ['wd-col-picker__cell']
|
||||||
|
if (props.disabled) classes.push('is-disabled')
|
||||||
|
if (props.readonly) classes.push('is-readonly')
|
||||||
|
if (props.error) classes.push('is-error')
|
||||||
|
if (!showValue.value) classes.push('wd-col-picker__cell--placeholder')
|
||||||
|
return classes.join(' ')
|
||||||
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
:rules="rules"
|
:rules="rules"
|
||||||
:clickable="!disabled && !readonly"
|
:clickable="!disabled && !readonly"
|
||||||
:value-align="alignRight ? 'right' : 'left'"
|
:value-align="alignRight ? 'right' : 'left'"
|
||||||
:custom-class="`wd-datetime-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${error && 'is-error'}`"
|
:custom-class="cellClass"
|
||||||
:custom-style="customStyle"
|
:custom-style="customStyle"
|
||||||
:custom-title-class="customLabelClass"
|
:custom-title-class="customLabelClass"
|
||||||
:custom-value-class="customValueClass"
|
:custom-value-class="customValueClass"
|
||||||
@ -196,6 +196,14 @@ const hasConfirmed = ref<boolean>(false) // 判断用户是否点击了确认按
|
|||||||
const isLoading = ref<boolean>(false) // 加载
|
const isLoading = ref<boolean>(false) // 加载
|
||||||
const { proxy } = getCurrentInstance() as any
|
const { proxy } = getCurrentInstance() as any
|
||||||
|
|
||||||
|
const cellClass = computed(() => {
|
||||||
|
const classes = ['wd-datetime-picker__cell']
|
||||||
|
if (props.disabled) classes.push('is-disabled')
|
||||||
|
if (props.readonly) classes.push('is-readonly')
|
||||||
|
if (props.error) classes.push('is-error')
|
||||||
|
return classes.join(' ')
|
||||||
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val, oldVal) => {
|
(val, oldVal) => {
|
||||||
|
|||||||
@ -16,9 +16,7 @@
|
|||||||
:rules="rules"
|
:rules="rules"
|
||||||
:clickable="!disabled && !readonly"
|
:clickable="!disabled && !readonly"
|
||||||
:value-align="alignRight ? 'right' : 'left'"
|
:value-align="alignRight ? 'right' : 'left'"
|
||||||
:custom-class="`wd-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${error && 'is-error'} ${
|
:custom-class="cellClass"
|
||||||
!showValue ? 'wd-picker__cell--placeholder' : ''
|
|
||||||
}`"
|
|
||||||
:custom-style="customStyle"
|
:custom-style="customStyle"
|
||||||
:custom-title-class="customLabelClass"
|
:custom-title-class="customLabelClass"
|
||||||
:custom-value-class="customValueClass"
|
:custom-value-class="customValueClass"
|
||||||
@ -199,6 +197,15 @@ const showArrow = computed(() => {
|
|||||||
return !props.disabled && !props.readonly && !showClear.value
|
return !props.disabled && !props.readonly && !showClear.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const cellClass = computed(() => {
|
||||||
|
const classes = ['wd-picker__cell']
|
||||||
|
if (props.disabled) classes.push('is-disabled')
|
||||||
|
if (props.readonly) classes.push('is-readonly')
|
||||||
|
if (props.error) classes.push('is-error')
|
||||||
|
if (!showValue.value) classes.push('wd-picker__cell--placeholder')
|
||||||
|
return classes.join(' ')
|
||||||
|
})
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any
|
const { proxy } = getCurrentInstance() as any
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@ -29,6 +29,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script lang="ts" setup></script>
|
||||||
|
|
||||||
<!-- #ifdef APP-PLUS -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<script module="render" lang="renderjs">
|
<script module="render" lang="renderjs">
|
||||||
|
|||||||
@ -12,9 +12,7 @@
|
|||||||
:clickable="!disabled && !readonly"
|
:clickable="!disabled && !readonly"
|
||||||
:value-align="alignRight ? 'right' : 'left'"
|
:value-align="alignRight ? 'right' : 'left'"
|
||||||
:center="center"
|
:center="center"
|
||||||
:custom-class="`wd-select-picker__cell ${disabled && 'is-disabled'} ${readonly && 'is-readonly'} ${error && 'is-error'} ${
|
:custom-class="cellClass"
|
||||||
showValue ? '' : 'wd-select-picker__cell--placeholder'
|
|
||||||
}`"
|
|
||||||
:custom-style="customStyle"
|
:custom-style="customStyle"
|
||||||
:custom-title-class="customLabelClass"
|
:custom-title-class="customLabelClass"
|
||||||
:custom-value-class="customValueClass"
|
:custom-value-class="customValueClass"
|
||||||
@ -173,6 +171,15 @@ const showValue = computed(() => {
|
|||||||
return showValueTemp
|
return showValueTemp
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const cellClass = computed(() => {
|
||||||
|
const classes = ['wd-select-picker__cell']
|
||||||
|
if (props.disabled) classes.push('is-disabled')
|
||||||
|
if (props.readonly) classes.push('is-readonly')
|
||||||
|
if (props.error) classes.push('is-error')
|
||||||
|
if (!showValue.value) classes.push('wd-select-picker__cell--placeholder')
|
||||||
|
return classes.join(' ')
|
||||||
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(newValue) => {
|
(newValue) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user