Skip to content

Commit 31d3738

Browse files
committed
bug fixed
修复vue2.x 链接不正确问题
1 parent cf5c173 commit 31d3738

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

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

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,75 +3,62 @@
33
<head>
44
<meta charset="UTF-8" />
55
<!-- 引入样式 -->
6-
<link rel="stylesheet" href="../../../../libs/theme-dark/index.css" />
6+
<link
7+
rel="stylesheet"
8+
href="https://unpkg.com/vue-easytable/libs/theme-default/index.css"
9+
/>
710
</head>
811

912
<body>
1013
<div id="app">
1114
<ve-table
1215
:columns="columns"
1316
:table-data="tableData"
14-
:expand-option="expandOption"
1517
row-key-field-name="rowKey"
18+
:edit-option="editOption"
1619
></ve-table>
1720
</div>
1821
</body>
1922
<!-- 先引入 Vue -->
2023
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
2124
<!-- 引入组件库 -->
22-
<script src="../../../../libs/umd/index.js"></script>
25+
<script src="https://unpkg.com/vue-easytable/libs/umd/index.js"></script>
2326
<script>
2427
new Vue({
2528
el: "#app",
2629
data: function () {
2730
return {
28-
expandOption: {
29-
defaultExpandedRowKeys: [1001, 1003],
30-
render: ({ row, column, rowIndex }, h) => {
31-
return h(
32-
"div",
33-
{
34-
style: {
35-
color: "red",
36-
},
37-
},
38-
row.name,
39-
);
31+
editOption: {
32+
// cell value change
33+
cellValueChange: ({ row, column }) => {
34+
console.log("cellValueChange row::", row);
35+
console.log("cellValueChange column::", column);
4036
},
4137
},
4238
columns: [
43-
{
44-
field: "",
45-
key: "a",
46-
// 设置需要显示展开图标的列
47-
type: "expand",
48-
title: "",
49-
width: 50,
50-
align: "center",
51-
},
5239
{
5340
field: "date",
5441
key: "b",
5542
title: "Date",
5643
width: 200,
5744
align: "center",
58-
renderBodyCell: ({ row }, h) => {
59-
return h("div", row.date);
60-
},
45+
edit: true,
6146
},
6247
{
6348
field: "hobby",
6449
key: "c",
6550
title: "Hobby",
6651
width: 300,
6752
align: "left",
53+
edit: true,
6854
},
6955
{
7056
field: "address",
7157
key: "d",
7258
title: "Address",
7359
width: "",
7460
align: "left",
61+
edit: true,
7562
},
7663
],
7764
tableData: [

0 commit comments

Comments
 (0)