禁用全局右键菜单,其他小调整
This commit is contained in:
parent
1f227e19ae
commit
e282818a7c
|
@ -6,7 +6,7 @@
|
||||||
<meta name="renderer" content="webkit" />
|
<meta name="renderer" content="webkit" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
<title>Hamster 幻灯片 v0.0.1-dev</title>
|
<title>PPTist v0.0.1-dev</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
@ -14,5 +14,9 @@
|
||||||
</noscript>
|
</noscript>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.oncontextmenu = e => e.preventDefault()
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="color-picker" @contextmenu.prevent>
|
<div class="color-picker">
|
||||||
<div class="picker-saturation-wrap">
|
<div class="picker-saturation-wrap">
|
||||||
<Saturation :value="color" :hue="hue" @change="value => changeColor(value)" />
|
<Saturation :value="color" :hue="hue" @change="value => changeColor(value)" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,7 +17,12 @@ export default () => {
|
||||||
store.commit(MutationTypes.SET_CANVAS_PERCENTAGE, percentage)
|
store.commit(MutationTypes.SET_CANVAS_PERCENTAGE, percentage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setCanvasPercentage = (percentage: number) => {
|
||||||
|
store.commit(MutationTypes.SET_CANVAS_PERCENTAGE, percentage)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
scaleCanvas,
|
scaleCanvas,
|
||||||
|
setCanvasPercentage,
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -117,7 +117,7 @@ export default defineComponent({
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
&.multi-select {
|
&.multi-select {
|
||||||
opacity: .3;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.animation-index {
|
.animation-index {
|
||||||
|
|
|
@ -51,6 +51,9 @@
|
||||||
<IconMinus class="handler-item viewport-size" @click="scaleCanvas('-')" />
|
<IconMinus class="handler-item viewport-size" @click="scaleCanvas('-')" />
|
||||||
<span class="text">{{canvasScalePercentage}}</span>
|
<span class="text">{{canvasScalePercentage}}</span>
|
||||||
<IconPlus class="handler-item viewport-size" @click="scaleCanvas('+')" />
|
<IconPlus class="handler-item viewport-size" @click="scaleCanvas('+')" />
|
||||||
|
<Tooltip :mouseLeaveDelay="0" :mouseEnterDelay="0.5" title="适配屏幕">
|
||||||
|
<IconFullScreen class="handler-item viewport-size-adaptation" @click="setCanvasPercentage(90)" />
|
||||||
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -85,7 +88,7 @@ export default defineComponent({
|
||||||
|
|
||||||
const canvasScalePercentage = computed(() => parseInt(canvasScale.value * 100 + '') + '%')
|
const canvasScalePercentage = computed(() => parseInt(canvasScale.value * 100 + '') + '%')
|
||||||
|
|
||||||
const { scaleCanvas } = useScaleCanvas()
|
const { scaleCanvas, setCanvasPercentage } = useScaleCanvas()
|
||||||
const { redo, undo } = useHistorySnapshot()
|
const { redo, undo } = useHistorySnapshot()
|
||||||
|
|
||||||
const { createImageElement, createChartElement } = useCreateElement()
|
const { createImageElement, createChartElement } = useCreateElement()
|
||||||
|
@ -123,6 +126,7 @@ export default defineComponent({
|
||||||
|
|
||||||
return {
|
return {
|
||||||
scaleCanvas,
|
scaleCanvas,
|
||||||
|
setCanvasPercentage,
|
||||||
canvasScalePercentage,
|
canvasScalePercentage,
|
||||||
canUndo,
|
canUndo,
|
||||||
canRedo,
|
canRedo,
|
||||||
|
|
Loading…
Reference in New Issue