diff --git a/panel/src/components/Forms/Blocks/Blocks.vue b/panel/src/components/Forms/Blocks/Blocks.vue index 4b26de5642..8b22787949 100644 --- a/panel/src/components/Forms/Blocks/Blocks.vue +++ b/panel/src/components/Forms/Blocks/Blocks.vue @@ -597,7 +597,7 @@ export default { if (index !== -1) { this.deselect(block); - this.$delete(this.blocks, index); + this.blocks.splice(index, 1); this.save(); } }, @@ -629,7 +629,7 @@ export default { for (const id of this.selected) { const index = this.findIndex(id); if (index !== -1) { - this.$delete(this.blocks, index); + this.blocks.splice(index, 1); } } diff --git a/panel/src/components/Forms/Layouts/Layouts.vue b/panel/src/components/Forms/Layouts/Layouts.vue index 8268ec2b46..26d80d6c6c 100644 --- a/panel/src/components/Forms/Layouts/Layouts.vue +++ b/panel/src/components/Forms/Layouts/Layouts.vue @@ -251,7 +251,7 @@ export default { const index = this.rows.findIndex((element) => element.id === layout.id); if (index !== -1) { - this.$delete(this.rows, index); + this.rows.splice(index, 1); } this.save(); diff --git a/panel/vite.config.mjs b/panel/vite.config.mjs index 04872322a7..a7f666cc40 100644 --- a/panel/vite.config.mjs +++ b/panel/vite.config.mjs @@ -12,18 +12,11 @@ import kirby from "./scripts/vite-kirby.mjs"; function createAliases(proxy) { return { "@": path.resolve(__dirname, "src"), + // use absolute proxied url to avoid Vue being loaded twice vue: proxy.target + ":3000/node_modules/vue/dist/vue.esm-browser.js" }; } -function createProxy() { - return { - target: process.env.VUE_APP_DEV_SERVER ?? "https://sandbox.test", - changeOrigin: true, - secure: false - }; -} - /** * Returns the server configuration */ @@ -105,7 +98,11 @@ function createTest() { * Returns the Vite configuration */ export default defineConfig(({ mode }) => { - const proxy = createProxy(); + const proxy = { + target: process.env.VUE_APP_DEV_SERVER ?? "https://sandbox.test", + changeOrigin: true, + secure: false + }; return { plugins: createPlugins(mode), diff --git a/src/Panel/Assets.php b/src/Panel/Assets.php index efdb7ddd47..c374312e49 100644 --- a/src/Panel/Assets.php +++ b/src/Panel/Assets.php @@ -218,7 +218,7 @@ public function importMaps(): array $map['vue'] = $this->url . '/node_modules/vue/dist/vue.esm-browser.js'; } - return $map; + return array_filter($map); } /**