web-component-gallery 2.0.5 → 2.0.7

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.
@@ -89,7 +89,7 @@ const AmapDraw = {
89
89
  this.amap = this.amapStore.initMap(this.drawEl)
90
90
  this.amapSatellite = new this.amapStore.AMap.TileLayer.Satellite()
91
91
  this.amap.add(this.amapSatellite)
92
- this.amapSatellite.hide()
92
+ // this.amapSatellite.hide()
93
93
  this.buttonProps = [].concat(this.drawButtonProps)
94
94
  this.echoDrawLayers(this.drawType)
95
95
  /** 如果有限制区域,则描绘在地图上 */
@@ -329,8 +329,7 @@ const AmapDraw = {
329
329
  key={i}
330
330
  class={i === amapType && 'LayersActive'}
331
331
  onClick={() => onLayersSwitch(i)}
332
- >
333
- {i === amapType}
332
+ >
334
333
  {layer}
335
334
  </span>
336
335
  ))}
@@ -32,7 +32,8 @@ export default {
32
32
  props: {
33
33
  value: {
34
34
  type: [String, Number, Boolean],
35
- required: true
35
+ required: true,
36
+ default: ''
36
37
  },
37
38
  radioType: {
38
39
  type: String,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="TAntdTags" v-on="$listeners">
2
+ <div class="TAntdTags ant-input" v-on="$listeners">
3
3
  <Tooltip
4
4
  v-for="(child, i) in displayTags"
5
5
  :key="`tag-${i}-${child[valueKey]}`"
@@ -7,7 +7,7 @@
7
7
 
8
8
  & > div {
9
9
  flex: 1;
10
- padding: @padding-md @padding-lg;
10
+ padding: 0 @padding-lg;
11
11
  box-sizing: border-box;
12
12
  overflow-y: auto;
13
13
  .scrollbarStyle();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
package/utils/Axios.js CHANGED
@@ -15,7 +15,7 @@ class RequestManager {
15
15
 
16
16
  remove(key) {
17
17
  this.pendingMap.delete(key)
18
- }
18
+ }
19
19
 
20
20
  cancel(key) {
21
21
  const controller = this.pendingMap.get(key)
@@ -37,6 +37,8 @@ const createService = (options = {}) => {
37
37
  const tokenKey = options.tokenKey ?? 'token'
38
38
  const token = storage[storageMode].get(tokenKey)
39
39
  token && (config.headers[tokenKey] = token)
40
+
41
+ if (checkWhiteList(config)) return config
40
42
 
41
43
  const key = generateRequestKey(config)
42
44
  const controller = new AbortController()
@@ -79,6 +81,11 @@ const createService = (options = {}) => {
79
81
  })
80
82
  }
81
83
 
84
+ // 白名单校验
85
+ function checkWhiteList(config) {
86
+ return config.headers?.['X-No-Cancel'] === 'true'
87
+ }
88
+
82
89
  function generateRequestKey(config) {
83
90
  return `${config.url}-${config.method}-${JSON.stringify(config.params)}`
84
91
  }