Members
props
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tag |
String |
<optional> |
article
|
生成标签名称 |
children |
Array.<VNode> |
<optional> |
内容虚拟DOM |
|
copyable |
Boolean |
<optional> |
false
|
是否可拷贝 |
copyText |
String |
<optional> |
复制文本内容, 默认取虚拟DOM的innerText |
|
delete |
Boolean |
<optional> |
false
|
添加删除线样式 |
disabled |
Boolean |
<optional> |
false
|
禁用文本样式 |
editable |
Boolean |
<optional> |
false
|
是否可编辑 |
ellipsis |
Boolean |
<optional> |
false
|
设置自动溢出省略 |
rows |
Number |
<optional> |
1
|
超出几行显示省略, ellipsis true 有效 |
expandable |
Boolean |
<optional> |
false
|
显示展开按钮 ellipsis true 有效 |
tooltip |
Boolean | Object |
<optional> |
显示tooltip,ellipsis true 有效 |
|
mark |
Boolean |
<optional> |
false
|
添加标记样式 |
underline |
Boolean |
<optional> |
false
|
添加下划线样式 |
code |
Boolean |
<optional> |
false
|
添加引用样式 |
strong |
Boolean |
<optional> |
false
|
是否加粗 |
pre |
Boolean |
<optional> |
false
|
保留格式 |
small |
Boolean |
<optional> |
false
|
字体变小 |
type |
String |
<optional> |
文本类型 '', 'primary', 'secondary', 'warning', 'danger' |
属性参数
Methods
AddShadowToImage()
- Source:
Creates a new canvas containing the image and its shadow Returns an object containing the image and its dimensions at z=0
appendChildNode(ellipsisContentHolder, node, ellipsisTextNode)
- Source:
Append before fixed nodes
Parameters:
Name | Type | Description |
---|---|---|
ellipsisContentHolder |
||
node |
||
ellipsisTextNode |
createEllipsisContainer(style) → {HTMLElement}
- Source:
创建临时容器
Parameters:
Name | Type | Description |
---|---|---|
style |
Object |
Returns:
- Type
- HTMLElement
createEllipsisContentHolder(el, ellipsisTextNode) → {HTMLSpanElement}
- Source:
createEllipsisContentHolder
Parameters:
Name | Type | Description |
---|---|---|
el |
||
ellipsisTextNode |
Returns:
- Type
- HTMLSpanElement
destroyVue(vm)
- Source:
销毁临时DOM
Parameters:
Name | Type | Description |
---|---|---|
vm |
getData() → {*}
- Source:
获取编辑器内容
Returns:
- Type
- *
inRange(el, maxHeight) → {boolean}
- Source:
检查是否在范围内,超出范围需要显示省略号
Parameters:
Name | Type | Description |
---|---|---|
el |
||
maxHeight |
Returns:
- Type
- boolean
instanceVue(el, content, fixedContent) → {*}
- Source:
实例化用于计算的临时DOM
Parameters:
Name | Type | Description |
---|---|---|
el |
||
content |
||
fixedContent |
Returns:
- Type
- *
pxToNumber(value) → {number}
- Source:
像素转换成数字类型
Parameters:
Name | Type | Description |
---|---|---|
value |
string |
Returns:
- Type
- number
removeEllipsisContainer(el)
- Source:
删除临时容器
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement |
RoundImage()
- Source:
Rounds off the corners of an image
scrollTop(val)
- Source:
设置滚动条位置
Parameters:
Name | Type | Description |
---|---|---|
val |
setData(val)
- Source:
设置编辑器内容
Parameters:
Name | Type | Description |
---|---|---|
val |
string | 文本 |
styleToString(style) → {string}
- Source:
样式对象转换成字符串形式
Parameters:
Name | Type | Description |
---|---|---|
style |
Object |
Returns:
- Type
- string
wrapperDecorations(h, blocks, content) → {*}
- Source:
添加包裹容器
Parameters:
Name | Type | Description |
---|---|---|
h |
||
blocks |
||
content |
Returns:
- Type
- *
Events
change
- Source:
编辑文本改变时触发
Parameters:
Name | Type | Description |
---|---|---|
text |
String | 文本内容 |
click
- Source:
点击菜单项时触发
Parameters:
Name | Type | Description |
---|---|---|
item |
Object | 菜单项数据 |
vm |
Object | 菜单项实例 |
complete
- Source:
滚动加载结束时触发
complete
- Source:
滚动加载结束时触发
copy
- Source:
复制文字时触发
Parameters:
Name | Type | Description |
---|---|---|
事件对象 |
Object |
edited
- Source:
编辑结束时触发
Parameters:
Name | Type | Description |
---|---|---|
text |
String | 文本内容 |
editing
- Source:
开始编辑时触发
expand
- Source:
展开或收起时触发
Parameters:
Name | Type | Description |
---|---|---|
expanded |
Boolean | 是否展开 |
on-change
- Source:
内容变化时触发
Parameters:
Name | Type | Description |
---|---|---|
val |
string | 新内容 |
page-change
- Source:
分页页码变化时触发
Parameters:
Name | Type | Description |
---|---|---|
page |
number | 页码 |
pageSize |
number | 页大小 |
page-change
- Source:
分页页码变化时触发
Parameters:
Name | Type | Description |
---|---|---|
page |
number | 页码 |
pageSize |
number | 页大小 |
size-change
- Source:
页大小变化时触发
Parameters:
Name | Type | Description |
---|---|---|
pageSize |
number | 页大小 |
size-change
- Source:
页大小变化时触发
Parameters:
Name | Type | Description |
---|---|---|
pageSize |
number | 页大小 |