jack há 11 horas atrás
pai
commit
ccb57a251b

+ 0 - 5
src/App.vue

@@ -135,11 +135,6 @@ window.addEventListener('beforeunload', () => {
   height: 100%;
   height: 100%;
 }
 }
 
 
-sub {
-  display: grid;
-  align-items: center;
-}
-
 .image-preview {
 .image-preview {
   position: fixed;
   position: fixed;
   inset: 0;
   inset: 0;

+ 1 - 2
src/assets/styles/prosemirror.scss

@@ -59,8 +59,7 @@
     font-size: smaller;
     font-size: smaller;
   }
   }
   sub {
   sub {
-    vertical-align: sub;
-    font-size: smaller;
+    vertical-align: baseline;
   }
   }
 
 
   blockquote {
   blockquote {

+ 0 - 1
src/components/CollapsibleToolbar/index.vue

@@ -383,7 +383,6 @@ const getTypeClass = (type?: number) => {
   font-weight: 500;
   font-weight: 500;
   color: #6b7280;
   color: #6b7280;
   text-align: center;
   text-align: center;
-  line-height: 1.2;
 }
 }
 
 
 .sidebar-item:hover .item-label,
 .sidebar-item:hover .item-label,

+ 1 - 1
src/utils/prosemirror/schema/marks.ts

@@ -10,7 +10,7 @@ const subscript: MarkSpec = {
       getAttrs: value => value === 'sub' && null
       getAttrs: value => value === 'sub' && null
     },
     },
   ],
   ],
-  toDOM: () => ['sub', 0],
+  toDOM: () => ['sub', { style: 'vertical-align: baseline;' },  0],
 }
 }
 
 
 const superscript: MarkSpec = {
 const superscript: MarkSpec = {

+ 1 - 2
src/views/components/element/ShapeElement/BaseShapeElement.vue

@@ -138,8 +138,7 @@ const text = computed<ShapeText>(() => {
   right: 0;
   right: 0;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  padding: 10px;
-  line-height: 1.2;
+  padding: 5px;
   word-break: break-word;
   word-break: break-word;
 
 
   &.top {
   &.top {

+ 1 - 2
src/views/components/element/ShapeElement/index.vue

@@ -236,8 +236,7 @@ const startEdit = () => {
   right: 0;
   right: 0;
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
-  padding: 10px;
-  line-height: 1.2;
+  padding: 5px;
   word-break: break-word;
   word-break: break-word;
   pointer-events: none;
   pointer-events: none;
 
 

+ 3 - 0
src/views/components/element/TextElement/BaseTextElement.vue

@@ -25,6 +25,9 @@
           color: elementInfo.defaultColor,
           color: elementInfo.defaultColor,
           fontFamily: elementInfo.defaultFontName,
           fontFamily: elementInfo.defaultFontName,
           writingMode: elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',
           writingMode: elementInfo.vertical ? 'vertical-rl' : 'horizontal-tb',
+          display: 'flex',
+          alignItems: 'center',
+          overflow: hidden,
         }"
         }"
       >
       >
         <ElementOutline
         <ElementOutline