chore(demo): 消除ts类型错误

This commit is contained in:
invalid w
2023-10-10 12:07:26 +08:00
parent f5ce480f0f
commit a73187ccf4
2 changed files with 6 additions and 8 deletions

View File

@@ -76,19 +76,19 @@
// }, 2000);
}
function openTargetModal(index) {
function openTargetModal(index: number) {
switch (index) {
case 1:
currentModal.value = Modal1;
currentModal.value = Modal1 as ComponentOptions;
break;
case 2:
currentModal.value = Modal2;
currentModal.value = Modal2 as ComponentOptions;
break;
case 3:
currentModal.value = Modal3;
currentModal.value = Modal3 as ComponentOptions;
break;
default:
currentModal.value = Modal4;
currentModal.value = Modal4 as ComponentOptions;
break;
}
nextTick(() => {

View File

@@ -9,9 +9,7 @@
<hr class="my-4" />
<div class="flex">
<a-input v-model:value="server" disabled>
<template #addonBefore> 服务地址 </template>
</a-input>
<a-input v-model:value="server" addon-before="服务地址" disabled />
<a-button :type="getIsOpen ? 'danger' : 'primary'" @click="toggle">
{{ getIsOpen ? '关闭连接' : '开启连接' }}
</a-button>