diff --git a/yudao-ui-admin-vue3/src/components/ConfigGlobal/src/ConfigGlobal.vue b/yudao-ui-admin-vue3/src/components/ConfigGlobal/src/ConfigGlobal.vue index da6f8c710..0a55f1523 100644 --- a/yudao-ui-admin-vue3/src/components/ConfigGlobal/src/ConfigGlobal.vue +++ b/yudao-ui-admin-vue3/src/components/ConfigGlobal/src/ConfigGlobal.vue @@ -14,7 +14,7 @@ const { variables } = useDesign() const appStore = useAppStore() const props = defineProps({ - size: propTypes.oneOf(['default', 'small', 'large']).def('default') + size: propTypes.oneOf(['default', 'small', 'large']).def('default') }) provide('configGlobal', props) diff --git a/yudao-ui-admin-vue3/src/components/UploadFile/index.ts b/yudao-ui-admin-vue3/src/components/UploadFile/index.ts new file mode 100644 index 000000000..d851bdde1 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/UploadFile/index.ts @@ -0,0 +1,3 @@ +import UploadImg from './src/UploadImg.vue' + +export { UploadImg } diff --git a/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue new file mode 100644 index 000000000..fd85b7198 --- /dev/null +++ b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue @@ -0,0 +1,169 @@ + + + diff --git a/yudao-ui-admin-vue3/src/views/system/oauth2/client/client.data.ts b/yudao-ui-admin-vue3/src/views/system/oauth2/client/client.data.ts index 562b94314..c284cf5c2 100644 --- a/yudao-ui-admin-vue3/src/views/system/oauth2/client/client.data.ts +++ b/yudao-ui-admin-vue3/src/views/system/oauth2/client/client.data.ts @@ -12,7 +12,6 @@ export const rules = reactive({ clientId: [required], secret: [required], name: [required], - logo: [required], status: [required], accessTokenValiditySeconds: [required], refreshTokenValiditySeconds: [required], diff --git a/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue b/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue index 4d16e044f..43ba60595 100644 --- a/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue +++ b/yudao-ui-admin-vue3/src/views/system/oauth2/client/index.vue @@ -61,7 +61,11 @@ v-if="['create', 'update'].includes(actionType)" :schema="allSchemas.formSchema" :rules="rules" - /> + > + + () // 表单 Ref const detailRef = ref() // 详情 Ref - +const uploadLogo = ref('') // 设置标题 const setDialogTile = (type: string) => { dialogTitle.value = t('action.' + type) @@ -169,6 +174,7 @@ const setDialogTile = (type: string) => { // 新增操作 const handleCreate = () => { + uploadLogo.value = '' setDialogTile('create') } @@ -177,6 +183,7 @@ const handleUpdate = async (rowId: number) => { setDialogTile('update') // 设置数据 const res = await ClientApi.getOAuth2ClientApi(rowId) + uploadLogo.value = res.logo unref(formRef)?.setValues(res) } @@ -202,6 +209,7 @@ const submitForm = async () => { // 提交请求 try { const data = unref(formRef)?.formModel as ClientApi.OAuth2ClientVO + data.logo = uploadLogo.value if (actionType.value === 'create') { await ClientApi.createOAuth2ClientApi(data) message.success(t('common.createSuccess'))