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
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 @
d3a9cf8f
...
...
@@ -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 | — | — |
| 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 |
| disabled | whether Popover is disabled | boolean | — | false |
| value(v-model) | whether popover is visible | Boolean | — | false |
| offset | popover offset | number | — | 0 |
| transition | popover transition animation | string | — | fade-in-linear |
...
...
examples/docs/en-US/tooltip.md
View file @
d3a9cf8f
...
...
@@ -113,12 +113,12 @@ Tooltip has 9 placements.
.item
{
margin
:
4px
;
}
.left
.el-tooltip__popper
,
.right
.el-tooltip__popper
{
padding
:
8px
10px
;
}
.el-button
{
width
:
110px
;
}
...
...
@@ -145,7 +145,7 @@ Tooltip has two themes: `dark` and `light`。
### 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`
.
```
html
...
...
@@ -170,7 +170,7 @@ In fact, Tooltip is an extension based on [Vue-popper](https://github.com/elemen
```
html
<template>
<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>
</template>
...
...
examples/docs/zh-CN/popover.md
View file @
d3a9cf8f
...
...
@@ -239,6 +239,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的
| content | 显示的内容,也可以通过
`slot`
传入 DOM | String | — | — |
| 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 |
| disabled | Popover 是否可用 | Boolean | — | false |
| value(v-model) | 状态是否可见 | Boolean | — | false |
| offset | 出现位置的偏移量 | Number | — | 0 |
| transition | 定义渐变动画 | String | — | fade-in-linear |
...
...
examples/docs/zh-CN/tooltip.md
View file @
d3a9cf8f
...
...
@@ -134,7 +134,7 @@
.item
{
margin
:
4px
;
}
.left
.el-tooltip__popper
,
.right
.el-tooltip__popper
{
padding
:
8px
10px
;
...
...
@@ -189,7 +189,7 @@ Tooltip 组件提供了两个不同的主题:`dark`和`light`。
```
html
<template>
<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>
</template>
```
...
...
packages/popover/src/main.vue
View file @
d3a9cf8f
...
...
@@ -5,7 +5,7 @@
class=
"el-popover"
:class=
"[popperClass]"
ref=
"popper"
v-show=
"showPopper"
v-show=
"
!disabled &&
showPopper"
:style=
"
{ width: width + 'px' }">
<div
class=
"el-popover__title"
v-if=
"title"
v-text=
"title"
></div>
<slot>
{{
content
}}
</slot>
...
...
@@ -31,6 +31,7 @@ export default {
validator
:
value
=>
[
'
click
'
,
'
focus
'
,
'
hover
'
,
'
manual
'
].
indexOf
(
value
)
>
-
1
},
title
:
String
,
disabled
:
Boolean
,
content
:
String
,
reference
:
{},
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