File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export default defineComponent({
7373
7474 button {
7575 cursor : pointer ;
76- width : 100px ;
76+ min- width : 100px ;
7777 height : 38px ;
7878 margin-right : 30px ;
7979 margin-bottom : 10px ;
Original file line number Diff line number Diff line change 11<template >
2- <div >
2+ <div style = " padding : 10 px ; " >
33 <div style =" width : 200px " >
44 <p >自定义展示 slot :</p >
55 <VTreeDrop
4040 </VTreeDrop >
4141 {{ value }}
4242 </div >
43+ <div style =" width : 200px " >
44+ <p >单选:</p >
45+ <VTreeDrop
46+ v-model =" value2"
47+ :data =" data"
48+ selectable
49+ clearable
50+ drop-placeholder =" 请选择"
51+ :placement =" placement"
52+ :dropdown-min-width =" 300"
53+ dropdown-width-fixed
54+ >
55+ <template #empty >slot 传进来的暂无数据</template >
56+ </VTreeDrop >
57+ 选中的值:{{ value2 }}
58+ </div >
4359 </div >
4460</template >
4561
@@ -72,13 +88,15 @@ export default defineComponent({
7288 setup() {
7389 const data = ref (genData ().data )
7490 const value = ref (' 2' )
91+ const value2 = ref (' 2' )
7592 const placement = ref <PlacementType >(' bottom-start' )
7693 function handleCheckedChange() {
7794 console .log (' checked-change' )
7895 }
7996 return {
8097 data ,
8198 value ,
99+ value2 ,
82100 placement ,
83101 handleCheckedChange
84102 }
You can’t perform that action at this time.
0 commit comments