forked from opentiny/tiny-vue
fix: update docs of dialog-box (#1434)
This commit is contained in:
parent
ed5f7a8769
commit
8bfa624a9e
|
@ -216,7 +216,7 @@ export default {
|
||||||
{
|
{
|
||||||
name: 'top',
|
name: 'top',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
defaultValue: '15vh',
|
defaultValue: `'15vh'`,
|
||||||
desc: {
|
desc: {
|
||||||
'zh-CN': '设置弹出框距离窗口顶部的高度',
|
'zh-CN': '设置弹出框距离窗口顶部的高度',
|
||||||
'en-US': 'Set the height of the popup from the top of the window'
|
'en-US': 'Set the height of the popup from the top of the window'
|
||||||
|
@ -238,7 +238,7 @@ export default {
|
||||||
{
|
{
|
||||||
name: 'width',
|
name: 'width',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
defaultValue: '500px',
|
defaultValue: `'500px'`,
|
||||||
desc: {
|
desc: {
|
||||||
'zh-CN': '弹出框的宽度',
|
'zh-CN': '弹出框的宽度',
|
||||||
'en-US': 'Wideness of the dialog box that is displayed'
|
'en-US': 'Wideness of the dialog box that is displayed'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
|
||||||
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
|
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
|
||||||
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
|
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" :close-on-click-modal="false" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" :close-on-click-modal="false" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" :close-on-click-modal="false" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" :close-on-click-modal="false" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box :visible="boxVisibility" :close-on-press-escape="false" title="消息" width="30%" @close="close">
|
<tiny-dialog-box :visible="boxVisibility" :close-on-press-escape="false" title="消息" width="30%" @close="close">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box :visible="boxVisibility" :close-on-press-escape="false" title="消息" width="30%" @close="close">
|
<tiny-dialog-box :visible="boxVisibility" :close-on-press-escape="false" title="消息" width="30%" @close="close">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
||||||
<tiny-alert description="内容是Alert组件"></tiny-alert>
|
<tiny-alert description="内容是 Alert 组件"></tiny-alert>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
||||||
<tiny-alert description="内容是Alert组件"></tiny-alert>
|
<tiny-alert description="内容是 Alert 组件"></tiny-alert>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
<div>
|
<div>
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div style="width: 100%; height: 100%; background: #dddddd">自定义footer区域</div>
|
<div style="width: 100%; height: 100%; background: #dddddd">自定义 footer 区域</div>
|
||||||
</template>
|
</template>
|
||||||
</tiny-dialog-box>
|
</tiny-dialog-box>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div style="width: 80%; height: 100%; background: #dddddd">自定义title区域</div>
|
<div style="width: 80%; height: 100%; background: #dddddd">自定义 title 区域</div>
|
||||||
</template>
|
</template>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
|
||||||
<template #title>
|
<template #title>
|
||||||
<div style="width: 80%; height: 100%; background: #dddddd">自定义title区域</div>
|
<div style="width: 80%; height: 100%; background: #dddddd">自定义 title 区域</div>
|
||||||
</template>
|
</template>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
|
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
|
||||||
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
|
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
|
||||||
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
|
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
</tiny-dialog-box>
|
</tiny-dialog-box>
|
||||||
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
|
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
|
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
|
||||||
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
|
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
|
||||||
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
|
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
</tiny-dialog-box>
|
</tiny-dialog-box>
|
||||||
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
|
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
|
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
|
||||||
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
|
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
</tiny-dialog-box>
|
</tiny-dialog-box>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
|
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
|
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
|
||||||
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
|
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
|
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
</tiny-dialog-box>
|
</tiny-dialog-box>
|
||||||
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
|
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<tiny-input v-model="input" clearable></tiny-input>
|
<tiny-input v-model="input" clearable></tiny-input>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<tiny-input v-model="input" clearable></tiny-input>
|
<tiny-input v-model="input" clearable></tiny-input>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
@opened="opened"
|
@opened="opened"
|
||||||
@closed="closed"
|
@closed="closed"
|
||||||
>
|
>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
@opened="opened"
|
@opened="opened"
|
||||||
@closed="closed"
|
@closed="closed"
|
||||||
>
|
>
|
||||||
<span>dialog-box内容</span>
|
<span>dialog-box 内容</span>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue