mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(vue-runtime-help): 更新dsl时,设置默认选中项与默认页面
This commit is contained in:
parent
2186fc4e87
commit
d1197279fd
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.1.4",
|
"version": "0.1.5",
|
||||||
"name": "@tmagic/vue-runtime-help",
|
"name": "@tmagic/vue-runtime-help",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
|
@ -33,6 +33,15 @@ export const useEditorDsl = (app: TMagicApp | undefined, win = window) => {
|
|||||||
|
|
||||||
updateRootConfig(config: MApp) {
|
updateRootConfig(config: MApp) {
|
||||||
root.value = config;
|
root.value = config;
|
||||||
|
|
||||||
|
if (typeof curPageId.value === 'undefined') {
|
||||||
|
curPageId.value = config.items?.[0]?.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof selectedId.value === 'undefined') {
|
||||||
|
selectedId.value = curPageId.value;
|
||||||
|
}
|
||||||
|
|
||||||
app?.setConfig(config, curPageId.value);
|
app?.setConfig(config, curPageId.value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user