mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
代码同步
This commit is contained in:
parent
33a4d93100
commit
628dee10d6
1111
package-lock.json
generated
1111
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
|||||||
"lint": "vue-cli-service lint"
|
"lint": "vue-cli-service lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@icon-park/vue-next": "^1.2.1",
|
"@icon-park/vue-next": "^1.2.2",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"ant-design-vue": "^2.0.0-rc.3",
|
"ant-design-vue": "^2.0.0-rc.3",
|
||||||
"chartist": "^0.11.4",
|
"chartist": "^0.11.4",
|
||||||
|
@ -149,20 +149,8 @@ export interface PPTTableElement {
|
|||||||
colSizes: number[];
|
colSizes: number[];
|
||||||
data: TableElementCell[][];
|
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 {
|
export interface PPTAnimation {
|
||||||
elId: string;
|
elId: string;
|
||||||
|
@ -45,9 +45,6 @@
|
|||||||
<Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="插入表格">
|
<Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="插入表格">
|
||||||
<IconInsertTable class="handler-item" />
|
<IconInsertTable class="handler-item" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="插入公式">
|
|
||||||
<IconFormula class="handler-item" />
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-handler">
|
<div class="right-handler">
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
<input
|
<input
|
||||||
:class="['item', { 'selected': rowIndex <= selectedRange[1] && colIndex <= selectedRange[0] }]"
|
:class="['item', { 'selected': rowIndex <= selectedRange[1] && colIndex <= selectedRange[0] }]"
|
||||||
:id="`cell-${rowIndex - 1}-${colIndex - 1}`"
|
:id="`cell-${rowIndex - 1}-${colIndex - 1}`"
|
||||||
|
autocomplete="off"
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -155,11 +156,8 @@ export default defineComponent({
|
|||||||
const x = currentPageX - startPageX
|
const x = currentPageX - startPageX
|
||||||
const y = currentPageY - startPageY
|
const y = currentPageY - startPageY
|
||||||
|
|
||||||
let width = originWidth + x
|
const width = originWidth + x
|
||||||
let height = originHeight + y
|
const 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)
|
|
||||||
|
|
||||||
tempRangeSize.value = { width, height }
|
tempRangeSize.value = { width, height }
|
||||||
}
|
}
|
||||||
@ -169,7 +167,10 @@ export default defineComponent({
|
|||||||
document.onmousemove = null
|
document.onmousemove = null
|
||||||
document.onmouseup = 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 row = Math.round(height / CELL_HEIGHT)
|
||||||
let col = Math.round(width / CELL_WIDTH)
|
let col = Math.round(width / CELL_WIDTH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user