|
@@ -396,26 +396,23 @@ const logout = () => {
|
|
|
|
|
|
let changeProfileRef = $ref<InstanceType<typeof MarkChangeProfile>>();
|
|
|
|
|
|
+// TODO: 应该是@typescript-eslint/no-unsafe-call不完美的搞法,导致了下面的调用会出错
|
|
|
+type ShowModalFunc = () => void;
|
|
|
+
|
|
|
const openProfileModal = () => {
|
|
|
- // https://github.com/vuejs/vue-next/issues/4397
|
|
|
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
|
- changeProfileRef?.showModal();
|
|
|
+ (changeProfileRef.showModal as ShowModalFunc)();
|
|
|
};
|
|
|
|
|
|
let switchGroupRef = $ref<InstanceType<typeof MarkSwitchGroupDialog>>();
|
|
|
|
|
|
const openSwitchGroupModal = () => {
|
|
|
- // https://github.com/vuejs/vue-next/issues/4397
|
|
|
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
|
- switchGroupRef?.showModal();
|
|
|
+ (switchGroupRef.showModal as ShowModalFunc)();
|
|
|
};
|
|
|
|
|
|
let problemRef = $ref<InstanceType<typeof MarkProblemDialog>>();
|
|
|
|
|
|
const openProblemModal = () => {
|
|
|
- // https://github.com/vuejs/vue-next/issues/4397
|
|
|
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
|
- problemRef?.showModal();
|
|
|
+ (problemRef.showModal as ShowModalFunc)();
|
|
|
};
|
|
|
|
|
|
watchEffect(() => {
|