剪切板组件
- Source:
Members
(inner) props
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tag |
string |
<optional> |
span
|
容器标签名 |
text |
String | function |
<optional> |
要复制的文本,支持函数方式自定义内容 |
|
target |
String | function |
<optional> |
复制目标DOM,支持选择器或函数表示,不设置就是组件根DOM |
|
action |
String | function |
<optional> |
动作,支持 copy 和 cut |
|
tooltip |
Boolean | Object |
<optional> |
ElTooltip 配置参数 |
|
message |
Boolean | Object |
<optional> |
ElMessage 配置参数 |
|
defaultTip |
string |
<optional> |
复制
|
默认tooltip文本 |
successTip |
string |
<optional> |
复制成功
|
复制成功tooltip文本 |
disabled |
Boolean |
<optional> |
false
|
禁用 |
属性参数
(inner) slots
- Source:
Properties:
Name | Type | Description |
---|---|---|
default |
string | 默认插槽,定义显示内容 |
插槽
Methods
(inner) copy()
- Source:
触发复制
Events
error
- Source:
复制失败时触发
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | 事件对象 |
success
- Source:
复制成功时触发
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | 事件对象 |