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
| <template>
| <view class="content">
| 时间:{{id}}
| <button @click="t1">更新时间-父按钮</button>
| <button @click="t2">更新时间-父按钮-直接赋值</button>
| <view class="input-group">
| <slot name="page"></slot>
| </view>
| <view v-if="footer" class="footer">
| <p class="right">{{$company}}技术支持</p>
| <view class="left">
| <uni-icons v-if="serverInfo.networkFlag==='内网'" type="neiwang" color="#cbcaca" size="13"/>
| <uni-icons v-else-if="serverInfo.networkFlag==='外网'" type="waiwang" color="#cbcaca" size="13"/>
| <uni-icons v-else type="weizhi" color="#cbcaca" size="13"/>
| <p>{{serverInfo.networkFlag}}</p>
| </view>
| </view>
| </view>
| </template>
|
| <script>
| import { mapState, mapMutations } from 'vuex';
| export default {
| data() {
| return {
|
| }
| },
| props:{
| footer:{
| type:Boolean,
| default:true
| }
| },
| created() {
|
| },
| mounted() {
|
| },
| methods: {
| t1(){
| this.test(new Date());
| },
| t2(){
| this.$store.state.id = new Date();
| },
| ...mapMutations(['test']),
| },
| computed: {
| ...mapState(['id']),
| ...mapState(['serverInfo']),
| }
| }
| </script>
|
| <style>
| .footer{
| color: #cbcaca;
| padding:0 10rpx;
| }
| .footer .left{
| display: flex;
| float: left;
| }
| .footer .right{
| float: right;
| }
| </style>
|
|