chore: demo ts (#8160)

* chore: demo ts

* chore: fix
This commit is contained in:
neverland
2021-02-14 19:50:45 +08:00
committed by GitHub
parent 8cbf153073
commit a8060bb599
20 changed files with 96 additions and 79 deletions
+4 -3
View File
@@ -27,10 +27,11 @@
</demo-block>
</template>
<script>
<script lang="ts">
import { ref } from 'vue';
import { useTranslate } from '@demo/use-translate';
import Dialog from '..';
import { DialogAction } from 'types/dialog';
const i18n = {
'zh-CN': {
@@ -93,8 +94,8 @@ export default {
};
const onClickBeforeClose = () => {
const beforeClose = (action) =>
new Promise((resolve) => {
const beforeClose = (action: DialogAction) =>
new Promise<boolean>((resolve) => {
setTimeout(() => resolve(action === 'confirm'), 1000);
});