fix: style code

pull/86/head
xingyu4j 2025-04-29 22:25:19 +08:00
parent e2a31c1c2b
commit 84584a6fd9
3 changed files with 12 additions and 11 deletions

View File

@ -4,6 +4,7 @@ import ImageUpload from '#/components/upload/image-upload.vue';
export const useImagesUpload = () => { export const useImagesUpload = () => {
return defineComponent({ return defineComponent({
name: 'ImagesUpload',
props: { props: {
multiple: { multiple: {
type: Boolean, type: Boolean,
@ -20,6 +21,5 @@ export const useImagesUpload = () => {
<ImageUpload maxNumber={props.maxNumber} multiple={props.multiple} /> <ImageUpload maxNumber={props.maxNumber} multiple={props.multiple} />
); );
}, },
name: 'ImagesUpload',
}); });
}; };

View File

@ -1,11 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Recordable } from '@vben/types'; import type { Recordable } from '@vben/types';
import { $t } from '@vben/locales';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { useVbenForm, z } from '#/adapter/form'; import { useVbenForm, z } from '#/adapter/form';
import { updateUserPassword } from '#/api/system/user/profile'; import { updateUserPassword } from '#/api/system/user/profile';
import { $t } from '@vben/locales';
const [Form, formApi] = useVbenForm({ const [Form, formApi] = useVbenForm({
commonConfig: { commonConfig: {

View File

@ -2,26 +2,27 @@
import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { SystemSocialUserApi } from '#/api/system/social/user'; import type { SystemSocialUserApi } from '#/api/system/social/user';
import { computed, onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';
import { Button, Card, Image, message, Modal } from 'ant-design-vue'; import { Button, Card, Image, message, Modal } from 'ant-design-vue';
import { computed, ref, onMounted } from 'vue';
import { useRoute } from 'vue-router';
import { $t } from '#/locales';
import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { useVbenVxeGrid } from '#/adapter/vxe-table';
import { socialAuthRedirect } from '#/api/core/auth';
import { import {
getBindSocialUserList, getBindSocialUserList,
socialUnbind,
socialBind, socialBind,
socialUnbind,
} from '#/api/system/social/user'; } from '#/api/system/social/user';
import { socialAuthRedirect } from '#/api/core/auth'; import { $t } from '#/locales';
import { DICT_TYPE, getDictLabel } from '#/utils/dict';
import { SystemUserSocialTypeEnum } from '#/utils/constants'; import { SystemUserSocialTypeEnum } from '#/utils/constants';
import { DICT_TYPE, getDictLabel } from '#/utils/dict';
const route = useRoute();
const emit = defineEmits<{ const emit = defineEmits<{
(e: 'update:activeName', v: string): void; (e: 'update:activeName', v: string): void;
}>(); }>();
const route = useRoute();
/** 已经绑定的平台 */ /** 已经绑定的平台 */
const bindList = ref<SystemSocialUserApi.SocialUser[]>([]); const bindList = ref<SystemSocialUserApi.SocialUser[]>([]);
const allBindList = computed<any[]>(() => { const allBindList = computed<any[]>(() => {
@ -126,8 +127,7 @@ async function onBind(bind: any) {
try { try {
// redirectUri // redirectUri
// tricky: type encode getUrlValue() 使 // tricky: type encode getUrlValue() 使
const redirectUri = const redirectUri = `${location.origin}/profile?${encodeURIComponent(`type=${type}`)}`;
location.origin + '/profile?' + encodeURIComponent(`type=${type}`);
// //
window.location.href = await socialAuthRedirect(type, redirectUri); window.location.href = await socialAuthRedirect(type, redirectUri);