App.vue
9.78 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<template>
<div id="app">
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
<!-- <HelloWorld msg="Welcome to Your Vue.js App" />
<GLExternal url="//localhost:8080/html/employee/index.html" :subscribe="subscribe"></GLExternal> -->
<hr />
<h3>el-button调整</h3>
<GLButton @click="click" fn="1-1-1-11" mode="el-button" display="disabled">232321321</GLButton>
<el-button type="primary">aaa</el-button>
<el-button type="primary" size="small">aaa</el-button>
<el-button type="primary" size="mini">aaa</el-button>
<hr />
<h3>el-dialog调整</h3>
<!-- <GLDialog :visible.sync="visible" title="aaaaaaaaa">
<div slot="footer">
<el-button size="small" @click="visible = false">取消</el-button>
<el-button type="primary" size="small">aaa</el-button>
</div>
</GLDialog> -->
<hr />
<h3>el-table调整</h3>
<GLTable ref="liveRoomRef" :tableParams="tableParams" :tableData="tableData">
<span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span>
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">控制台</el-button>
<el-button type="text" @click="handleShare(scope.scope)">分享</el-button>
<el-button v-if="scope.scope.liveStatus == '102'" type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button v-if="scope.scope.liveStatus != '101'" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</GLTable>
<hr />
<h3>el-tooltip调整</h3>
<!-- <gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> -->
<!-- <template slot='content'>
<p>Here's some contact info</p>
</template> -->
<!-- <template v-slot:content>
<p>Here's some contact info</p>
</template> -->
<!-- <template #content>
<p>Here's some contact info</p>
</template>
</gl-tooltip> -->
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button>
</el-tooltip> -->
<el-popover popper-class="gl-popover" placement="top" width="600" trigger="click">
<div class="gl-popover-content">
<el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column>
<el-table-column width="100" property="name" label="姓名"></el-table-column>
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
<!-- width="200" -->
<!-- title="标题" -->
<!-- <el-popover
placement="bottom"
trigger="manual"
content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
v-model="visible">
<el-button slot="reference" @click="visible = !visible">手动激活</el-button>
</el-popover> -->
<!-- <el-popover
placement="top"
width="160"
v-model="visible">
<p>这是一段内容这是一段内容确定删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="visible = false">确定</el-button>
</div>
<el-button slot="reference">删除</el-button>
</el-popover> -->
<hr />
<!-- 测试 GlTableSearch -->
<GlTableSearch></GlTableSearch>
<hr />
<!-- 测试 GLFooter -->
<GLFooter></GLFooter>
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {
visible: false,
tableParams: {
listName: 'list',
tableOption: false,
tableColumns: [
{
label: '最近开播',
prop: 'time',
width: '180',
formatter: cellValue => {
return cellValue.startTime + '-' + cellValue.endTime
},
columnattrs: {},
columnlisteners: {}
},
{
label: '直播间名称',
prop: 'name',
line: 1,
width: 90
// children:[
// {
// label: '直播间名称1',
// prop: 'name1',
// line: 1,
// },
// {
// label: '直播间名称2',
// prop: 'name2',
// line: 1,
// },
// ]
},
{
label: '房间号',
prop: 'roomId'
},
{
label: '主播',
prop: 'anchorName',
line: 1
},
{
label: '直播间图片',
prop: 'shareImgUrl',
line: 1,
addHtml: 'shareImgUrl'
},
{
label: '直播状态',
prop: 'liveStatus',
width: '80',
formatter: cellValue => {
return 111
},
children: [
{
label: '直播状态1',
prop: 'liveStatus1',
line: 1,
addHtml: 'shareImgUrl',
children: [
{
label: '直播状态3',
prop: 'liveStatus3',
line: 1,
addHtml: 'shareImgUrl'
},
{
label: '直播状态4',
prop: 'liveStatus4',
line: 1,
addHtml: 'shareImgUrl'
}
]
},
{
label: '直播状态2',
prop: 'liveStatus2',
line: 1,
addHtml: 'shareImgUrl',
children: [
{
label: '直播状态3',
prop: 'liveStatus3',
line: 1,
addHtml: 'shareImgUrl'
}
]
}
]
}
]
},
tableData: [
{
name: '王小虎王小虎王小虎王',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
},
{
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
},
{
name: '王小虎',
name1: '123',
name2: '123'
},
{
name: '王小虎王小虎王小虎王',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
},
{
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
},
{
name: '王小虎',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
},
{
name: '王小虎王小虎王小虎王',
liveStatus3: '132',
liveStatus4: '789',
name1: '123',
name2: '123'
}
],
gridData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-04',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-01',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// },
// {
// date: '2016-05-03',
// name: '王小虎',
// address: '上海市普陀区金沙江路 1518 弄'
// }
]
}
},
methods: {
subscribe(child) {
child.call('push', { src: this.src })
child.on('route-to', params => {
this.$history.push(params)
})
},
click() {
console.log(111111111111)
this.visible = true
}
}
}
</script>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
// padding-top: 60px;
padding-bottom: 50px;
height: 2000px;
font-size: 14px;
}
</style>