web-component-gallery 2.2.21 → 2.2.23

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.
@@ -54,7 +54,7 @@ export default {
54
54
  drawLayers: null,
55
55
  drawMouseTool: null,
56
56
  drawOperates: [
57
- { type: 'primary', text: '绘制', event: { click: this.handleDrawStart } },
57
+ { type: 'primary', text: '绘制', event: { click: () => this.handleDrawStart() } },
58
58
  { text: '清除', event: { click: this.handleDrawClear } },
59
59
  { type: 'primary', text: '保存', event: { click: this.handleDrawSave } },
60
60
  { text: '取消', event: { click: this.handleDrawReset } }
@@ -187,7 +187,7 @@ export default {
187
187
  // 保存绘制
188
188
  handleDrawSave() {
189
189
  if (!this.drawLayers) {
190
- return this.$message.error('请先在地图上绘制!')
190
+ return this.handleDrawReset()
191
191
  }
192
192
  this.assignDrawLayers(this.drawType)
193
193
  },
@@ -318,8 +318,6 @@ export default {
318
318
  anchor: 'bottom-center',
319
319
  icon: await this.amapStore.setIcon(this.drawIcon)
320
320
  } : { strokeWeight: 8 }
321
-
322
- console.log(drawType, '--drawType绘制类型')
323
321
 
324
322
  this.drawMouseTool[CONFIG.drawTypes[drawType]]({
325
323
  ...baseOptions,
@@ -360,6 +358,8 @@ export default {
360
358
  this.drawInfoAll ?
361
359
  this.renderAllDrawLayers() :
362
360
  this.renderSingleDrawLayer(drawType)
361
+
362
+ if (this.activeOperateIndex === -1) setTimeout(this.amapInstance.setFitView(), 0)
363
363
  },
364
364
 
365
365
  // 清理覆盖物
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.2.21",
3
+ "version": "2.2.23",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
package/utils/Axios.js CHANGED
@@ -57,7 +57,7 @@ const createService = (options = {}) => {
57
57
  console.warn('Request canceled:', error.message)
58
58
  return Promise.reject(error)
59
59
  }
60
- handleError(error.response, options)
60
+ return handleError(error.response, options)
61
61
  }
62
62
  )
63
63