mediacube-ui 0.1.447 → 0.1.449
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.449](https://github.com/MediaCubeCo/mcui/compare/v0.1.448...v0.1.449) (2026-03-24)
|
|
6
|
+
|
|
7
|
+
### [0.1.448](https://github.com/MediaCubeCo/mcui/compare/v0.1.447...v0.1.448) (2026-02-19)
|
|
8
|
+
|
|
5
9
|
### [0.1.447](https://github.com/MediaCubeCo/mcui/compare/v0.1.446...v0.1.447) (2026-02-12)
|
|
6
10
|
|
|
7
11
|
### [0.1.446](https://github.com/MediaCubeCo/mcui/compare/v0.1.445...v0.1.446) (2026-02-02)
|
package/package.json
CHANGED
|
@@ -524,6 +524,12 @@ export default {
|
|
|
524
524
|
const { category, categoryName } = this.getCategoriesWithNewRelation()
|
|
525
525
|
this.setFilterValues(category, categoryName)
|
|
526
526
|
},
|
|
527
|
+
normalizeToArray(val) {
|
|
528
|
+
if (!val) return []
|
|
529
|
+
if (Array.isArray(val)) return val
|
|
530
|
+
if (val && val.constructor === Object) return Object.values(val)
|
|
531
|
+
return [val]
|
|
532
|
+
},
|
|
527
533
|
getCategoriesWithNewRelation() {
|
|
528
534
|
const relationKeys = Object.keys(this.currentCondition)
|
|
529
535
|
const values = _cloneDeep(this.currentValues)
|
|
@@ -538,13 +544,16 @@ export default {
|
|
|
538
544
|
selectedCategoryName[k] = [0]
|
|
539
545
|
} else {
|
|
540
546
|
if (k in selectedCategory) {
|
|
541
|
-
selectedCategory[k] = _uniq([
|
|
547
|
+
selectedCategory[k] = _uniq([
|
|
548
|
+
...this.normalizeToArray(selectedCategory[k]),
|
|
549
|
+
...this.normalizeToArray(this.currentCondition[k]),
|
|
550
|
+
])
|
|
542
551
|
selectedCategoryName[k] = {
|
|
543
|
-
...selectedCategoryName[k],
|
|
544
|
-
...this.currentConditionName[k],
|
|
552
|
+
...(selectedCategoryName[k] || {}),
|
|
553
|
+
...(this.currentConditionName[k] || {}),
|
|
545
554
|
}
|
|
546
555
|
} else {
|
|
547
|
-
selectedCategory[k] = this.currentCondition[k]
|
|
556
|
+
selectedCategory[k] = this.normalizeToArray(this.currentCondition[k])
|
|
548
557
|
selectedCategoryName[k] = this.currentConditionName[k]
|
|
549
558
|
}
|
|
550
559
|
}
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
91
91
|
|
|
92
92
|
await this.$nextTick() // ждём DOM
|
|
93
93
|
|
|
94
|
+
if (!this.$refs['mc-stack-body']) continue
|
|
94
95
|
const total = [...this.$refs['mc-stack-body'].children].reduce((a, c) => (a += c.offsetWidth + 12), 0) // 12 отступ между элементами
|
|
95
96
|
if (total > this.containerWidth) {
|
|
96
97
|
this.setFixedChildren(key)
|