yeoolhj 1 жил өмнө
parent
commit
2ee7ee74df

+ 1 - 1
package.json

@@ -30,7 +30,7 @@
     "@queenjs-modules/queentree": "^0.0.10",
     "@queenjs-modules/queentree-explorer": "^0.0.6",
     "@queenjs-modules/queentree-explorer-viewer": "^0.0.3",
-    "@queenjs/components": "^0.0.12",
+    "@queenjs/components": "^0.0.14",
     "@queenjs/controllers": "^0.0.6",
     "@queenjs/icons": "^0.0.20",
     "@queenjs/theme": "^0.0.8",

+ 17 - 10
src/modules/editor/components/CompUI/basicUI/Text/index.tsx

@@ -6,7 +6,7 @@ import { Essentials } from "@ckeditor/ckeditor5-essentials";
 import { FontFamily, FontSize } from "@ckeditor/ckeditor5-font";
 import { Link } from "@ckeditor/ckeditor5-link";
 import { Paragraph } from "@ckeditor/ckeditor5-paragraph";
-import { defineComponent } from "vue";
+import { defineComponent, reactive } from "vue";
 import { string } from "vue-types";
 import { View } from "../View";
 import { css } from "@linaria/core";
@@ -30,14 +30,14 @@ export const Text = defineComponent({
         Alignment,
       ],
       fontSize: {
-        options: [9, 11, 13, "default", 17, 19, 21],
+        options: [12, 14, 16, 18, 20, 24, 28],
       },
       toolbar: {
         items: [
-          "undo",
-          "redo",
-          "|",
-          "fontFamily",
+          // "undo",
+          // "redo",
+          // "|",
+          // "fontFamily",
           "fontsize",
           "bold",
           "italic",
@@ -48,14 +48,21 @@ export const Text = defineComponent({
         ],
       },
     };
+
+    const state = reactive({
+      focus: false,
+    });
+
     return () => (
-      <View>
+      <View class={[state.focus && "drag-disable"]}>
         <ckeditor
           class={textStyle}
           editor={InlineEditor}
-          onBlur={(e: any, editor: InlineEditor) =>
-            emit("update:value", editor.getData())
-          }
+          onBlur={(e: any, editor: InlineEditor) => {
+            state.focus = false;
+            emit("update:value", editor.getData());
+          }}
+          onFocus={() => (state.focus = true)}
           onReady={(editor: InlineEditor) => {
             editor.setData(props.value);
             if (!store.isEditMode) {

+ 2 - 2
src/modules/editor/components/CompUI/customUI/Cover/options.ts

@@ -4,8 +4,8 @@ import { createOptions } from "../../defines/createOptions";
 export const options = createOptions({
   name: "封面",
   value: {
-    title: "新科技反光面料 引领潮流新风尚",
-    desc: "时尚 | 精致 | 百搭",
+    title: `<p style="text-align:center;">新科技反光面料 引领潮流新风尚</p>`,
+    desc: `<p style="text-align:center;">时尚 | 精致 | 百搭</p>`,
   },
   background: {
     image:

+ 1 - 0
src/modules/editor/components/Viewport/Content/index.tsx

@@ -23,6 +23,7 @@ export default defineUI({
           <Container
             style={store.designData.pageStyle}
             onDrop={(e: any) => actions.moveComp(e.removedIndex, e.addedIndex)}
+            non-drag-area-selector={".drag-disable"}
           >
             {store.designData.content.map((d) => {
               const Comp: any = components.CompUI[d.compKey];

+ 4 - 4
yarn.lock

@@ -1626,10 +1626,10 @@
   resolved "http://124.70.149.18:4873/@queenjs-modules%2fqueentree/-/queentree-0.0.10.tgz#f6344ab32ba0163a3b8cf4f4b9fe6641aef2bea7"
   integrity sha512-P4cIjXKgcvd8h3vVs4f1rGLNf3/Kd5G+qGiZN+idkLjiu22HU6SNmOVLUwV6PuKg+9sTPRn7FKamSHuFxXWX5g==
 
-"@queenjs/components@^0.0.12":
-  version "0.0.12"
-  resolved "http://124.70.149.18:4873/@queenjs%2fcomponents/-/components-0.0.12.tgz#fa2b36f1749441a5bf7d9594a2f484a19cae2114"
-  integrity sha512-/s6BLSCj1SLAFj/T96EQjZYacXpXetD+trAakH+o72vbC19llsVX67kW6DCECajSdSW9+T9zEXwOcGeUV5pYSg==
+"@queenjs/components@^0.0.14":
+  version "0.0.14"
+  resolved "http://124.70.149.18:4873/@queenjs%2fcomponents/-/components-0.0.14.tgz#1067985ca7d9e1c22b54f5c4832a75abb7c165fe"
+  integrity sha512-5/k4uKsbCb0wQFHASO4MMNQZR5ZHaQvwaUsuDcve8NwSEJdZxlWQFy3k9MffCFfClSoPKMpEubqEXpCKY9wB5Q==
   dependencies:
     "@queenjs/utils" "^0.0.1"