bi-eleme 2.0.11 → 2.0.13

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.
@@ -114,7 +114,7 @@
114
114
  &.in-selected-path {
115
115
  font-weight: bold;
116
116
  color: $--color-text-primary;
117
- background-color: $--cascader-node-background-hover;
117
+ background-color: $--cascader-node-background-hover !important;
118
118
  &:hover {
119
119
  background-color: $--cascader-node-background-hover;
120
120
  }
package/src/index.js CHANGED
@@ -210,7 +210,7 @@ if (typeof window !== 'undefined' && window.Vue) {
210
210
  }
211
211
 
212
212
  export default {
213
- version: '2.0.11',
213
+ version: '2.0.13',
214
214
  locale: locale.use,
215
215
  i18n: locale.i18n,
216
216
  install,
package/src/utils/util.js CHANGED
@@ -247,17 +247,16 @@ export function isArrayAContainedInB(arrA = [], arrB = []) {
247
247
  }
248
248
 
249
249
  export function isArrayAContainedIn2DArrayB(arrA = [], arrB = []) {
250
+ const arrBSet = new Set(arrB.flat())
251
+
250
252
  for (let i = 0; i < arrA.length; i++) {
251
- let isContained = false
252
- for (let j = 0; j < arrB.length; j++) {
253
- if (arrB[j].includes(arrA[i])) {
254
- isContained = true
255
- break
256
- }
257
- }
258
- if (!isContained) {
253
+ if (!arrBSet.has(arrA[i])) {
259
254
  return false
260
255
  }
261
256
  }
257
+
262
258
  return true
263
259
  }
260
+ export function isInArray(value, arr = []) {
261
+ return arr.includes(value)
262
+ }