mce 0.15.6 → 0.15.7
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/index.js +16 -6
- package/dist/locale/en.d.ts +1 -0
- package/dist/locale/zh-Hans.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1027,7 +1027,6 @@ const _0_font = defineMixin((editor, options) => {
|
|
|
1027
1027
|
const loading = ref(false);
|
|
1028
1028
|
async function loadFont(source, options2) {
|
|
1029
1029
|
const res = await fonts.load(source, options2);
|
|
1030
|
-
console.log("loadFont", res);
|
|
1031
1030
|
emit("loadFont", res);
|
|
1032
1031
|
return res;
|
|
1033
1032
|
}
|
|
@@ -1076,6 +1075,7 @@ const en = {
|
|
|
1076
1075
|
"move": "Move",
|
|
1077
1076
|
"hand": "Hand",
|
|
1078
1077
|
"frame": "Frame",
|
|
1078
|
+
"group": "Group",
|
|
1079
1079
|
"text": "Text",
|
|
1080
1080
|
"doubleClickEditText": "DoubleClickEditText",
|
|
1081
1081
|
"rectangle": "Rectangle",
|
|
@@ -1181,6 +1181,7 @@ const zhHans = {
|
|
|
1181
1181
|
"move": "移动",
|
|
1182
1182
|
"hand": "抓手",
|
|
1183
1183
|
"frame": "画板",
|
|
1184
|
+
"group": "组合",
|
|
1184
1185
|
"text": "文字",
|
|
1185
1186
|
"doubleClickEditText": "双击编辑文字",
|
|
1186
1187
|
"rectangle": "矩形",
|
|
@@ -5085,7 +5086,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5085
5086
|
nodeIndexMap,
|
|
5086
5087
|
zoomTo,
|
|
5087
5088
|
hoverElement,
|
|
5088
|
-
exec
|
|
5089
|
+
exec,
|
|
5090
|
+
t
|
|
5089
5091
|
} = useEditor();
|
|
5090
5092
|
const opened = useModel(__props, "opened");
|
|
5091
5093
|
const dom = ref();
|
|
@@ -5140,8 +5142,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5140
5142
|
const node = props.node;
|
|
5141
5143
|
let value = node.name;
|
|
5142
5144
|
if (!value) {
|
|
5143
|
-
if (
|
|
5144
|
-
|
|
5145
|
+
if (isFrame(node)) {
|
|
5146
|
+
return t("frame");
|
|
5147
|
+
} else if (node.children.length) {
|
|
5148
|
+
value = t("group");
|
|
5149
|
+
} else if (isElement(node)) {
|
|
5150
|
+
if (node.foreground.isValid() && node.foreground.image) {
|
|
5151
|
+
value = t("image");
|
|
5152
|
+
} else if (node.text.isValid()) {
|
|
5145
5153
|
value = node.text.getStringContent();
|
|
5146
5154
|
}
|
|
5147
5155
|
}
|
|
@@ -5235,8 +5243,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
5235
5243
|
}
|
|
5236
5244
|
function onInputBlur() {
|
|
5237
5245
|
editing.value = false;
|
|
5238
|
-
|
|
5239
|
-
|
|
5246
|
+
if (editValue.value !== thumbnailName.value) {
|
|
5247
|
+
props.node.name = editValue.value;
|
|
5248
|
+
editValue.value = "";
|
|
5249
|
+
}
|
|
5240
5250
|
}
|
|
5241
5251
|
return (_ctx, _cache) => {
|
|
5242
5252
|
const _component_MceLayer = resolveComponent("MceLayer");
|
package/dist/locale/en.d.ts
CHANGED
package/dist/locale/zh-Hans.d.ts
CHANGED