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
| <template>
| <el-row>
| <el-col>
| <basic-container>
| <avue-form :option="option" v-model="obj">
| <template slot-scope="{row}" slot="input">
| <el-tag>{{row}}</el-tag>
| </template>
| </avue-form>
| </basic-container>
| </el-col>
| </el-row>
| </template>
|
| <script>
| export default {
| data() {
| return {
| obj: {
| resdata: [
| {
| name: 1,
| post: 1,
| time: 1,
| },
| {
| name: 1,
| post: 1,
| time: 1,
| }
| ]
| },
| option: {
| labelWidth: 110,
| column: [
| {
| label: '',
| prop: 'resdata',
| type: 'dynamic',
| span:24,
| children: {
| align: 'center',
| headerAlign: 'center',
| rowAdd:(done)=>{
| this.$message.success('新增回调');
| done({
| input:'默认值'
| });
| },
| rowDel:(row,done)=>{
| this.$message.success('删除回调'+JSON.stringify(row));
| done();
| },
| column: [
| {
| width: 200,
| label: '单位名称',
| prop: "name",
| formslot: true,
| }, {
| width: 200,
| label: '部门',
| prop: "post",
| formslot: true,
| }, {
| width: 200,
| label: '岗位',
| prop: "time",
| formslot: true,
| }
| ]
| }
| },
|
| ]
| }
| }
| },
| methods:{
| // addAll(){
| // for(let i=0;i<10;i++){
| // this.obj.dynamic.push({
| // name: 1,
| // post: 1,
| // time: 1,
| // })
| // }
| // }
| }
| }
| </script>
|
| <style>
| .box {
| height: 800px;
| }
|
| .el-scrollbar {
| height: 100%;
| }
|
| .box .el-scrollbar__wrap {
| overflow: scroll;
| }
| </style>
|
|