Commit 2de05a87f4e039712eb7f642bef6b5e3451aef6f

Authored by xingyu4j
1 parent d4d6f667

chore: update 1.8.5

yudao-ui-admin-vue3/package.json
1 1 {
2 2 "name": "ruoyi-vue-pro-vue3",
3   - "version": "1.6.4.1841",
  3 + "version": "1.6.4.1851",
4 4 "description": "基于vue3、vite3、element-plus、typesScript",
5 5 "author": "xingyu",
6 6 "private": false,
... ...
yudao-ui-admin-vue3/src/components/Form/src/Form.vue
... ... @@ -226,11 +226,7 @@ export default defineComponent({
226 226 vModel={formModel.value[item.field]}
227 227 {...(autoSetPlaceholder && setTextPlaceholder(item))}
228 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 230 {...(notRenderOptions.includes(item?.component as string) &&
235 231 item?.componentProps?.options
236 232 ? { options: item?.componentProps?.options || [] }
... ... @@ -258,8 +254,8 @@ export default defineComponent({
258 254 return renderRadioOptions(item)
259 255 case 'Checkbox':
260 256 case 'CheckboxButton':
261   - const { renderChcekboxOptions } = useRenderCheckbox()
262   - return renderChcekboxOptions(item)
  257 + const { renderCheckboxOptions } = useRenderCheckbox()
  258 + return renderCheckboxOptions(item)
263 259 default:
264 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 3 import { defineComponent } from 'vue'
4 4  
5 5 export const useRenderCheckbox = () => {
6   - const renderChcekboxOptions = (item: FormSchema) => {
  6 + const renderCheckboxOptions = (item: FormSchema) => {
7 7 // 如果有别名,就取别名
8 8 const labelAlias = item?.componentProps?.optionsAlias?.labelField
9 9 const valueAlias = item?.componentProps?.optionsAlias?.valueField
... ... @@ -13,14 +13,14 @@ export const useRenderCheckbox = () => {
13 13 return item?.componentProps?.options?.map((option) => {
14 14 const { ...other } = option
15 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 18 </Com>
19 19 )
20 20 })
21 21 }
22 22  
23 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 = () =&gt; {
13 13 return item?.componentProps?.options?.map((option) => {
14 14 const { ...other } = option
15 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 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) =&gt; {
36 36  
37 37 return (
38 38 <ElOption
  39 + {...other}
39 40 label={labelAlias ? option[labelAlias] : label}
40 41 value={valueAlias ? option[valueAlias] : value}
41   - {...other}
42 42 >
43 43 {{
44 44 default: () =>
... ...