vuejs / repl

Vue SFC REPL as a Vue 3 component

Home Page:https://repl-vuejs.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.

liu-bluesky opened this issue · comments

<script setup lang="tsx"> import { ref, reactive, getCurrentInstance, onMounted, watchEffect } from "vue"; import { useRouter, useRoute} from "vue-router"; import { Repl ,useStore, useVueImportMap} from '@vue/repl' import Monaco from '@vue/repl/monaco-editor' const router = useRouter(); const route = useRoute(); // retrieve some configuration options from the URL const { importMap: builtinImportMap, vueVersion, productionMode, } = useVueImportMap({ // specify the default URL to import Vue runtime from in the sandbox // default is the CDN link from jsdelivr.com with version matching Vue's version // from peerDependency // runtimeDev: 'cdn link to vue.runtime.esm-browser.js', // runtimeProd: 'cdn link to vue.runtime.esm-browser.prod.js', // serverRenderer: 'cdn link to server-renderer.esm-browser.js', }) const store = useStore( { // pre-set import map builtinImportMap, vueVersion, }, // initialize repl with previously serialized state location.hash, ) // persist state to URL hash watchEffect(() => history.replaceState({}, '', store.serialize())) // use a specific version of Vue vueVersion.value = '3.2.8' // production mode is enabled productionMode.value = true const dialogVisible = ref(true); const state = reactive({}); const replRef = ref(""); onMounted(() => { console.log('route :>> ', route.params.text); }); </script> <style scoped lang="scss"> .renderEchartsEdit{ width: 100%; height: calc(100vh - 114px); .repl{ width: 100%; height: 100%; } } </style>

谁知道这是 什么情况

location.hash 不是一个合法的数据。