@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
package/dist/style.css
CHANGED
|
@@ -655,9 +655,7 @@
|
|
|
655
655
|
align-items: center;
|
|
656
656
|
}
|
|
657
657
|
.m-editor-code-block-list .list-container .list-item .right-tool {
|
|
658
|
-
|
|
659
|
-
right: 15px;
|
|
660
|
-
padding-left: 5px;
|
|
658
|
+
width: fit-content !important;
|
|
661
659
|
display: flex;
|
|
662
660
|
align-items: center;
|
|
663
661
|
}
|
|
@@ -670,7 +668,8 @@
|
|
|
670
668
|
white-space: nowrap;
|
|
671
669
|
text-overflow: ellipsis;
|
|
672
670
|
padding: 10px 15px;
|
|
673
|
-
|
|
671
|
+
width: 0 !important;
|
|
672
|
+
flex: 1;
|
|
674
673
|
}
|
|
675
674
|
.m-editor-code-block-list .list-container .code-comp-map-wrapper {
|
|
676
675
|
display: flex;
|
package/dist/tmagic-editor.mjs
CHANGED
|
@@ -910,11 +910,14 @@ class CodeBlock extends BaseService {
|
|
|
910
910
|
}
|
|
911
911
|
async setCodeDslById(id, codeConfig) {
|
|
912
912
|
let codeDsl = await this.getCodeDsl();
|
|
913
|
+
const codeConfigProcessed = codeConfig;
|
|
914
|
+
if (codeConfig.content) {
|
|
915
|
+
codeConfigProcessed.content = eval(codeConfig.content);
|
|
916
|
+
}
|
|
913
917
|
if (!codeDsl) {
|
|
914
918
|
codeDsl = {
|
|
915
919
|
[id]: {
|
|
916
|
-
...
|
|
917
|
-
content: eval(codeConfig.content)
|
|
920
|
+
...codeConfigProcessed
|
|
918
921
|
}
|
|
919
922
|
};
|
|
920
923
|
} else {
|
|
@@ -923,8 +926,7 @@ class CodeBlock extends BaseService {
|
|
|
923
926
|
...codeDsl,
|
|
924
927
|
[id]: {
|
|
925
928
|
...existContent,
|
|
926
|
-
...
|
|
927
|
-
content: eval(codeConfig.content)
|
|
929
|
+
...codeConfigProcessed
|
|
928
930
|
}
|
|
929
931
|
};
|
|
930
932
|
}
|
|
@@ -3652,7 +3654,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3652
3654
|
}
|
|
3653
3655
|
const codeConfig = {
|
|
3654
3656
|
name: "\u4EE3\u7801\u5757",
|
|
3655
|
-
content: `() => {
|
|
3657
|
+
content: `({app, params}) => {
|
|
3656
3658
|
// place your code here
|
|
3657
3659
|
}`,
|
|
3658
3660
|
params: []
|
|
@@ -4467,6 +4469,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4467
4469
|
"default-expanded-keys": unref(defaultExpandedKeys),
|
|
4468
4470
|
load: loadItems,
|
|
4469
4471
|
data: unref(values),
|
|
4472
|
+
"default-expand-all": true,
|
|
4470
4473
|
"expand-on-click-node": false,
|
|
4471
4474
|
"highlight-current": true,
|
|
4472
4475
|
props: {
|