mali-applet-ui 0.0.57 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button class="ml-button" :class="[className || '', `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
|
|
2
|
+
<button class="ml-button" :class="[className || '', `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" :style="styles" @tap="tapEvent" @click="clickEvent">
|
|
3
3
|
<slot>{{ content }}</slot>
|
|
4
4
|
</button>
|
|
5
5
|
</template>
|
|
@@ -18,10 +18,16 @@ export default {
|
|
|
18
18
|
type: String,
|
|
19
19
|
default: 'button'
|
|
20
20
|
},
|
|
21
|
+
width: String,
|
|
21
22
|
redirect: Boolean,
|
|
22
23
|
url: String,
|
|
23
24
|
className: String
|
|
24
25
|
},
|
|
26
|
+
computed: {
|
|
27
|
+
styles () {
|
|
28
|
+
return this.width ? `width:${this.width};` : ''
|
|
29
|
+
}
|
|
30
|
+
},
|
|
25
31
|
methods: {
|
|
26
32
|
tapEvent () {
|
|
27
33
|
if (this.url) {
|
|
@@ -30,6 +30,12 @@ export default {
|
|
|
30
30
|
title: String,
|
|
31
31
|
className: String
|
|
32
32
|
},
|
|
33
|
+
inject: {
|
|
34
|
+
currVM: {
|
|
35
|
+
from: 'pageVM',
|
|
36
|
+
default: null
|
|
37
|
+
}
|
|
38
|
+
},
|
|
33
39
|
data () {
|
|
34
40
|
return {
|
|
35
41
|
loading: false,
|
|
@@ -72,7 +78,7 @@ export default {
|
|
|
72
78
|
this.loading = true
|
|
73
79
|
if (this.requestMethod) {
|
|
74
80
|
return Promise.resolve(
|
|
75
|
-
this.requestMethod(this.getParams())
|
|
81
|
+
this.requestMethod.call(this.currVM, this.getParams())
|
|
76
82
|
).then(res => {
|
|
77
83
|
let data = []
|
|
78
84
|
if (XEUtils.isFunction(globalStore.list.resProps.result)) {
|
|
@@ -96,7 +102,11 @@ export default {
|
|
|
96
102
|
}
|
|
97
103
|
return Promise.resolve([])
|
|
98
104
|
},
|
|
99
|
-
|
|
105
|
+
reload () {
|
|
106
|
+
this.pageVO.currPage = 1
|
|
107
|
+
return this.load()
|
|
108
|
+
},
|
|
109
|
+
async load() {
|
|
100
110
|
uni.showLoading({
|
|
101
111
|
title: '加载中'
|
|
102
112
|
})
|