Commit 2de05a87f4e039712eb7f642bef6b5e3451aef6f
1 parent
d4d6f667
chore: update 1.8.5
Showing
5 changed files
with
11 additions
and
15 deletions
yudao-ui-admin-vue3/package.json
| 1 | { | 1 | { |
| 2 | "name": "ruoyi-vue-pro-vue3", | 2 | "name": "ruoyi-vue-pro-vue3", |
| 3 | - "version": "1.6.4.1841", | 3 | + "version": "1.6.4.1851", |
| 4 | "description": "基于vue3、vite3、element-plus、typesScript", | 4 | "description": "基于vue3、vite3、element-plus、typesScript", |
| 5 | "author": "xingyu", | 5 | "author": "xingyu", |
| 6 | "private": false, | 6 | "private": false, |
yudao-ui-admin-vue3/src/components/Form/src/Form.vue
| @@ -226,11 +226,7 @@ export default defineComponent({ | @@ -226,11 +226,7 @@ export default defineComponent({ | ||
| 226 | vModel={formModel.value[item.field]} | 226 | vModel={formModel.value[item.field]} |
| 227 | {...(autoSetPlaceholder && setTextPlaceholder(item))} | 227 | {...(autoSetPlaceholder && setTextPlaceholder(item))} |
| 228 | {...setComponentProps(item)} | 228 | {...setComponentProps(item)} |
| 229 | - style={ | ||
| 230 | - item?.component === 'Input' | ||
| 231 | - ? { width: '189.5px', ...item.componentProps?.style } | ||
| 232 | - : { ...item.componentProps?.style } | ||
| 233 | - } | 229 | + style={item.componentProps?.style} |
| 234 | {...(notRenderOptions.includes(item?.component as string) && | 230 | {...(notRenderOptions.includes(item?.component as string) && |
| 235 | item?.componentProps?.options | 231 | item?.componentProps?.options |
| 236 | ? { options: item?.componentProps?.options || [] } | 232 | ? { options: item?.componentProps?.options || [] } |
| @@ -258,8 +254,8 @@ export default defineComponent({ | @@ -258,8 +254,8 @@ export default defineComponent({ | ||
| 258 | return renderRadioOptions(item) | 254 | return renderRadioOptions(item) |
| 259 | case 'Checkbox': | 255 | case 'Checkbox': |
| 260 | case 'CheckboxButton': | 256 | case 'CheckboxButton': |
| 261 | - const { renderChcekboxOptions } = useRenderCheckbox() | ||
| 262 | - return renderChcekboxOptions(item) | 257 | + const { renderCheckboxOptions } = useRenderCheckbox() |
| 258 | + return renderCheckboxOptions(item) | ||
| 263 | default: | 259 | default: |
| 264 | break | 260 | break |
| 265 | } | 261 | } |
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderCheckbox.tsx
| @@ -3,7 +3,7 @@ import { ElCheckbox, ElCheckboxButton } from 'element-plus' | @@ -3,7 +3,7 @@ import { ElCheckbox, ElCheckboxButton } from 'element-plus' | ||
| 3 | import { defineComponent } from 'vue' | 3 | import { defineComponent } from 'vue' |
| 4 | 4 | ||
| 5 | export const useRenderCheckbox = () => { | 5 | export const useRenderCheckbox = () => { |
| 6 | - const renderChcekboxOptions = (item: FormSchema) => { | 6 | + const renderCheckboxOptions = (item: FormSchema) => { |
| 7 | // 如果有别名,就取别名 | 7 | // 如果有别名,就取别名 |
| 8 | const labelAlias = item?.componentProps?.optionsAlias?.labelField | 8 | const labelAlias = item?.componentProps?.optionsAlias?.labelField |
| 9 | const valueAlias = item?.componentProps?.optionsAlias?.valueField | 9 | const valueAlias = item?.componentProps?.optionsAlias?.valueField |
| @@ -13,14 +13,14 @@ export const useRenderCheckbox = () => { | @@ -13,14 +13,14 @@ export const useRenderCheckbox = () => { | ||
| 13 | return item?.componentProps?.options?.map((option) => { | 13 | return item?.componentProps?.options?.map((option) => { |
| 14 | const { ...other } = option | 14 | const { ...other } = option |
| 15 | return ( | 15 | return ( |
| 16 | - <Com label={option[labelAlias || 'value']} {...other}> | ||
| 17 | - {option[valueAlias || 'label']} | 16 | + <Com {...other} label={option[valueAlias || 'value']}> |
| 17 | + {option[labelAlias || 'label']} | ||
| 18 | </Com> | 18 | </Com> |
| 19 | ) | 19 | ) |
| 20 | }) | 20 | }) |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | return { | 23 | return { |
| 24 | - renderChcekboxOptions | 24 | + renderCheckboxOptions |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderRadio.tsx
| @@ -13,8 +13,8 @@ export const useRenderRadio = () => { | @@ -13,8 +13,8 @@ export const useRenderRadio = () => { | ||
| 13 | return item?.componentProps?.options?.map((option) => { | 13 | return item?.componentProps?.options?.map((option) => { |
| 14 | const { ...other } = option | 14 | const { ...other } = option |
| 15 | return ( | 15 | return ( |
| 16 | - <Com label={option[labelAlias || 'value']} {...other}> | ||
| 17 | - {option[valueAlias || 'label']} | 16 | + <Com {...other} label={option[valueAlias || 'value']}> |
| 17 | + {option[labelAlias || 'label']} | ||
| 18 | </Com> | 18 | </Com> |
| 19 | ) | 19 | ) |
| 20 | }) | 20 | }) |
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderSelect.tsx
| @@ -36,9 +36,9 @@ export const useRenderSelect = (slots: Slots) => { | @@ -36,9 +36,9 @@ export const useRenderSelect = (slots: Slots) => { | ||
| 36 | 36 | ||
| 37 | return ( | 37 | return ( |
| 38 | <ElOption | 38 | <ElOption |
| 39 | + {...other} | ||
| 39 | label={labelAlias ? option[labelAlias] : label} | 40 | label={labelAlias ? option[labelAlias] : label} |
| 40 | value={valueAlias ? option[valueAlias] : value} | 41 | value={valueAlias ? option[valueAlias] : value} |
| 41 | - {...other} | ||
| 42 | > | 42 | > |
| 43 | {{ | 43 | {{ |
| 44 | default: () => | 44 | default: () => |