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
d3a9cf8f
Commit
d3a9cf8f
authored
Jan 06, 2017
by
qingwei.li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Popover: add disabled feature, close #2221
parent
29c99dba
Changes
5
Show 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 @
d3a9cf8f
...
@@ -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 @
d3a9cf8f
...
@@ -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 @
d3a9cf8f
...
@@ -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 @
d3a9cf8f
...
@@ -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 @
d3a9cf8f
...
@@ -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