@tmagic/editor 1.2.0-beta.14 → 1.2.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +3 -4
- package/dist/tmagic-editor.mjs +8 -5
- package/dist/tmagic-editor.mjs.map +1 -1
- package/dist/tmagic-editor.umd.js +8 -5
- package/dist/tmagic-editor.umd.js.map +1 -1
- package/package.json +9 -9
- package/src/layouts/sidebar/LayerPanel.vue +1 -0
- package/src/layouts/sidebar/code-block/CodeBlockList.vue +1 -1
- package/src/services/codeBlock.ts +8 -6
- package/src/theme/code-block.scss +3 -4
|
@@ -928,11 +928,14 @@
|
|
|
928
928
|
}
|
|
929
929
|
async setCodeDslById(id, codeConfig) {
|
|
930
930
|
let codeDsl = await this.getCodeDsl();
|
|
931
|
+
const codeConfigProcessed = codeConfig;
|
|
932
|
+
if (codeConfig.content) {
|
|
933
|
+
codeConfigProcessed.content = eval(codeConfig.content);
|
|
934
|
+
}
|
|
931
935
|
if (!codeDsl) {
|
|
932
936
|
codeDsl = {
|
|
933
937
|
[id]: {
|
|
934
|
-
...
|
|
935
|
-
content: eval(codeConfig.content)
|
|
938
|
+
...codeConfigProcessed
|
|
936
939
|
}
|
|
937
940
|
};
|
|
938
941
|
} else {
|
|
@@ -941,8 +944,7 @@
|
|
|
941
944
|
...codeDsl,
|
|
942
945
|
[id]: {
|
|
943
946
|
...existContent,
|
|
944
|
-
...
|
|
945
|
-
content: eval(codeConfig.content)
|
|
947
|
+
...codeConfigProcessed
|
|
946
948
|
}
|
|
947
949
|
};
|
|
948
950
|
}
|
|
@@ -3670,7 +3672,7 @@
|
|
|
3670
3672
|
}
|
|
3671
3673
|
const codeConfig = {
|
|
3672
3674
|
name: "\u4EE3\u7801\u5757",
|
|
3673
|
-
content: `() => {
|
|
3675
|
+
content: `({app, params}) => {
|
|
3674
3676
|
// place your code here
|
|
3675
3677
|
}`,
|
|
3676
3678
|
params: []
|
|
@@ -4485,6 +4487,7 @@
|
|
|
4485
4487
|
"default-expanded-keys": vue.unref(defaultExpandedKeys),
|
|
4486
4488
|
load: loadItems,
|
|
4487
4489
|
data: vue.unref(values),
|
|
4490
|
+
"default-expand-all": true,
|
|
4488
4491
|
"expand-on-click-node": false,
|
|
4489
4492
|
"highlight-current": true,
|
|
4490
4493
|
props: {
|