-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(comp: tabs): error style when nesting tabs
fix #913
- Loading branch information
1 parent
c20fe45
commit aea6e3d
Showing
3 changed files
with
125 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,22 @@ | ||
<template> | ||
<IxSpace> | ||
<IxButton @click="visible = !visible">Change visible</IxButton> | ||
<IxButton mode="primary" @click="openModal">Open modal</IxButton> | ||
</IxSpace> | ||
<IxModal v-model:visible="visible" title="This is title" type="confirm" @ok="onOk"> | ||
<p>Some contents...</p> | ||
<IxButton mode="primary" @click="showModal">Open Modal with async logic</IxButton> | ||
<IxModal v-model:visible="visible" title="标题" type="confirm" :onOk="onOk"> | ||
<p>内容文本...</p> | ||
</IxModal> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { h, ref } from 'vue' | ||
import { useModal } from '@idux/components/modal' | ||
import { ref } from 'vue' | ||
const visible = ref(false) | ||
const onOk = () => | ||
new Promise(resolve => { | ||
const isClose = Math.random() > 0.5 | ||
setTimeout(() => resolve(isClose), 1000) | ||
setTimeout(() => { | ||
resolve(true) | ||
}, 1000) | ||
}) | ||
const { confirm } = useModal() | ||
const content = h('p', 'Some contents...') | ||
const openModal = () => confirm({ title: 'This is title', content, onOk }) | ||
const showModal = () => { | ||
visible.value = true | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters