瀏覽代碼

chore: update 1.8.5

xingyu4j 2 年之前
父節點
當前提交
2de05a87f4

+ 1 - 1
yudao-ui-admin-vue3/package.json

@@ -1,6 +1,6 @@
 {
   "name": "ruoyi-vue-pro-vue3",
-  "version": "1.6.4.1841",
+  "version": "1.6.4.1851",
   "description": "基于vue3、vite3、element-plus、typesScript",
   "author": "xingyu",
   "private": false,

+ 3 - 7
yudao-ui-admin-vue3/src/components/Form/src/Form.vue

@@ -226,11 +226,7 @@ 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 }
-                  }
+                  style={item.componentProps?.style}
                   {...(notRenderOptions.includes(item?.component as string) &&
                   item?.componentProps?.options
                     ? { options: item?.componentProps?.options || [] }
@@ -258,8 +254,8 @@ export default defineComponent({
           return renderRadioOptions(item)
         case 'Checkbox':
         case 'CheckboxButton':
-          const { renderChcekboxOptions } = useRenderCheckbox()
-          return renderChcekboxOptions(item)
+          const { renderCheckboxOptions } = useRenderCheckbox()
+          return renderCheckboxOptions(item)
         default:
           break
       }

+ 4 - 4
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderCheckbox.tsx

@@ -3,7 +3,7 @@ import { ElCheckbox, ElCheckboxButton } from 'element-plus'
 import { defineComponent } from 'vue'
 
 export const useRenderCheckbox = () => {
-  const renderChcekboxOptions = (item: FormSchema) => {
+  const renderCheckboxOptions = (item: FormSchema) => {
     // 如果有别名,就取别名
     const labelAlias = item?.componentProps?.optionsAlias?.labelField
     const valueAlias = item?.componentProps?.optionsAlias?.valueField
@@ -13,14 +13,14 @@ export const useRenderCheckbox = () => {
     return item?.componentProps?.options?.map((option) => {
       const { ...other } = option
       return (
-        <Com label={option[labelAlias || 'value']} {...other}>
-          {option[valueAlias || 'label']}
+        <Com {...other} label={option[valueAlias || 'value']}>
+          {option[labelAlias || 'label']}
         </Com>
       )
     })
   }
 
   return {
-    renderChcekboxOptions
+    renderCheckboxOptions
   }
 }

+ 2 - 2
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderRadio.tsx

@@ -13,8 +13,8 @@ export const useRenderRadio = () => {
     return item?.componentProps?.options?.map((option) => {
       const { ...other } = option
       return (
-        <Com label={option[labelAlias || 'value']} {...other}>
-          {option[valueAlias || 'label']}
+        <Com {...other} label={option[valueAlias || 'value']}>
+          {option[labelAlias || 'label']}
         </Com>
       )
     })

+ 1 - 1
yudao-ui-admin-vue3/src/components/Form/src/components/useRenderSelect.tsx

@@ -36,9 +36,9 @@ export const useRenderSelect = (slots: Slots) => {
 
     return (
       <ElOption
+        {...other}
         label={labelAlias ? option[labelAlias] : label}
         value={valueAlias ? option[valueAlias] : value}
-        {...other}
       >
         {{
           default: () =>