feat:ComponentInternalInstance 类型适配
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
"globals": {
|
"globals": {
|
||||||
"Component": true,
|
"Component": true,
|
||||||
"ComponentPublicInstance": true,
|
"ComponentPublicInstance": true,
|
||||||
|
"ComponentInternalInstance": true,
|
||||||
"ComputedRef": true,
|
"ComputedRef": true,
|
||||||
"EffectScope": true,
|
"EffectScope": true,
|
||||||
"ExtractDefaultPropTypes": true,
|
"ExtractDefaultPropTypes": true,
|
||||||
|
2
src/auto-import.d.ts
vendored
2
src/auto-import.d.ts
vendored
@@ -66,6 +66,6 @@ declare global {
|
|||||||
// for type re-export
|
// for type re-export
|
||||||
declare global {
|
declare global {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
export type { Component, ComponentPublicInstance, ComponentInternalInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||||
import('vue')
|
import('vue')
|
||||||
}
|
}
|
||||||
|
13
src/env.d.ts
vendored
13
src/env.d.ts
vendored
@@ -1,4 +1,6 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
import type download from '@/components/crud/index';
|
||||||
|
import type useDict from '@/utils/dict';
|
||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import { DefineComponent } from 'vue';
|
import { DefineComponent } from 'vue';
|
||||||
@@ -6,6 +8,16 @@ declare module '*.vue' {
|
|||||||
const component: DefineComponent<{}, {}, any>;
|
const component: DefineComponent<{}, {}, any>;
|
||||||
export default component;
|
export default component;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export {};
|
||||||
|
declare module 'vue' {
|
||||||
|
interface ComponentCustomProperties {
|
||||||
|
// 调整成你要使用到的属性,在这里进行注册
|
||||||
|
download: typeof download;
|
||||||
|
useDict: typeof useDict;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_API_BASE_URL: string;
|
readonly VITE_API_BASE_URL: string;
|
||||||
}
|
}
|
||||||
@@ -25,6 +37,7 @@ declare global {
|
|||||||
export type {
|
export type {
|
||||||
Component,
|
Component,
|
||||||
ComponentPublicInstance,
|
ComponentPublicInstance,
|
||||||
|
ComponentInternalInstance,
|
||||||
ComputedRef,
|
ComputedRef,
|
||||||
InjectionKey,
|
InjectionKey,
|
||||||
PropType,
|
PropType,
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
} from '@/api/common/dashboard';
|
} from '@/api/common/dashboard';
|
||||||
import { DataRecord, get } from '@/api/system/announcement';
|
import { DataRecord, get } from '@/api/system/announcement';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { announcement_type } = proxy.useDict('announcement_type');
|
const { announcement_type } = proxy.useDict('announcement_type');
|
||||||
|
|
||||||
const dataList = ref<DashboardAnnouncementRecord[]>([]);
|
const dataList = ref<DashboardAnnouncementRecord[]>([]);
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
import { encryptByRsa } from '@/utils/encrypt';
|
import { encryptByRsa } from '@/utils/encrypt';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
import { EmailLoginReq } from '@/api/auth';
|
import { EmailLoginReq } from '@/api/auth';
|
||||||
import { getMailCaptcha } from '@/api/common/captcha';
|
import { getMailCaptcha } from '@/api/common/captcha';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
*/
|
*/
|
||||||
const handleSendCaptcha = () => {
|
const handleSendCaptcha = () => {
|
||||||
if (captchaLoading.value) return;
|
if (captchaLoading.value) return;
|
||||||
proxy.$refs.formRef.validateField('email', (valid: any) => {
|
proxy!.$refs.formRef.validateField('email', (valid: any) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
captchaLoading.value = true;
|
captchaLoading.value = true;
|
||||||
captchaBtnNameKey.value = 'login.captcha.ing';
|
captchaBtnNameKey.value = 'login.captcha.ing';
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
resetCaptcha();
|
resetCaptcha();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
proxy.$message.success(res.msg);
|
proxy!.$message.success(res.msg);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
resetCaptcha();
|
resetCaptcha();
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
...othersQuery,
|
...othersQuery,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
proxy.$notification.success(t('login.success'));
|
proxy!.$notification.success(t('login.success'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
form.value.captcha = '';
|
form.value.captcha = '';
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
import { PhoneLoginReq } from '@/api/auth';
|
import { PhoneLoginReq } from '@/api/auth';
|
||||||
import { BehaviorCaptchaReq, getSmsCaptcha } from '@/api/common/captcha';
|
import { BehaviorCaptchaReq, getSmsCaptcha } from '@/api/common/captcha';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
import { isLogin } from '@/utils/auth';
|
import { isLogin } from '@/utils/auth';
|
||||||
import { bindSocial } from '@/api/system/user-center';
|
import { bindSocial } from '@/api/system/user-center';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
router.push({
|
router.push({
|
||||||
name: (redirect as string) || 'Workplace',
|
name: (redirect as string) || 'Workplace',
|
||||||
});
|
});
|
||||||
proxy.$notification.success(t('login.success'));
|
proxy!.$notification.success(t('login.success'));
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
router.push({
|
router.push({
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
tab: 'security-setting',
|
tab: 'security-setting',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
proxy.$message.success(res.msg);
|
proxy!.$message.success(res.msg);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
router.push({
|
router.push({
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
listLoginLog,
|
listLoginLog,
|
||||||
} from '@/api/monitor/log';
|
} from '@/api/monitor/log';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { success_failure_status_enum } = proxy.useDict(
|
const { success_failure_status_enum } = proxy!.useDict(
|
||||||
'success_failure_status_enum',
|
'success_failure_status_enum',
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
proxy.$refs.queryRef.resetFields();
|
proxy!.$refs.queryRef.resetFields();
|
||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -5,9 +5,9 @@
|
|||||||
listOperationLog,
|
listOperationLog,
|
||||||
} from '@/api/monitor/log';
|
} from '@/api/monitor/log';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { success_failure_status_enum } = proxy.useDict(
|
const { success_failure_status_enum } = proxy.useDict(
|
||||||
'success_failure_status_enum'
|
'success_failure_status_enum',
|
||||||
);
|
);
|
||||||
|
|
||||||
const operationLogList = ref<OperationLogRecord[]>([]);
|
const operationLogList = ref<OperationLogRecord[]>([]);
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
import VueJsonPretty from 'vue-json-pretty';
|
import VueJsonPretty from 'vue-json-pretty';
|
||||||
import 'vue-json-pretty/lib/styles.css';
|
import 'vue-json-pretty/lib/styles.css';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { copy, copied } = useClipboard();
|
const { copy, copied } = useClipboard();
|
||||||
const systemLogList = ref<SystemLogRecord[]>([]);
|
const systemLogList = ref<SystemLogRecord[]>([]);
|
||||||
const systemLog = ref<SystemLogDetailRecord>({
|
const systemLog = ref<SystemLogDetailRecord>({
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
};
|
};
|
||||||
watch(copied, () => {
|
watch(copied, () => {
|
||||||
if (copied.value) {
|
if (copied.value) {
|
||||||
proxy.$message.success('复制成功');
|
proxy!.$message.success('复制成功');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
const resetQuery = () => {
|
const resetQuery = () => {
|
||||||
proxy.$refs.queryRef.resetFields();
|
proxy!.$refs.queryRef.resetFields();
|
||||||
handleQuery();
|
handleQuery();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
@@ -10,8 +10,8 @@
|
|||||||
} from '@/api/system/announcement';
|
} from '@/api/system/announcement';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { announcement_type, announcement_status_enum } = proxy.useDict(
|
const { announcement_type, announcement_status_enum } = proxy!.useDict(
|
||||||
'announcement_type',
|
'announcement_type',
|
||||||
'announcement_status_enum',
|
'announcement_status_enum',
|
||||||
);
|
);
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
*/
|
*/
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
form.value = {};
|
form.value = {};
|
||||||
proxy.$refs.formRef?.resetFields();
|
proxy.$refs.formRef.resetFields();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
import { upload } from '@/api/common';
|
import { upload } from '@/api/common';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const isEdit = ref(false);
|
const isEdit = ref(false);
|
||||||
const logoFile = ref<FileItem>({ uid: '-1' });
|
const logoFile = ref<FileItem>({ uid: '-1' });
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { TreeNodeData, TableData } from '@arco-design/web-vue';
|
import { TreeNodeData, TableData, TableInstance } from '@arco-design/web-vue';
|
||||||
import {
|
import {
|
||||||
DataRecord,
|
DataRecord,
|
||||||
ListParam,
|
ListParam,
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
import { listDeptTree } from '@/api/common';
|
import { listDeptTree } from '@/api/common';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
const { dis_enable_status_enum } = proxy!.useDict('dis_enable_status_enum');
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const dataDetail = ref<DataRecord>({});
|
const dataDetail = ref<DataRecord>({});
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataList.value = res.data;
|
dataList.value = res.data;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
proxy.$refs.tableRef.expandAll();
|
(proxy!.$refs.tableRef as TableInstance).expandAll();
|
||||||
}, 0);
|
}, 0);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
import dictItem from './item.vue';
|
import dictItem from './item.vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const colors = ref(['primary', 'success', 'warning', 'error', 'default']);
|
const colors = ref(['primary', 'success', 'warning', 'error', 'default']);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {});
|
const props = withDefaults(defineProps<Props>(), {});
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
type Form = { name: string };
|
type Form = { name: string };
|
||||||
const form: Form = reactive({
|
const form: Form = reactive({
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
} from '../../components/index';
|
} from '../../components/index';
|
||||||
import 'viewerjs/dist/viewer.css';
|
import 'viewerjs/dist/viewer.css';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const fileStore = useFileStore();
|
const fileStore = useFileStore();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
import { listMenuTree } from '@/api/common';
|
import { listMenuTree } from '@/api/common';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { DataRecord, ListParam, list, del, read } from '@/api/system/message';
|
import { DataRecord, ListParam, list, del, read } from '@/api/system/message';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { message_type_enum } = proxy.useDict('message_type_enum');
|
const { message_type_enum } = proxy.useDict('message_type_enum');
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const dataDetail = ref<DataRecord>({
|
const dataDetail = ref<DataRecord>({
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
import { listMenuTree, listDeptTree } from '@/api/common';
|
import { listMenuTree, listDeptTree } from '@/api/common';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { data_scope_enum, dis_enable_status_enum } = proxy.useDict(
|
const { data_scope_enum, dis_enable_status_enum } = proxy.useDict(
|
||||||
'data_scope_enum',
|
'data_scope_enum',
|
||||||
'dis_enable_status_enum',
|
'dis_enable_status_enum',
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
*/
|
*/
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
if (loading.value) return;
|
if (loading.value) return;
|
||||||
proxy.$refs.formRef.validate((valid: any) => {
|
proxy!.$refs.formRef.validate((valid: any) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
updateBasicInfo({
|
updateBasicInfo({
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
* 重置
|
* 重置
|
||||||
*/
|
*/
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
proxy.$refs.formRef.resetFields();
|
proxy!.$refs.formRef.resetFields();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
} from '@/api/system/user-center';
|
} from '@/api/system/user-center';
|
||||||
import { socialAuth } from '@/api/auth';
|
import { socialAuth } from '@/api/auth';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const socialBinds = ref<UserSocialBindRecord[]>([]);
|
const socialBinds = ref<UserSocialBindRecord[]>([]);
|
||||||
const giteeSocial = ref<UserSocialBindRecord>();
|
const giteeSocial = ref<UserSocialBindRecord>();
|
||||||
const githubSocial = ref<UserSocialBindRecord>();
|
const githubSocial = ref<UserSocialBindRecord>();
|
||||||
@@ -18,10 +18,10 @@
|
|||||||
listSocial().then((res) => {
|
listSocial().then((res) => {
|
||||||
socialBinds.value = res.data;
|
socialBinds.value = res.data;
|
||||||
giteeSocial.value = socialBinds.value.find(
|
giteeSocial.value = socialBinds.value.find(
|
||||||
(item) => item.source === 'GITEE'
|
(item) => item.source === 'GITEE',
|
||||||
);
|
);
|
||||||
githubSocial.value = socialBinds.value.find(
|
githubSocial.value = socialBinds.value.find(
|
||||||
(item) => item.source === 'GITHUB'
|
(item) => item.source === 'GITHUB',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
const handleBind = (source: string, sourceDescription: string) => {
|
const handleBind = (source: string, sourceDescription: string) => {
|
||||||
const isBind = socialBinds.value.some((item) => item.source === source);
|
const isBind = socialBinds.value.some((item) => item.source === source);
|
||||||
if (isBind) {
|
if (isBind) {
|
||||||
proxy.$modal.warning({
|
proxy!.$modal.warning({
|
||||||
title: `确认解除和${sourceDescription}平台的三方账号绑定吗?`,
|
title: `确认解除和${sourceDescription}平台的三方账号绑定吗?`,
|
||||||
titleAlign: 'start',
|
titleAlign: 'start',
|
||||||
content: '解除绑定后,将无法使用该第三方账户登录到此账号',
|
content: '解除绑定后,将无法使用该第三方账户登录到此账号',
|
||||||
@@ -44,13 +44,13 @@
|
|||||||
onOk: () => {
|
onOk: () => {
|
||||||
unbindSocial(source).then((res) => {
|
unbindSocial(source).then((res) => {
|
||||||
list();
|
list();
|
||||||
proxy.$message.success(res.msg);
|
proxy!.$message.success(res.msg);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
proxy.$modal.info({
|
proxy!.$modal.info({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
titleAlign: 'start',
|
titleAlign: 'start',
|
||||||
content: `确认和${sourceDescription}平台的三方账号绑定吗?`,
|
content: `确认和${sourceDescription}平台的三方账号绑定吗?`,
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { encryptByRsa } from '@/utils/encrypt';
|
import { encryptByRsa } from '@/utils/encrypt';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const captchaTime = ref(60);
|
const captchaTime = ref(60);
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { encryptByRsa } from '@/utils/encrypt';
|
import { encryptByRsa } from '@/utils/encrypt';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const captchaTime = ref(60);
|
const captchaTime = ref(60);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
import { useUserStore } from '@/store';
|
import { useUserStore } from '@/store';
|
||||||
import { encryptByRsa } from '@/utils/encrypt';
|
import { encryptByRsa } from '@/utils/encrypt';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
import { VueCropper } from 'vue-cropper';
|
import { VueCropper } from 'vue-cropper';
|
||||||
import 'vue-cropper/dist/index.css';
|
import 'vue-cropper/dist/index.css';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const cropperRef = ref();
|
const cropperRef = ref();
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
import getAvatar from '@/utils/avatar';
|
import getAvatar from '@/utils/avatar';
|
||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
generate,
|
generate,
|
||||||
} from '@/api/tool/generator';
|
} from '@/api/tool/generator';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { form_type_enum, query_type_enum } = proxy.useDict(
|
const { form_type_enum, query_type_enum } = proxy.useDict(
|
||||||
'form_type_enum',
|
'form_type_enum',
|
||||||
'query_type_enum',
|
'query_type_enum',
|
||||||
|
Reference in New Issue
Block a user