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
58195fc6
Commit
58195fc6
authored
Feb 04, 2017
by
杨奕
Committed by
baiyaaaaa
Feb 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dialog: add title slot (#2657)
parent
c5f9f65b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
examples/docs/en-US/dialog.md
examples/docs/en-US/dialog.md
+2
-1
examples/docs/zh-CN/dialog.md
examples/docs/zh-CN/dialog.md
+3
-2
packages/dialog/src/component.vue
packages/dialog/src/component.vue
+3
-1
No files found.
examples/docs/en-US/dialog.md
View file @
58195fc6
...
...
@@ -160,7 +160,7 @@ The content of Dialog can be anything, even a table or a form. This example show
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| title | title of Dialog
| string | — | —
|
| title | title of Dialog
. Can also be passed with a named slot (see the following table) | string | — | —
|
| size | size of Dialog | string | tiny/small/large/full | small |
| top | value for
`top`
of Dialog CSS, works when
`size`
is not
`full`
| string | — | 15% |
| modal | whether a mask is displayed | boolean | — | true |
...
...
@@ -175,6 +175,7 @@ The content of Dialog can be anything, even a table or a form. This example show
| Name | Description |
|------|--------|
| — | content of Dialog |
| title | content of the Dialog title |
| footer | content of the Dialog footer |
### Methods
...
...
examples/docs/zh-CN/dialog.md
View file @
58195fc6
...
...
@@ -179,9 +179,9 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
### Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| title | Dialog 的标题
| string | — | —
|
| title | Dialog 的标题
,也可通过具名 slot (见下表)传入 | string | — | —
|
| size | Dialog 的大小 | string | tiny/small/large/full | small |
| top | Dialog CSS 中的 top 值(仅在 size 不为 full 时有效) | string
| — | 15%
|
| top | Dialog CSS 中的 top 值(仅在 size 不为 full 时有效) | string
| — | 15%
|
| modal | 是否需要遮罩层 | boolean | — | true |
| lock-scroll | 是否在 Dialog 出现时将 body 滚动锁定 | boolean | — | true |
| custom-class | Dialog 的自定义类名 | string | — | — |
...
...
@@ -193,6 +193,7 @@ Dialog 组件的内容可以是任意的,甚至可以是表格或表单,下
| name | 说明 |
|------|--------|
| — | Dialog 的内容 |
| title | Dialog 标题区的内容 |
| footer | Dialog 按钮操作区的内容 |
### 方法
...
...
packages/dialog/src/component.vue
View file @
58195fc6
...
...
@@ -7,7 +7,9 @@
ref=
"dialog"
:style=
"style"
>
<div
class=
"el-dialog__header"
>
<span
class=
"el-dialog__title"
>
{{
title
}}
</span>
<slot
name=
"title"
>
<span
class=
"el-dialog__title"
>
{{
title
}}
</span>
</slot>
<div
class=
"el-dialog__headerbtn"
>
<i
v-if=
"showClose"
class=
"el-dialog__close el-icon el-icon-close"
@
click=
'close()'
></i>
</div>
...
...
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