mali-applet-ui 0.1.24 → 0.1.25

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.
@@ -107,16 +107,20 @@ export default {
107
107
  return this.load()
108
108
  },
109
109
  async load() {
110
- uni.showLoading({
111
- title: '加载中'
112
- })
110
+ if (this.$loading) {
111
+ this.$loading.show()
112
+ }
113
113
  try {
114
114
  const data = await this.getList()
115
- uni.hideLoading()
115
+ if (this.$loading) {
116
+ this.$loading.hide()
117
+ }
116
118
  uni.stopPullDownRefresh()
117
119
  this.$emit('input', data)
118
120
  } catch (e) {
119
- uni.hideLoading()
121
+ if (this.$loading) {
122
+ this.$loading.hide()
123
+ }
120
124
  uni.stopPullDownRefresh()
121
125
  console.error(e)
122
126
  }
@@ -181,9 +181,9 @@ export default {
181
181
  },
182
182
  async selectFile (e) {
183
183
  const { tempFiles } = e
184
- uni.showLoading({
185
- title: "上传中..."
186
- });
184
+ if (this.$loading) {
185
+ this.$loading.show('上传中')
186
+ }
187
187
  const uploadMethod = this.uploadFile ? this.uploadFile : (globalStore.upload ? globalStore.upload.uploadFile : null)
188
188
  Promise.all(
189
189
  tempFiles.map(file => {
@@ -220,10 +220,13 @@ export default {
220
220
  }
221
221
  })
222
222
  ).then(res => {
223
- uni.hideLoading();
223
+ if (this.$loading) {
224
+ this.$loading.hide()
225
+ }
224
226
  }).catch((e) => {
225
- console.error(e)
226
- uni.hideLoading();
227
+ if (this.$loading) {
228
+ this.$loading.hide()
229
+ }
227
230
  })
228
231
  },
229
232
  removeEvent (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "components",