mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-05 07:27:09 +08:00
chore(playground): 恢复dsl本地存储的key
This commit is contained in:
parent
4026c0c305
commit
94d0ed1fd0
@ -263,7 +263,7 @@ const moveableOptions = (config?: CustomizeMoveableOptionsCallbackConfig): Movea
|
||||
|
||||
const save = () => {
|
||||
localStorage.setItem(
|
||||
'magicDSL2',
|
||||
'magicDSL',
|
||||
serialize(toRaw(value.value), {
|
||||
space: 2,
|
||||
unsafe: true,
|
||||
@ -290,7 +290,7 @@ asyncLoadJs(`${VITE_ENTRY_PATH}/ds-value/index.umd.cjs`).then(() => {
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line no-eval
|
||||
const magicDSL = eval(`(${localStorage.getItem('magicDSL2')})`);
|
||||
const magicDSL = eval(`(${localStorage.getItem('magicDSL')})`);
|
||||
if (!magicDSL) {
|
||||
save();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user