index.vue
3.47 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<template>
<div class="main">
<table border="1">
<tr>
<td colspan="2">土地面积</td>
<td colspan="3"><input type="text" class="formInput"/></td>
</tr>
<tr>
<td colspan="2">宗地代码</td>
<td colspan="3"><input type="text" class="formInput"/></td>
</tr>
<tr>
<td colspan="2">宗地面积(㎡)</td>
<td><input type="text" class="formInput"/></td>
<td>定着物数量</td>
<td><input type="text" class="formInput"/></td>
</tr>
<tr>
<td colspan="2">备注</td>
<td colspan="3"><input type="text" class="formInput"/></td>
</tr>
</table>
<el-table
:data="tableData"
height="250"
border
style="width: 100%">
<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="地址">
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: "index",
data() {
return {
tableData: [{
id: '12987122',
name: '王小虎',
amount1: '234',
amount2: '3.2',
amount3: 10
}, {
id: '12987123',
name: '王小虎',
amount1: '165',
amount2: '4.43',
amount3: 12
}, {
id: '12987124',
name: '王小虎',
amount1: '324',
amount2: '1.9',
amount3: 9
}, {
id: '12987125',
name: '王小虎',
amount1: '621',
amount2: '2.2',
amount3: 17
}, {
id: '12987126',
name: '王小虎',
amount1: '539',
amount2: '4.1',
amount3: 15
}]
}
},
methods: {
addTableRow() {
let table2 = document.getElementById("table2")
let table3 = document.getElementById("table3")
table2.firstChild.appendChild(table3)
},
delTableRow() {
let table = document.getElementsByTagName("table")
}
},
mounted() {
}
}
</script>
<style scoped>
.main {
box-sizing: border-box;
padding: 18px;
height: auto;
width: 80%;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
}
td {
text-align: center;
height: 36px;
}
table .formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
</style>