docs: update disabled prop/demo for dialog

Change-Id: I7eaa2da3d5f1d62b874c6a6282d4cd38229bdeda
This commit is contained in:
xiaodemen 2021-04-29 17:33:17 +08:00 committed by GU Yiling
parent 41ecb7a893
commit c738f7e8ca
4 changed files with 75 additions and 20 deletions

View File

@ -28,6 +28,10 @@
[[ demo src="/demo/dialog/stack.vue" ]] [[ demo src="/demo/dialog/stack.vue" ]]
### Loading or Disabled
[[ demo src="/demo/dialog/status.vue" ]]
## API ## API
### 属性 ### 属性
@ -45,6 +49,7 @@
| `inline` | `boolean=` | `false` | 是否内联在内容中显示并占用内容空间。 | | `inline` | `boolean=` | `false` | 是否内联在内容中显示并占用内容空间。 |
| `footless` | `boolean=` | `false` | 是否不显示默认的底部操作栏。 | | `footless` | `boolean=` | `false` | 是否不显示默认的底部操作栏。 |
| `loading` | `boolean=` | `false` | 是否处于加载状态。处于加载状态时确定按钮也将进入加载状态,无法点击。 | | `loading` | `boolean=` | `false` | 是否处于加载状态。处于加载状态时确定按钮也将进入加载状态,无法点击。 |
| `disabled` | `boolean=` | `false` | 是否处于禁用状态。处于加载状态时确定按钮也将进入禁用状态,无法点击。 |
| `priority` | `number=` | - | 对话框浮层层叠权重,参考 [`Overlay`](./overlay) 组件的 [`priority`](./overlay#props) 属性。 | | `priority` | `number=` | - | 对话框浮层层叠权重,参考 [`Overlay`](./overlay) 组件的 [`priority`](./overlay#props) 属性。 |
| `before-close` | `function(string): boolean=|Promise<boolean=>` | - | [^before-close] | | `before-close` | `function(string): boolean=|Promise<boolean=>` | - | [^before-close] |
| `overlay-class` | `string|Object=` | - | 对话框浮层根元素类名,参考 [`Overlay`](./overlay) 组件的 [`overlay-class`](./overlay#props) 属性。 | | `overlay-class` | `string|Object=` | - | 对话框浮层根元素类名,参考 [`Overlay`](./overlay) 组件的 [`overlay-class`](./overlay#props) 属性。 |

View File

@ -0,0 +1,50 @@
<template>
<article>
<div class="op-wrap">
<veui-button @click="aOpen = true">
Open Dialog
</veui-button>
<veui-checkbox v-model="loading">Loading</veui-checkbox>
<veui-checkbox class="ml-3p" v-model="disabled">Disabled</veui-checkbox>
</div>
<veui-dialog
:open.sync="aOpen"
title="Dialog A"
:loading="loading"
:disabled="disabled"
>
The content of Dialog A.
</veui-dialog>
</article>
</template>
<script>
import { Dialog, Button, Checkbox } from 'veui'
export default {
components: {
'veui-dialog': Dialog,
'veui-button': Button,
'veui-checkbox': Checkbox
},
data () {
return {
aOpen: false,
disabled: false,
loading: false
}
}
}
</script>
<style lang="less" scoped docs>
.veui-button {
margin-right: 20px;
}
.op-wrap {
display: flex;
}
.ml-3p {
margin-left: 12px;
}
</style>

32
package-lock.json generated
View File

@ -15685,9 +15685,9 @@
} }
}, },
"veui": { "veui": {
"version": "2.0.0-beta.30", "version": "2.0.0-beta.31",
"resolved": "https://registry.npmjs.org/veui/-/veui-2.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/veui/-/veui-2.0.0-beta.31.tgz",
"integrity": "sha512-IuS2U4o7Q63261aWYq/vCO7XPJXBQj8VmsacXSHYuQDyjk3B8KsdBMRztyX8fcVcrQ/QYO/J7uckOOctltSucA==", "integrity": "sha512-p5WRssWeTbc4uPPmr3mmH2wEfVDFmQNihrgX2l84CbqPNsINt/+Ym4socOx9QJOXazpwLCFOUMFp2z/JJ8nvCQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"bytes": "^3.0.0", "bytes": "^3.0.0",
@ -15702,17 +15702,17 @@
}, },
"dependencies": { "dependencies": {
"core-js": { "core-js": {
"version": "3.11.0", "version": "3.11.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.11.0.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.11.1.tgz",
"integrity": "sha512-bd79DPpx+1Ilh9+30aT5O1sgpQd4Ttg8oqkqi51ZzhedMM1omD2e6IOF48Z/DzDCZ2svp49tN/3vneTK6ZBkXw==", "integrity": "sha512-k93Isqg7e4txZWMGNYwevZL9MiogLk8pd1PtwrmFmi8IBq4GXqUaVW/a33Llt6amSI36uSjd0GWwc9pTT9ALlQ==",
"dev": true "dev": true
} }
} }
}, },
"veui-loader": { "veui-loader": {
"version": "2.0.0-beta.30", "version": "2.0.0-beta.31",
"resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/veui-loader/-/veui-loader-2.0.0-beta.31.tgz",
"integrity": "sha512-L64Yih82u7gFvONroj6ha6rNty1AyRB8lc0BfOjkmCJ9f5HIpOkD2N09CxTBbJ04t3h6/mhzD42Qeg/hfvz3cQ==", "integrity": "sha512-wNAiATalSsfE3pyKHdnLp8wHDP0k0Bjg2J6vDrz1/1FBalct9dhFZeH6JIYzmCt/VCG42plFj194oxslwBXXJA==",
"dev": true, "dev": true,
"requires": { "requires": {
"loader-utils": "^2.0.0", "loader-utils": "^2.0.0",
@ -15802,9 +15802,9 @@
} }
}, },
"veui-theme-dls": { "veui-theme-dls": {
"version": "2.0.0-beta.30", "version": "2.0.0-beta.31",
"resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls/-/veui-theme-dls-2.0.0-beta.31.tgz",
"integrity": "sha512-Yi+m3F1RT80vM2W3C+BgtDF2yeqEQYo/YG5ejiKc5GqkK0Ri7XMao+O8vXQ0JlDs+ZNrYfC5mhPeJfnXft58xQ==", "integrity": "sha512-4Od6VuSfmevBSQJdO5xcmEoQoETav4Q2kWEZlwzPsrZdRfI1amV8SqguhevYyBHFfNiRRHQ/mGFWYoyDFuyvkw==",
"dev": true, "dev": true,
"requires": { "requires": {
"classlist-polyfill": "^1.2.0", "classlist-polyfill": "^1.2.0",
@ -15812,7 +15812,7 @@
"focus-visible": "^4.1.0", "focus-visible": "^4.1.0",
"less-plugin-dls": "^1.0.0-alpha.36", "less-plugin-dls": "^1.0.0-alpha.36",
"less-plugin-est": "^3.0.0", "less-plugin-est": "^3.0.0",
"veui-theme-dls-icons": "^2.0.0-beta.30" "veui-theme-dls-icons": "^2.0.0-beta.31"
}, },
"dependencies": { "dependencies": {
"dls-icons-vue": { "dls-icons-vue": {
@ -15824,9 +15824,9 @@
} }
}, },
"veui-theme-dls-icons": { "veui-theme-dls-icons": {
"version": "2.0.0-beta.30", "version": "2.0.0-beta.31",
"resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.0.0-beta.30.tgz", "resolved": "https://registry.npmjs.org/veui-theme-dls-icons/-/veui-theme-dls-icons-2.0.0-beta.31.tgz",
"integrity": "sha512-j4SzSWCuYPnv79S0YM7AOkiV0HrI5cZIfYDL7w2puTu5FudUMtF/nSLJSakhQLtAl8g9uGlp7KYQj/mvT0Fn0w==", "integrity": "sha512-RR/a3FenLXqTfi55aDIxkGdcTjUJgLCu03WV+TpM/z+rGEaZhg1++Y5xfqekD9nus9D4l9ywh1uL1Gh29VVKmQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"dls-icons-vue": "^0.24.0" "dls-icons-vue": "^0.24.0"

View File

@ -68,10 +68,10 @@
"stylus-loader": "^3.0.2", "stylus-loader": "^3.0.2",
"unist-util-remove": "^1.0.1", "unist-util-remove": "^1.0.1",
"unist-util-visit": "^1.4.0", "unist-util-visit": "^1.4.0",
"veui": "^2.0.0-beta.30", "veui": "^2.0.0-beta.31",
"veui-loader": "^2.0.0-beta.30", "veui-loader": "^2.0.0-beta.31",
"veui-theme-dls": "^2.0.0-beta.30", "veui-theme-dls": "^2.0.0-beta.31",
"veui-theme-dls-icons": "^2.0.0-beta.30", "veui-theme-dls-icons": "^2.0.0-beta.31",
"vue-awesome": "^4.1.0", "vue-awesome": "^4.1.0",
"vue-i18n": "^8.16.0", "vue-i18n": "^8.16.0",
"vue-windows": "^0.2.4" "vue-windows": "^0.2.4"