File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed
examples/src/umd-test/ve-table Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 55 <!-- 引入样式 -->
66 < link
77 rel ="stylesheet "
8- href ="https://unpkg.com/vue-easytable /libs/theme-default/index.css "
8+ href ="../../../.. /libs/theme-default/index.css "
99 />
1010 </ head >
1111
1414 < ve-table
1515 :columns ="columns "
1616 :table-data ="tableData "
17+ :expand-option ="expandOption "
1718 row-key-field-name ="rowKey "
1819 :edit-option ="editOption "
1920 > </ ve-table >
2223 <!-- 先引入 Vue -->
2324 < script src ="https://cdn.jsdelivr.net/npm/vue@2 "> </ script >
2425 <!-- 引入组件库 -->
25- < script src ="https://unpkg.com/vue-easytable /libs/umd/index.js "> </ script >
26+ < script src ="../../../.. /libs/umd/index.js "> </ script >
2627 < script >
2728 new Vue ( {
2829 el : "#app" ,
3536 console . log ( "cellValueChange column::" , column ) ;
3637 } ,
3738 } ,
39+ expandOption : {
40+ defaultExpandedRowKeys : [ 1001 , 1003 ] ,
41+ render : ( { row, column, rowIndex } , h ) => {
42+ return h (
43+ "div" ,
44+ {
45+ style : {
46+ color : "red" ,
47+ } ,
48+ } ,
49+ row . name ,
50+ ) ;
51+ } ,
52+ } ,
3853 columns : [
54+ {
55+ field : "" ,
56+ key : "a" ,
57+ type : "expand" ,
58+ title : "" ,
59+ width : 50 ,
60+ align : "center" ,
61+ } ,
3962 {
4063 field : "date" ,
4164 key : "b" ,
4265 title : "Date" ,
4366 width : 200 ,
4467 align : "center" ,
45- edit : true ,
68+ renderBodyCell : ( { row } , h ) => {
69+ return h ( "div" , row . date ) ;
70+ } ,
4671 } ,
4772 {
4873 field : "hobby" ,
You can’t perform that action at this time.
0 commit comments