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) { if (this.props.mask) {
this._handlMask = clickOutside(this.root.children[1], ev => { this._handlMask = clickOutside(this.root.children[1], ev => {
// 只作用于wc-layer // 只作用于当前wc-layer
if (ev.target.tagName !== 'WC-LAYER') { if (ev.target !== this) {
return return
} }
if (this.props['mask-close']) { if (this.props['mask-close']) {

View File

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