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
d851615b
Commit
d851615b
authored
Jan 09, 2017
by
baiyaaaaa
Committed by
GitHub
Jan 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2256 from QingWei-Li/feat/popover/disabled
Popover: add disabled feature, close #2221
parents
8ddc0489
d3a9cf8f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
7 deletions
+10
-7
examples/docs/en-US/popover.md
examples/docs/en-US/popover.md
+1
-0
examples/docs/en-US/tooltip.md
examples/docs/en-US/tooltip.md
+4
-4
examples/docs/zh-CN/popover.md
examples/docs/zh-CN/popover.md
+1
-0
examples/docs/zh-CN/tooltip.md
examples/docs/zh-CN/tooltip.md
+2
-2
packages/popover/src/main.vue
packages/popover/src/main.vue
+2
-1
No files found.
examples/docs/en-US/popover.md
View file @
d851615b
...
@@ -212,6 +212,7 @@ Of course, you can nest other operations. It's more light-weight than using a di
...
@@ -212,6 +212,7 @@ Of course, you can nest other operations. It's more light-weight than using a di
| content | popover content, can be replaced with a default
`slot`
| string | — | — |
| content | popover content, can be replaced with a default
`slot`
| string | — | — |
| width | popover width | string, number | — | Min width 150px |
| width | popover width | string, number | — | Min width 150px |
| placement | popover placement | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
| placement | popover placement | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
| disabled | whether Popover is disabled | boolean | — | false |
| value(v-model) | whether popover is visible | Boolean | — | false |
| value(v-model) | whether popover is visible | Boolean | — | false |
| offset | popover offset | number | — | 0 |
| offset | popover offset | number | — | 0 |
| transition | popover transition animation | string | — | fade-in-linear |
| transition | popover transition animation | string | — | fade-in-linear |
...
...
examples/docs/en-US/tooltip.md
View file @
d851615b
...
@@ -113,12 +113,12 @@ Tooltip has 9 placements.
...
@@ -113,12 +113,12 @@ Tooltip has 9 placements.
.item
{
.item
{
margin
:
4px
;
margin
:
4px
;
}
}
.left
.el-tooltip__popper
,
.left
.el-tooltip__popper
,
.right
.el-tooltip__popper
{
.right
.el-tooltip__popper
{
padding
:
8px
10px
;
padding
:
8px
10px
;
}
}
.el-button
{
.el-button
{
width
:
110px
;
width
:
110px
;
}
}
...
@@ -145,7 +145,7 @@ Tooltip has two themes: `dark` and `light`。
...
@@ -145,7 +145,7 @@ Tooltip has two themes: `dark` and `light`。
### More Content
### More Content
Display multiple lines of text and set their format.
Display multiple lines of text and set their format.
:::demo Override attribute
`content`
of
`el-tooltip`
by adding a slot named
`content`
.
:::demo Override attribute
`content`
of
`el-tooltip`
by adding a slot named
`content`
.
```
html
```
html
...
@@ -170,7 +170,7 @@ In fact, Tooltip is an extension based on [Vue-popper](https://github.com/elemen
...
@@ -170,7 +170,7 @@ In fact, Tooltip is an extension based on [Vue-popper](https://github.com/elemen
```
html
```
html
<template>
<template>
<el-tooltip
:disabled=
"disabled"
content=
"click to close tooltip function"
placement=
"bottom"
effect=
"light"
>
<el-tooltip
:disabled=
"disabled"
content=
"click to close tooltip function"
placement=
"bottom"
effect=
"light"
>
<el-button
@
click=
"disabled
=true"
>
click to close
tooltip function
</el-button>
<el-button
@
click=
"disabled
= !disabled"
>
click to {{disabled ? 'active' : 'close'}}
tooltip function
</el-button>
</el-tooltip>
</el-tooltip>
</template>
</template>
...
...
examples/docs/zh-CN/popover.md
View file @
d851615b
...
@@ -239,6 +239,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的
...
@@ -239,6 +239,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的
| content | 显示的内容,也可以通过
`slot`
传入 DOM | String | — | — |
| content | 显示的内容,也可以通过
`slot`
传入 DOM | String | — | — |
| width | 宽度 | String, Number | — | 最小宽度 150px |
| width | 宽度 | String, Number | — | 最小宽度 150px |
| placement | 出现位置 | String | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
| placement | 出现位置 | String | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
| disabled | Popover 是否可用 | Boolean | — | false |
| value(v-model) | 状态是否可见 | Boolean | — | false |
| value(v-model) | 状态是否可见 | Boolean | — | false |
| offset | 出现位置的偏移量 | Number | — | 0 |
| offset | 出现位置的偏移量 | Number | — | 0 |
| transition | 定义渐变动画 | String | — | fade-in-linear |
| transition | 定义渐变动画 | String | — | fade-in-linear |
...
...
examples/docs/zh-CN/tooltip.md
View file @
d851615b
...
@@ -134,7 +134,7 @@
...
@@ -134,7 +134,7 @@
.item
{
.item
{
margin
:
4px
;
margin
:
4px
;
}
}
.left
.el-tooltip__popper
,
.left
.el-tooltip__popper
,
.right
.el-tooltip__popper
{
.right
.el-tooltip__popper
{
padding
:
8px
10px
;
padding
:
8px
10px
;
...
@@ -189,7 +189,7 @@ Tooltip 组件提供了两个不同的主题:`dark`和`light`。
...
@@ -189,7 +189,7 @@ Tooltip 组件提供了两个不同的主题:`dark`和`light`。
```
html
```
html
<template>
<template>
<el-tooltip
:disabled=
"disabled"
content=
"点击关闭 tooltip 功能"
placement=
"bottom"
effect=
"light"
>
<el-tooltip
:disabled=
"disabled"
content=
"点击关闭 tooltip 功能"
placement=
"bottom"
effect=
"light"
>
<el-button
@
click=
"disabled =
true"
>
点击关闭
tooltip 功能
</el-button>
<el-button
@
click=
"disabled =
!disabled"
>
点击{{disabled ? '开启' : '关闭'}}
tooltip 功能
</el-button>
</el-tooltip>
</el-tooltip>
</template>
</template>
```
```
...
...
packages/popover/src/main.vue
View file @
d851615b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
class=
"el-popover"
class=
"el-popover"
:class=
"[popperClass]"
:class=
"[popperClass]"
ref=
"popper"
ref=
"popper"
v-show=
"showPopper"
v-show=
"
!disabled &&
showPopper"
:style=
"
{ width: width + 'px' }">
:style=
"
{ width: width + 'px' }">
<div
class=
"el-popover__title"
v-if=
"title"
v-text=
"title"
></div>
<div
class=
"el-popover__title"
v-if=
"title"
v-text=
"title"
></div>
<slot>
{{
content
}}
</slot>
<slot>
{{
content
}}
</slot>
...
@@ -31,6 +31,7 @@ export default {
...
@@ -31,6 +31,7 @@ export default {
validator
:
value
=>
[
'
click
'
,
'
focus
'
,
'
hover
'
,
'
manual
'
].
indexOf
(
value
)
>
-
1
validator
:
value
=>
[
'
click
'
,
'
focus
'
,
'
hover
'
,
'
manual
'
].
indexOf
(
value
)
>
-
1
},
},
title
:
String
,
title
:
String
,
disabled
:
Boolean
,
content
:
String
,
content
:
String
,
reference
:
{},
reference
:
{},
popperClass
:
String
,
popperClass
:
String
,
...
...
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