@@ -227,7 +227,7 @@ window.ComponentDot = class {
227
227
}
228
228
229
229
tagSelect ( element ) {
230
- if ( this . limit > 0 && this . select_data . length >= this . limit ) {
230
+ if ( this . limit > 0 && this . select_data . length >= this . limit && this . SELECTED_DOM . firstChild instanceof HTMLElement ) {
231
231
this . SELECTED_DOM . firstChild . click ( ) ;
232
232
}
233
233
let clone = element . cloneNode ( true ) ;
@@ -393,15 +393,15 @@ window.ComponentCascadeDot = class {
393
393
if ( v . nodes !== null ) {
394
394
div . insertAdjacentHTML ( 'afterbegin' , `<i class="left">${ _component . caret_right } </i>` ) ;
395
395
div . addEventListener ( "contextmenu" , ( e ) => {
396
- e . target . click ( ) ;
396
+ if ( e . target instanceof HTMLElement ) e . target . click ( ) ;
397
397
e . preventDefault ( ) ;
398
398
let k = parseInt ( div . getAttribute ( 'data-k' ) ) ;
399
399
_component . contextmenu ( e , [
400
400
{
401
401
title : '全选' , func : ( ) => {
402
402
object . checkAll ( stack + 1 ,
403
403
this . dimensional_data [ stack ] [ k ] . nodes , true ) ;
404
- e . target . click ( ) ;
404
+ if ( e . target instanceof HTMLElement ) e . target . click ( ) ;
405
405
}
406
406
} ,
407
407
{
@@ -1098,7 +1098,6 @@ window.ComponentSortable = class {
1098
1098
item . style . transform = `translateY(${ this . positions . indexOf ( index ) * this . itemHeight } px)` ;
1099
1099
item . style . transition = `transform ${ this . options . animationSpeed } ms ${ this . options . animationEasing } ` ;
1100
1100
} ) ;
1101
-
1102
1101
e . preventDefault ( ) ;
1103
1102
}
1104
1103
@@ -1253,7 +1252,7 @@ window.ComponentCascadeLine = class {
1253
1252
div . addEventListener ( 'click' , this . select . bind ( this , div , stack ) ) ;
1254
1253
div . addEventListener ( "contextmenu" , ( e ) => {
1255
1254
e . preventDefault ( ) ;
1256
- e . target . click ( ) ;
1255
+ if ( e . target instanceof HTMLElement ) e . target . click ( ) ;
1257
1256
_component . contextmenu ( e , [
1258
1257
{
1259
1258
title : '新增' , func : ( ) => {
@@ -1375,7 +1374,7 @@ window.ComponentCascadeLine = class {
1375
1374
1376
1375
panel ( title ) {
1377
1376
let html = `<div class="dot-cascade-panel"><div class="dlp plane-header"></div><div class="plane-body dlp-scroll"></div></div>` ;
1378
- this . DOM . childNodes [ 0 ] . insertAdjacentHTML ( 'beforeEnd ' , html ) ;
1377
+ this . DOM . childNodes [ 0 ] . insertAdjacentHTML ( 'beforeend ' , html ) ;
1379
1378
let panelDom = this . DOM . childNodes [ 0 ] . lastChild ;
1380
1379
this . PLANE_DOM = panelDom ;
1381
1380
let T = document . createElement ( 'div' ) ;
0 commit comments