web-component-gallery 2.2.23 → 2.2.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.
@@ -359,7 +359,7 @@ export default {
359
359
  this.renderAllDrawLayers() :
360
360
  this.renderSingleDrawLayer(drawType)
361
361
 
362
- if (this.activeOperateIndex === -1) setTimeout(this.amapInstance.setFitView(), 0)
362
+ if (this.activeOperateIndex === -1) setTimeout(this.amap.setFitView(), 0)
363
363
  },
364
364
 
365
365
  // 清理覆盖物
@@ -117,12 +117,14 @@ export default {
117
117
  * 文件预览处理
118
118
  * @param {Object} file - 文件对象
119
119
  */
120
- handleFilePreview({ uid, contentType, url }) {
121
- if (!contentType || !url) return
120
+ handleFilePreview({ uid, type, contentType, url }) {
121
+ const innerType = contentType || type
122
122
 
123
- let suffix = url.substr(url.lastIndexOf('.') + 1).toUpperCase()
123
+ if (!innerType || !url) return
124
+
125
+ const suffix = url.substr(url.lastIndexOf('.') + 1).toUpperCase()
124
126
 
125
- if (contentType.includes('image') || IMAGE_SUFFIX.has(suffix)) {
127
+ if (innerType.includes('image') || IMAGE_SUFFIX.has(suffix)) {
126
128
  this.$viewerApi({
127
129
  options: {
128
130
  url: 'url',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.2.23",
3
+ "version": "2.2.25",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [