@@ -139,7 +139,14 @@ export default defineComponent({
139139 } ,
140140 } ,
141141
142- emits : [ 'nodeClick' , 'nodeMouseover' , 'bracketsClick' , 'iconClick' , 'selectedChange' , 'valueChange' ] ,
142+ emits : [
143+ 'nodeClick' ,
144+ 'nodeMouseover' ,
145+ 'bracketsClick' ,
146+ 'iconClick' ,
147+ 'selectedChange' ,
148+ 'valueChange' ,
149+ ] ,
143150
144151 setup ( props , { emit } ) {
145152 const dataType = computed < string > ( ( ) => getDataType ( props . node . content ) ) ;
@@ -244,17 +251,21 @@ export default defineComponent({
244251 const content = new Function ( 'data' , `return data${ path . slice ( rootPath . length ) } ` ) ( props . data ) ;
245252 const copiedData = JSON . stringify ( key ? { [ key ] : content } : content , null , 2 ) ;
246253 copy ( copiedData ) ;
247- }
254+ } ;
248255
249256 const renderNodeActions = ( ) => {
250257 const render = props . renderNodeActions ;
251258 if ( ! render ) return null ;
252259 const defaultActions = {
253260 copy : handleCopy ,
254261 } ;
255- return typeof render === 'function'
256- ? render ( { node : props . node , defaultActions } )
257- : < span onClick = { handleCopy } class = "vjs-tree-node-actions-item" > copy</ span > ;
262+ return typeof render === 'function' ? (
263+ render ( { node : props . node , defaultActions } )
264+ ) : (
265+ < span onClick = { handleCopy } class = "vjs-tree-node-actions-item" >
266+ copy
267+ </ span >
268+ ) ;
258269 } ;
259270
260271 return ( ) => {
@@ -295,7 +306,9 @@ export default defineComponent({
295306 'has-line' : props . showLine ,
296307 } }
297308 >
298- { Array . from ( Array ( props . indent ) ) . map ( ( ) => < > </ > ) }
309+ { Array . from ( Array ( props . indent ) ) . map ( ( ) => (
310+ < > </ >
311+ ) ) }
299312 </ div >
300313 ) ) }
301314 { props . showIcon && < Carets nodeType = { node . type } onClick = { handleIconClick } /> }
@@ -352,9 +365,7 @@ export default defineComponent({
352365 </ span >
353366
354367 { props . renderNodeActions && (
355- < span class = "vjs-tree-node-actions" >
356- { renderNodeActions ( ) }
357- </ span >
368+ < span class = "vjs-tree-node-actions" > { renderNodeActions ( ) } </ span >
358369 ) }
359370 </ div >
360371 ) ;
0 commit comments