浏览代码

代码同步

pipipi-pikachu 5 年之前
父节点
当前提交
628dee10d6

文件差异内容过多而无法显示
+ 575 - 536
package-lock.json


+ 1 - 1
package.json

@@ -9,7 +9,7 @@
     "lint": "vue-cli-service lint"
   },
   "dependencies": {
-    "@icon-park/vue-next": "^1.2.1",
+    "@icon-park/vue-next": "^1.2.2",
     "animate.css": "^4.1.1",
     "ant-design-vue": "^2.0.0-rc.3",
     "chartist": "^0.11.4",

+ 1 - 13
src/types/slides.ts

@@ -149,20 +149,8 @@ export interface PPTTableElement {
   colSizes: number[];
   data: TableElementCell[][];
 }
-export interface PPTFormulaElement {
-  type: 'formula';
-  id: string;
-  left: number;
-  top: number;
-  lock?: boolean;
-  groupId?: string;
-  width: number;
-  height: number;
-  latex: string;
-  color?: string;
-}
 
-export type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement | PPTFormulaElement
+export type PPTElement = PPTTextElement | PPTImageElement | PPTShapeElement | PPTLineElement | PPTChartElement | PPTTableElement
 
 export interface PPTAnimation {
   elId: string;

+ 0 - 3
src/views/Editor/CanvasTool/index.vue

@@ -45,9 +45,6 @@
       <Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="插入表格">
         <IconInsertTable class="handler-item" />
       </Tooltip>
-      <Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="插入公式">
-        <IconFormula class="handler-item" />
-      </Tooltip>
     </div>
 
     <div class="right-handler">

+ 7 - 6
src/views/Editor/Toolbar/ElementStylePanel/ChartStylePanel/ChartDataEditor.vue

@@ -28,6 +28,7 @@
               <input 
                 :class="['item', { 'selected': rowIndex <= selectedRange[1] && colIndex <= selectedRange[0] }]"
                 :id="`cell-${rowIndex - 1}-${colIndex - 1}`"
+                autocomplete="off"
               >
             </td>
           </tr>
@@ -155,11 +156,8 @@ export default defineComponent({
         const x = currentPageX - startPageX
         const y = currentPageY - startPageY
 
-        let width = originWidth + x
-        let height = originHeight + y
-
-        if(width % CELL_WIDTH > CELL_WIDTH * 0.5) width = width + (CELL_WIDTH - width % CELL_WIDTH)
-        if(height % CELL_HEIGHT > CELL_HEIGHT * 0.5) height = height + (CELL_HEIGHT - height % CELL_HEIGHT)
+        const width = originWidth + x
+        const height = originHeight + y
 
         tempRangeSize.value = { width, height }
       }
@@ -169,7 +167,10 @@ export default defineComponent({
         document.onmousemove = null
         document.onmouseup = null
 
-        const { width, height } = tempRangeSize.value
+        let width = tempRangeSize.value.width
+        let height = tempRangeSize.value.height
+        if(width % CELL_WIDTH > CELL_WIDTH * 0.5) width = width + (CELL_WIDTH - width % CELL_WIDTH)
+        if(height % CELL_HEIGHT > CELL_HEIGHT * 0.5) height = height + (CELL_HEIGHT - height % CELL_HEIGHT)
 
         let row = Math.round(height / CELL_HEIGHT)
         let col = Math.round(width / CELL_WIDTH)