Skip to content

Commit

Permalink
fix: update docs of dialog-box (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
James-9696 authored Feb 28, 2024
1 parent ed5f7a8 commit 8bfa624
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions examples/sites/demos/apis/dialog-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export default {
{
name: 'top',
type: 'string',
defaultValue: '15vh',
defaultValue: `'15vh'`,
desc: {
'zh-CN': '设置弹出框距离窗口顶部的高度',
'en-US': 'Set the height of the popup from the top of the window'
Expand All @@ -238,7 +238,7 @@ export default {
{
name: 'width',
type: 'string',
defaultValue: '500px',
defaultValue: `'500px'`,
desc: {
'zh-CN': '弹出框的宽度',
'en-US': 'Wideness of the dialog box that is displayed'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/dialog-box/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确定 </tiny-button>
<tiny-button @click="boxVisibility = false"> 取消 </tiny-button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/dialog-box/center.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" center title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<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%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<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%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<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">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<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">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
<tiny-alert description="内容是Alert组件"></tiny-alert>
<tiny-alert description="内容是 Alert 组件"></tiny-alert>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
<tiny-alert description="内容是Alert组件"></tiny-alert>
<tiny-alert description="内容是 Alert 组件"></tiny-alert>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<div>
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<div style="width: 100%; height: 100%; background: #dddddd">自定义footer区域</div>
<div style="width: 100%; height: 100%; background: #dddddd">自定义 footer 区域</div>
</template>
</tiny-dialog-box>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
<template #title>
<div style="width: 80%; height: 100%; background: #dddddd">自定义title区域</div>
<div style="width: 80%; height: 100%; background: #dddddd">自定义 title 区域</div>
</template>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<tiny-button @click="boxVisibility = true" title="弹出 Dialog">弹出 Dialog</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility" width="30%">
<template #title>
<div style="width: 80%; height: 100%; background: #dddddd">自定义title区域</div>
<div style="width: 80%; height: 100%; background: #dddddd">自定义 title 区域</div>
</template>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
</template>
</tiny-dialog-box>
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
</template>
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/dialog-box/dialog-top-height.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<tiny-button @click="boxVisibility1 = true" type="info">显示在顶部</tiny-button>
<tiny-button @click="boxVisibility2 = true">距离顶部 300px</tiny-button>
<tiny-dialog-box top="0" v-model:visible="boxVisibility1" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
</template>
</tiny-dialog-box>
<tiny-dialog-box top="300px" v-model:visible="boxVisibility2" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
</template>
</tiny-dialog-box>
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
</template>
Expand Down
4 changes: 2 additions & 2 deletions examples/sites/demos/pc/app/dialog-box/dialog-width.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<tiny-button @click="boxVisibility1 = true" type="info">宽度 30%</tiny-button>
<tiny-button @click="boxVisibility2 = true">宽度 60%</tiny-button>
<tiny-dialog-box v-model:visible="boxVisibility1" title="消息" width="30%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility1 = false">确 定</tiny-button>
</template>
</tiny-dialog-box>
<tiny-dialog-box v-model:visible="boxVisibility2" title="消息" width="60%">
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility2 = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<tiny-input v-model="input" clearable></tiny-input>
</div>
</template>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
</template>
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/dialog-box/draggable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<tiny-input v-model="input" clearable></tiny-input>
</div>
</template>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false"> 确 定 </tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@opened="opened"
@closed="closed"
>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@opened="opened"
@closed="closed"
>
<span>dialog-box内容</span>
<span>dialog-box 内容</span>
<template #footer>
<tiny-button type="primary" @click="boxVisibility = false">确 定</tiny-button>
</template>
Expand Down

0 comments on commit 8bfa624

Please sign in to comment.