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
| <template lang="html">
| <component :options="this.$data" :is="getActiveName"></component>
| </template>
|
| <script>
| import pzpage from './page.vue'
| import pziframe from './iframe.vue'
|
| export default {
| data () {
| return {
| id: '',
| type: 0, // 0(alert默认)1(页面层)2(iframe层)3(loading)4(tips层),5(msg),6(prompt)
| title: '信息',
| content: '',
| area: 'auto',
| offset: 'auto',
| icon: -1,
| btn: '确定',
| time: 0,
| shade: true,
| yes: '',
| cancel: ''
| }
| },
| computed: {
| getActiveName () {
| const comps = [
| 'pzpage',
| 'pziframe'
| ]
| return comps[this.$data.type]
| }
| },
| mounted () {},
| methods: {},
| watch: {},
| components: {
| pzpage,
| pziframe
| }
| }
| </script>
|
| <style lang="less">
| </style>
|
|