@@ -55,18 +55,20 @@ export default defineComponent({
5555 }
5656 } ) ;
5757
58- const checkboxProps = {
59- key : data . value ?. id ,
60- disabled : data . value ?. disableCheck ,
61- halfChecked : halfChecked . value ,
62- modelValue : data . value ?. checked ,
63- 'onUpdate:modelValue' : ( ) => {
64- toggleCheckNode ?.( data . value ) ;
65- } ,
66- onClick : ( event : MouseEvent ) => {
67- event . stopPropagation ( ) ;
68- } ,
69- } ;
58+ const checkboxProps = computed ( ( ) => {
59+ return {
60+ key : data . value ?. id ,
61+ disabled : data . value ?. disableCheck ,
62+ halfChecked : halfChecked . value ,
63+ modelValue : data . value ?. checked ,
64+ 'onUpdate:modelValue' : ( ) => {
65+ toggleCheckNode ?.( data . value ) ;
66+ } ,
67+ onClick : ( event : MouseEvent ) => {
68+ event . stopPropagation ( ) ;
69+ } ,
70+ } ;
71+ } ) ;
7072
7173 const isShowOperationArea = ref ( false ) ;
7274
@@ -93,7 +95,7 @@ export default defineComponent({
9395 < span class = { nodeHLineClass . value } > </ span >
9496 { slots . icon ? renderSlot ( useSlots ( ) , 'icon' , { nodeData : data , toggleNode } ) : < DTreeNodeToggle data = { data . value } /> }
9597 < div class = { ns . em ( 'node-content' , 'value-wrapper' ) } style = { { height : `${ NODE_HEIGHT } px` } } >
96- { check . value && < Checkbox { ...checkboxProps } /> }
98+ { check . value && < Checkbox { ...checkboxProps . value } /> }
9799 { slots . default ? renderSlot ( useSlots ( ) , 'default' , { nodeData : data } ) : < DTreeNodeContent data = { data . value } /> }
98100 </ div >
99101 { operate . value && isShowOperationArea . value && (
0 commit comments