This repository has been archived by the owner on Dec 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
/
mview.vue
72 lines (70 loc) · 1.46 KB
/
mview.vue
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
<style lang="less">
.okokok {
display: block;
button {
background-color: transparent;
padding: 0;
margin: 0;
display: block;
width: 100%;
height: 100%;
border: none;
padding-left: 0;
padding-right: 0;
border-radius: 0;
font-size: 0rpx;
&::after {
content: "";
width: 0;
height: 0;
-webkit-transform: scale(1);
transform: scale(1);
display: none;
background-color: transparent;
}
view {
// width: 100%;
height: 100%;
}
}
}
</style>
<template>
<form @submit="cache" class="okokok" report-submit>
<button formType="submit">
<slot name="content"></slot>
</button>
</form>
</template>
<script>
import wepy from 'wepy'
import HttpMixin from 'mixins/http'
export default class MView extends wepy.component {
props = {
args: {
type: Array,
default: []
},
arg: {
type: Object,
}
}
mixins = [HttpMixin]
methods = {
cache(e) {
if (this.arg) {
this.$emit("mtap", this.arg)
} else {
this.$emit("mtap", ...this.args)
}
if (e.detail.formId == "the formId is a mock one") {
console.log("现在处于微信开发者工具!");
return
}
this.PostWithBind("/user/msg_id", {
"ids": e.detail.formId
}, false)
}
}
}
</script>