123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <template>
- <div class="Iframe-dialog">
- <el-dialog
- :visible.sync="dialogVisible"
- width="50%"
- >
- <iframe :src="iframeSrc" width="100%" height="500" frameborder="0"></iframe>
- </el-dialog>
- </div>
- </template>
- <script>
- import { Dialog } from 'element-ui'
- export default {
- name: 'Iframe-dialog',
- components: {
- [Dialog.name]: Dialog
- },
- props: {
- showDialog: {
- type: Boolean,
- default: false
- },
- iframeSrc: {
- type: String,
- default: ''
- }
- },
- watch: {
- showDialog: {
- handler (newval) {
- this.dialogVisible = newval
- if (!newval) {
- this.getEmployInfo()
- }
- },
- immediate: true
- },
- dialogVisible (newval) {
- this.$emit('setDialogStatus', newval)
- }
- },
- data () {
- return {
- dialogVisible: false
- }
- },
- methods: {
- getEmployInfo () {
- this.$emit('getEmployInfo')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .Iframe-dialog{}
- </style>
|