@@ -24,7 +24,7 @@ const _component = {
2424 'caret_right_circle' : `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
2525 <path d="M6 12.796V3.204L11.481 8 6 12.796zm.659.753 5.48-4.796a1 1 0 0 0 0-1.506L6.66 2.451C6.011 1.885 5 2.345 5 3.204v9.592a1 1 0 0 0 1.659.753z"/>
2626</svg>` ,
27- 'sub_loading' :`<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="17px " height="17px " viewBox="0 0 40 40" stroke="black" style="background: #dd4b39;border-radius: 50%;" enable-background="new 0 0 40 40" xml:space="preserve">
27+ 'sub_loading' :`<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="16px " height="16px " viewBox="0 0 40 40" stroke="black" style="background: #dd4b39;border-radius: 50%;" enable-background="new 0 0 40 40" xml:space="preserve">
2828 <path opacity="0.2" fill="#000" d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946
2929 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634
3030 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z"></path>
@@ -1187,12 +1187,12 @@ class ComponentCascadeLine {
11871187 _component . contextmenu ( e , [
11881188 {
11891189 title : '新增' , func : ( ) => {
1190- this . nodeInsert ( e , data , stack , index ) ;
1190+ this . nodeInsert ( e , data , stack ) ;
11911191 }
11921192 } ,
11931193 {
11941194 title : '修改' , func : ( ) => {
1195- this . nodeUpdate ( e , data , stack , index ) ;
1195+ this . nodeUpdate ( e , data , stack ) ;
11961196 }
11971197 } ,
11981198 {
@@ -1353,7 +1353,7 @@ class ComponentCascadeLine {
13531353 } ) ;
13541354 }
13551355
1356- nodeInsert ( e , data , stack , k ) {
1356+ nodeInsert ( e , data , stack ) {
13571357 this . panel ( e , data ) ;
13581358 let object = this ;
13591359 let nextStack = parseInt ( stack ) + 1 ;
@@ -1408,16 +1408,20 @@ class ComponentCascadeLine {
14081408 } ) ;
14091409 }
14101410
1411- nodeUpdate ( e , data , stack , k ) {
1411+ nodeUpdate ( e , data , stack ) {
14121412 this . panel ( e , data ) ;
14131413 let object = this ;
14141414 _component . request ( this . URL + '/' + data . key + '/edit' , 'GET' , { val :data . val } , function ( response ) {
14151415 object . panelContent ( response , data , object . URL + '/' + data . key , 'PUT' , ( response ) => {
14161416 let val = response . data . val ;
14171417 data . val = val ;
1418- for ( let node of e . target . childNodes ) {
1419- if ( node instanceof HTMLElement ) continue ;
1420- node . nodeValue = val ;
1418+ if ( e . target . childNodes . length > 0 ) {
1419+ for ( let node of e . target . childNodes ) {
1420+ if ( node instanceof HTMLElement ) continue ;
1421+ node . nodeValue = val ;
1422+ }
1423+ } else {
1424+ e . target . innerText = val ;
14211425 }
14221426 object . PLANE_DOM . remove ( ) ;
14231427 } ) ;
0 commit comments