This repository has been archived on 2023-08-30. You can view files and clone it, but cannot push or open issues/pull-requests.
bytedo
/
wcui
Archived
1
0
Fork 0

优化layer事件

old
宇天 2019-11-05 21:15:51 +08:00
parent 1caabb0be6
commit 780b985041
2 changed files with 3 additions and 8 deletions

View File

@ -488,8 +488,8 @@ class Layer {
/* ------------------------ */
if (this.props.mask) {
this._handlMask = clickOutside(this.root.children[1], ev => {
// 只作用于wc-layer
if (ev.target.tagName !== 'WC-LAYER') {
// 只作用于当前wc-layer
if (ev.target !== this) {
return
}
if (this.props['mask-close']) {

View File

@ -256,8 +256,7 @@ const DEFAULT_TOOLS = [
'center',
'right',
'link',
'image',
'topic'
'image'
]
function renderToolbar(list) {
@ -428,10 +427,6 @@ export default class Neditor {
// 这里不作任何处理
break
case 'topic':
this.exec('insertHtml', '#话题#')
break
default:
this.__EDITOR__.focus()
this.restoreSelection()