1
1
<template >
2
2
<div class =" components-container" >
3
3
<el-button type =" primary" @click =" dialogTableVisible = true" >open a Drag Dialog</el-button >
4
- <el-dialog v-el-drag-dialog title =" Shipping address" :visible.sync =" dialogTableVisible" >
4
+ <el-dialog v-el-drag-dialog @dragDialog =" handleDrag" title =" Shipping address" :visible.sync =" dialogTableVisible" >
5
+ <el-select ref =" select" v-model =" value" placeholder =" 请选择" >
6
+ <el-option v-for =" item in options" :key =" item.value" :label =" item.label" :value =" item.value" >
7
+ </el-option >
8
+ </el-select >
5
9
<el-table :data =" gridData" >
6
10
<el-table-column property =" date" label =" Date" width =" 150" ></el-table-column >
7
11
<el-table-column property =" name" label =" Name" width =" 200" ></el-table-column >
@@ -20,6 +24,13 @@ export default {
20
24
data () {
21
25
return {
22
26
dialogTableVisible: false ,
27
+ options: [
28
+ { value: ' 选项1' , label: ' 黄金糕' },
29
+ { value: ' 选项2' , label: ' 双皮奶' },
30
+ { value: ' 选项3' , label: ' 蚵仔煎' },
31
+ { value: ' 选项4' , label: ' 龙须面' }
32
+ ],
33
+ value: ' ' ,
23
34
gridData: [{
24
35
date: ' 2016-05-02' ,
25
36
name: ' John Smith' ,
@@ -38,6 +49,12 @@ export default {
38
49
address: ' No.1518, Jinshajiang Road, Putuo District'
39
50
}]
40
51
}
52
+ },
53
+ methods: {
54
+ // v-el-drag-dialog onDrag callback function
55
+ handleDrag () {
56
+ this .$refs .select .blur ()
57
+ }
41
58
}
42
59
}
43
60
</script >
0 commit comments