-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path08.html
More file actions
84 lines (84 loc) · 2.23 KB
/
08.html
File metadata and controls
84 lines (84 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- import CSS -->
<link
rel="stylesheet"
href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"
/>
</head>
<style>
.foo i {
font-size: 16px;
}
</style>
<body>
<div id="app">
<el-table :data="tableData" width="100%" :border="false">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="date" label="日期" width="180">
</el-table-column>
<el-table-column prop="name" label="姓名" width="180">
</el-table-column>
<el-table-column prop="address" label="地址" :render-header="header">
</el-table-column>
</el-table>
<i
class="el-icon-platform-eleme"
style="float: right; font-size: 20px;"
></i>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
new Vue({
el: "#app",
data: function () {
return {
tableData: [
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1517 弄",
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1519 弄",
},
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1516 弄",
},
],
};
},
methods: {
header(h, { column }) {
return h("div", {
class: {
foo: true,
bar: false,
},
domProps: {
innerHTML: `
地址
<i class='el-icon-platform-eleme' style='float:right;font-size: 20px;color:red'></i>
`,
},
});
},
},
});
</script>
</html>