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); // }, 2000);
} }
function openTargetModal(index) { function openTargetModal(index: number) {
switch (index) { switch (index) {
case 1: case 1:
currentModal.value = Modal1; currentModal.value = Modal1 as ComponentOptions;
break; break;
case 2: case 2:
currentModal.value = Modal2; currentModal.value = Modal2 as ComponentOptions;
break; break;
case 3: case 3:
currentModal.value = Modal3; currentModal.value = Modal3 as ComponentOptions;
break; break;
default: default:
currentModal.value = Modal4; currentModal.value = Modal4 as ComponentOptions;
break; break;
} }
nextTick(() => { nextTick(() => {

View File

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