diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index bacb1632..368ffda1 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -60,7 +60,7 @@ export default { props: { columns: { type: Array, - required: true, + default: () => [], }, gutter: { type: Number, @@ -94,9 +94,10 @@ export default { immediate: true, deep: true, handler(val) { - // 复用你原来 transfer 逻辑的“本地副本”思想 - this.innerColumns = val.map((c) => ({ ...c })) - this.backupColumns = val.map((c) => ({ ...c })) + const safeCols = Array.isArray(val) ? val : [] + + this.innerColumns = safeCols.map((c) => ({ ...c })) + this.backupColumns = safeCols.map((c) => ({ ...c })) }, }, }, diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 827fd731..763a72a3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -2,7 +2,12 @@
+
-
+
-
-