🔨 优化偏好处理逻辑.

This commit is contained in:
lijiahang
2025-01-13 11:01:11 +08:00
parent a734ec40ec
commit c481cb0ae4
6 changed files with 59 additions and 58 deletions

View File

@@ -47,7 +47,7 @@
<script lang="ts">
import { computed, defineComponent, watch } from 'vue';
import { TypeEnum, useFormProps, useFromEmits, useFormSetup } from './use-mixin';
import { TypeEnum, useFormProps, useFormSetup, useFromEmits } from './use-mixin';
export default defineComponent({
name: 'DayForm',
@@ -58,7 +58,7 @@
},
}),
emits: useFromEmits(),
setup(props, context) {
setup(props: any, context) {
const disabledChoice = computed(() => {
return (props.week && props.week !== '?') || props.disabled;
});

View File

@@ -170,7 +170,7 @@ export function useFormSetup(props: any, context: any, options: any) {
}));
// 输入框属性
const inputNumberAttrs = computed(() => ({
const inputNumberAttrs = computed<any>(() => ({
max: maxValue.value,
min: minValue.value,
precision: 0,

View File

@@ -55,7 +55,7 @@
},
}),
emits: useFromEmits(),
setup(props, context) {
setup(props: any, context) {
const disabledChoice = computed(() => {
return (props.day && props.day !== '?') || props.disabled;
});
@@ -81,13 +81,13 @@
return options;
});
const typeRangeSelectAttrs = computed(() => ({
const typeRangeSelectAttrs = computed<any>(() => ({
disabled: setup.typeRangeAttrs.value.disabled,
size: 'small',
class: ['w80'],
}));
const typeLoopSelectAttrs = computed(() => ({
const typeLoopSelectAttrs = computed<any>(() => ({
disabled: setup.typeLoopAttrs.value.disabled,
size: 'small',
class: ['w80'],