shineout 1.10.6 → 1.10.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.
@@ -113,7 +113,12 @@ function (_PureComponent) {
113
113
  // this.closeByResult = true
114
114
  // this.optionsHold = false
115
115
  // }
116
- if (el.getAttribute('data-id') === id) return true;
116
+ if (el.getAttribute('data-id') === id) return true; // in label
117
+
118
+ if (el.tagName === 'LABEL' && el.htmlFor && el.contains(this.element) && el.contains(document.getElementById(el.htmlFor))) {
119
+ return true;
120
+ }
121
+
117
122
  if (!el.parentElement) return false;
118
123
  return this.isDescendent(el.parentElement, id);
119
124
  };
package/es/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Created by scripts/src-index.js.
2
2
  import * as utils from './utils'
3
3
 
4
- export default { utils, version: '1.10.6' }
4
+ export default { utils, version: '1.10.7' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/es/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import * as utils from './utils';
3
3
  export default {
4
4
  utils: utils,
5
- version: '1.10.6'
5
+ version: '1.10.7'
6
6
  };
7
7
  export { utils };
8
8
  export { setLocale } from './locale';
@@ -140,7 +140,12 @@ function (_PureComponent) {
140
140
  // this.closeByResult = true
141
141
  // this.optionsHold = false
142
142
  // }
143
- if (el.getAttribute('data-id') === id) return true;
143
+ if (el.getAttribute('data-id') === id) return true; // in label
144
+
145
+ if (el.tagName === 'LABEL' && el.htmlFor && el.contains(this.element) && el.contains(document.getElementById(el.htmlFor))) {
146
+ return true;
147
+ }
148
+
144
149
  if (!el.parentElement) return false;
145
150
  return this.isDescendent(el.parentElement, id);
146
151
  };
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Created by scripts/src-index.js.
2
2
  import * as utils from './utils'
3
3
 
4
- export default { utils, version: '1.10.6' }
4
+ export default { utils, version: '1.10.7' }
5
5
  export { utils }
6
6
  export { setLocale } from './locale'
7
7
  export { color, style } from './utils/expose'
package/lib/index.js CHANGED
@@ -224,6 +224,6 @@ exports.Upload = _Upload.default;
224
224
  // Created by scripts/src-index.js.
225
225
  var _default = {
226
226
  utils: utils,
227
- version: '1.10.6'
227
+ version: '1.10.7'
228
228
  };
229
229
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shineout",
3
- "version": "1.10.6",
3
+ "version": "1.10.7",
4
4
  "description": "Shein 前端组件库",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",