瀏覽代碼

全局样式修改

黄琪勇 3 月之前
父節點
當前提交
b1b3921f83

+ 13 - 13
src/hooks/useCreateElement.ts

@@ -92,8 +92,8 @@ export default () => {
       chartType: type,
       left: 300,
       top: 81.25,
-      width: 400,
-      height: 400,
+      width: 800,
+      height: 800,
       rotate: 0,
       themeColors: [theme.value.themeColor],
       textColor: theme.value.fontColor,
@@ -120,8 +120,8 @@ export default () => {
       data.push(rowCells)
     }
 
-    const DEFAULT_CELL_WIDTH = 100
-    const DEFAULT_CELL_HEIGHT = 36
+    const DEFAULT_CELL_WIDTH = 200
+    const DEFAULT_CELL_HEIGHT = 72
 
     const colWidths: number[] = new Array(col).fill(1 / col)
 
@@ -150,7 +150,7 @@ export default () => {
         colHeader: false,
         colFooter: false
       },
-      cellMinHeight: 36
+      cellMinHeight: 72
     })
   }
 
@@ -242,7 +242,7 @@ export default () => {
       points: data.points,
       color: theme.value.themeColor,
       style: data.style,
-      width: 2
+      width: 4
     }
     if (data.isBroken) newElement.broken = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]
     if (data.isBroken2) newElement.broken2 = [(start[0] + end[0]) / 2, (start[1] + end[1]) / 2]
@@ -271,7 +271,7 @@ export default () => {
       path: data.path,
       latex: data.latex,
       color: theme.value.fontColor,
-      strokeWidth: 2,
+      strokeWidth: 4,
       viewBox: [data.w, data.h],
       fixedRatio: true
     })
@@ -286,11 +286,11 @@ export default () => {
       type: "elf",
       subtype: "elf-video",
       id: nanoid(10),
-      width: 500,
-      height: 300,
+      width: 1000,
+      height: 600,
       rotate: 0,
-      left: (viewportSize.value - 500) / 2,
-      top: (viewportSize.value * viewportRatio.value - 300) / 2,
+      left: (viewportSize.value - 1000) / 2,
+      top: (viewportSize.value * viewportRatio.value - 600) / 2,
       src,
       autoplay: false
     })
@@ -308,8 +308,8 @@ export default () => {
       width: 100,
       height: 100,
       rotate: 0,
-      left: (viewportSize.value - 50) / 2,
-      top: (viewportSize.value * viewportRatio.value - 50) / 2,
+      left: (viewportSize.value - 100) / 2,
+      top: (viewportSize.value * viewportRatio.value - 100) / 2,
       loop: false,
       autoplay: false,
       fixedRatio: true,

+ 7 - 7
src/views/Editor/Canvas/ElementCreateSelection.vue

@@ -1,5 +1,5 @@
 <template>
-  <div 
+  <div
     class="element-create-selection"
     ref="selectionRef"
     @mousedown.stop="$event => createSelection($event)"
@@ -10,15 +10,15 @@
       <!-- 绘制线条专用 -->
       <svg
         v-if="creatingElement?.type === 'line' && lineData"
-        overflow="visible" 
+        overflow="visible"
         :width="lineData.svgWidth"
         :height="lineData.svgHeight"
       >
 				<path
-          :d="lineData.path" 
-          stroke="#d14424" 
-          fill="none" 
-          stroke-width="2" 
+          :d="lineData.path"
+          stroke="#5b9bd5"
+          fill="none"
+          stroke-width="2"
         ></path>
 			</svg>
     </div>
@@ -228,4 +228,4 @@ const position = computed(() => {
     border: 1px solid $themeColor;
   }
 }
-</style>
+</style>

+ 6 - 6
src/views/Editor/Canvas/ShapeCreateCanvas.vue

@@ -1,5 +1,5 @@
 <template>
-  <div 
+  <div
     class="shape-create-canvas"
     ref="shapeCanvasRef"
     @mousedown.stop="$event => addPoint($event)"
@@ -8,10 +8,10 @@
   >
     <svg overflow="visible">
 			<path
-        :d="path" 
-        stroke="#d14424" 
-        :fill="closed ? 'rgba(226, 83, 77, 0.15)' : 'none'" 
-        stroke-width="2" 
+        :d="path"
+        stroke="#5b9bd5"
+        :fill="closed ? 'rgba(226, 83, 77, 0.15)' : 'none'"
+        stroke-width="2"
       ></path>
 		</svg>
   </div>
@@ -192,4 +192,4 @@ onUnmounted(() => {
     overflow: visible;
   }
 }
-</style>
+</style>

+ 1 - 2
src/views/Editor/Toolbar/ElementStylePanel/TableStylePanel.vue

@@ -202,7 +202,7 @@ const { handleElement, handleElementId, selectedTableCells: selectedCells, avail
 const themeColor = computed(() => slidesStore.theme.themeColor)
 
 const fontSizeOptions = [
-  '12px', '14px', '16px', '18px', '20px', '22px', '24px', '28px', '32px',
+  '24px', '28px', '32px', '36px', '40px', '44px', '48px', '56px', '64px',
 ]
 
 const textAttrs = ref({
@@ -251,7 +251,6 @@ const updateTextAttrState = () => {
     colIndex = +selectedCell.split('_')[1]
   }
   const style = handleElement.value.data[rowIndex][colIndex].style
-  debugger
   if (!style) {
     textAttrs.value = {
       bold: false,

+ 2 - 2
src/views/components/element/hooks/useElementOutline.ts

@@ -5,7 +5,7 @@ import type { PPTElementOutline } from '@/types/slides'
 export default (outline: Ref<PPTElementOutline | undefined>) => {
   const outlineWidth = computed(() => outline.value?.width ?? 0)
   const outlineStyle = computed(() => outline.value?.style || 'solid')
-  const outlineColor = computed(() => outline.value?.color || '#d14424')
+  const outlineColor = computed(() => outline.value?.color || '#5b9bd5')
 
   const strokeDashArray = computed(() => {
     const size = outlineWidth.value
@@ -20,4 +20,4 @@ export default (outline: Ref<PPTElementOutline | undefined>) => {
     outlineColor,
     strokeDashArray,
   }
-}
+}