fix: 修复option禁用属性无效
style: input默认宽度与select对齐
This commit is contained in:
@@ -50,6 +50,7 @@ watch(
|
||||
)
|
||||
|
||||
const dialogStyle = computed(() => {
|
||||
console.log(unref(dialogHeight))
|
||||
return {
|
||||
height: unref(dialogHeight)
|
||||
}
|
||||
|
||||
@@ -226,6 +226,11 @@ export default defineComponent({
|
||||
vModel={formModel.value[item.field]}
|
||||
{...(autoSetPlaceholder && setTextPlaceholder(item))}
|
||||
{...setComponentProps(item)}
|
||||
style={
|
||||
item?.component === 'Input'
|
||||
? { width: '189.5px', ...item.componentProps?.style }
|
||||
: { ...item.componentProps?.style }
|
||||
}
|
||||
{...(notRenderOptions.includes(item?.component as string) &&
|
||||
item?.componentProps?.options
|
||||
? { options: item?.componentProps?.options || [] }
|
||||
|
||||
@@ -11,7 +11,12 @@ export const useRenderCheckbox = () => {
|
||||
typeof defineComponent
|
||||
>
|
||||
return item?.componentProps?.options?.map((option) => {
|
||||
return <Com label={option[labelAlias || 'value']}>{option[valueAlias || 'label']}</Com>
|
||||
const { value, ...other } = option
|
||||
return (
|
||||
<Com label={option[labelAlias || 'value']} {...other}>
|
||||
{option[valueAlias || 'label']}
|
||||
</Com>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,12 @@ export const useRenderRadio = () => {
|
||||
typeof defineComponent
|
||||
>
|
||||
return item?.componentProps?.options?.map((option) => {
|
||||
return <Com label={option[labelAlias || 'value']}>{option[valueAlias || 'label']}</Com>
|
||||
const { value, ...other } = option
|
||||
return (
|
||||
<Com label={option[labelAlias || 'value']} {...other}>
|
||||
{option[valueAlias || 'label']}
|
||||
</Com>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -456,6 +456,7 @@ const schema = reactive<FormSchema[]>([
|
||||
componentProps: {
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option1',
|
||||
value: '1'
|
||||
},
|
||||
@@ -494,6 +495,7 @@ const schema = reactive<FormSchema[]>([
|
||||
label: 'option1',
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option1-1',
|
||||
value: '1-1'
|
||||
},
|
||||
@@ -757,6 +759,7 @@ const schema = reactive<FormSchema[]>([
|
||||
componentProps: {
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option-1',
|
||||
value: '1'
|
||||
},
|
||||
@@ -774,6 +777,7 @@ const schema = reactive<FormSchema[]>([
|
||||
componentProps: {
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option-1',
|
||||
value: '1'
|
||||
},
|
||||
@@ -797,6 +801,7 @@ const schema = reactive<FormSchema[]>([
|
||||
componentProps: {
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option-1',
|
||||
value: '1'
|
||||
},
|
||||
@@ -819,6 +824,7 @@ const schema = reactive<FormSchema[]>([
|
||||
componentProps: {
|
||||
options: [
|
||||
{
|
||||
disabled: true,
|
||||
label: 'option-1',
|
||||
value: '1'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user