Skip to content

Commit 5e3a19b

Browse files
committed
Update index.html
1 parent 31d3738 commit 5e3a19b

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

examples/src/umd-test/ve-table/index.html

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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

@@ -14,6 +14,7 @@
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>
@@ -22,7 +23,7 @@
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",
@@ -35,14 +36,38 @@
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",

0 commit comments

Comments
 (0)