Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
7497dcb8
Commit
7497dcb8
authored
Sep 16, 2017
by
杨奕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dialog.md
parent
7f91a0c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
examples/docs/zh-CN/dialog.md
examples/docs/zh-CN/dialog.md
+7
-2
No files found.
examples/docs/zh-CN/dialog.md
View file @
7497dcb8
...
@@ -235,9 +235,10 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
...
@@ -235,9 +235,10 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
:::
:::
### 居中布局
### 居中布局
标题和底部采用居中布局
:::demo 将
`center`
设置为
`true`
即可使标题和底部居中,同时为了防止破坏内容的布局,内容默认是不居中的
标题和底部可水平居中
:::demo 将
`center`
设置为
`true`
即可使标题和底部居中。
```
html
```
html
<el-button
type=
"text"
@
click=
"centerDialogVisible = true"
>
点击打开 Dialog
</el-button>
<el-button
type=
"text"
@
click=
"centerDialogVisible = true"
>
点击打开 Dialog
</el-button>
...
@@ -266,6 +267,10 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
...
@@ -266,6 +267,10 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
```
```
:::
:::
:::tip
`center`
仅影响标题和底部区域。Dialog 的内容是任意的,在一些情况下,内容并不适合居中布局。如果需要内容也水平居中,请自行为其添加 CSS。
:::
:::tip
:::tip
如果
`visible`
属性绑定的变量位于 Vuex 的 store 内,那么
`.sync`
不会正常工作。此时需要去除
`.sync`
修饰符,同时监听 Dialog 的
`open`
和
`close`
事件,在事件回调中执行 Vuex 中对应的 mutation 更新
`visible`
属性绑定的变量的值。
如果
`visible`
属性绑定的变量位于 Vuex 的 store 内,那么
`.sync`
不会正常工作。此时需要去除
`.sync`
修饰符,同时监听 Dialog 的
`open`
和
`close`
事件,在事件回调中执行 Vuex 中对应的 mutation 更新
`visible`
属性绑定的变量的值。
:::
:::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment