mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: 移除未使用的变量
This commit is contained in:
parent
faf18f61d4
commit
e52598ca99
@ -61,7 +61,6 @@ module.exports = {
|
|||||||
'no-useless-return': 'error',
|
'no-useless-return': 'error',
|
||||||
'array-bracket-spacing': 'error',
|
'array-bracket-spacing': 'error',
|
||||||
'no-useless-escape': 'off',
|
'no-useless-escape': 'off',
|
||||||
'no-unused-vars': 'off',
|
|
||||||
'no-eval': 'error',
|
'no-eval': 'error',
|
||||||
'no-var': 'error',
|
'no-var': 'error',
|
||||||
'no-with': 'error',
|
'no-with': 'error',
|
||||||
@ -75,7 +74,6 @@ module.exports = {
|
|||||||
'{}': false,
|
'{}': false,
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||||
'vue/multi-word-component-names': 'off',
|
'vue/multi-word-component-names': 'off',
|
||||||
'vue/no-reserved-component-names': 'off',
|
'vue/no-reserved-component-names': 'off',
|
||||||
|
@ -160,7 +160,7 @@ export const SHAPE_PATH_FORMULAS = {
|
|||||||
defaultValue: 0.5,
|
defaultValue: 0.5,
|
||||||
range: [0, 1],
|
range: [0, 1],
|
||||||
relative: 'left',
|
relative: 'left',
|
||||||
getBaseSize: (width: number, height: number) => width,
|
getBaseSize: (width: number) => width,
|
||||||
formula: (width: number, height: number, value: number) => {
|
formula: (width: number, height: number, value: number) => {
|
||||||
const vertex = width * value
|
const vertex = width * value
|
||||||
return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`
|
return `M ${vertex} 0 L 0 ${height} L ${width} ${height} Z`
|
||||||
@ -171,7 +171,7 @@ export const SHAPE_PATH_FORMULAS = {
|
|||||||
defaultValue: 0.25,
|
defaultValue: 0.25,
|
||||||
range: [0, 0.9],
|
range: [0, 0.9],
|
||||||
relative: 'left',
|
relative: 'left',
|
||||||
getBaseSize: (width: number, height: number) => width,
|
getBaseSize: (width: number) => width,
|
||||||
formula: (width: number, height: number, value: number) => {
|
formula: (width: number, height: number, value: number) => {
|
||||||
const point = width * value
|
const point = width * value
|
||||||
return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`
|
return `M ${point} 0 L ${width} 0 L ${width - point} ${height} L 0 ${height} Z`
|
||||||
@ -182,7 +182,7 @@ export const SHAPE_PATH_FORMULAS = {
|
|||||||
defaultValue: 0.25,
|
defaultValue: 0.25,
|
||||||
range: [0, 0.9],
|
range: [0, 0.9],
|
||||||
relative: 'right',
|
relative: 'right',
|
||||||
getBaseSize: (width: number, height: number) => width,
|
getBaseSize: (width: number) => width,
|
||||||
formula: (width: number, height: number, value: number) => {
|
formula: (width: number, height: number, value: number) => {
|
||||||
const point = width * value
|
const point = width * value
|
||||||
return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`
|
return `M 0 0 L ${width - point} 0 L ${width} ${height} L ${point} ${height} Z`
|
||||||
@ -193,7 +193,7 @@ export const SHAPE_PATH_FORMULAS = {
|
|||||||
defaultValue: 0.25,
|
defaultValue: 0.25,
|
||||||
range: [0, 0.5],
|
range: [0, 0.5],
|
||||||
relative: 'left',
|
relative: 'left',
|
||||||
getBaseSize: (width: number, height: number) => width,
|
getBaseSize: (width: number) => width,
|
||||||
formula: (width: number, height: number, value: number) => {
|
formula: (width: number, height: number, value: number) => {
|
||||||
const point = width * value
|
const point = width * value
|
||||||
return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`
|
return `M ${point} 0 L ${width - point} 0 L ${width} ${height} L 0 ${height} Z`
|
||||||
@ -215,7 +215,7 @@ export const SHAPE_PATH_FORMULAS = {
|
|||||||
defaultValue: 0.2,
|
defaultValue: 0.2,
|
||||||
range: [0, 0.9],
|
range: [0, 0.9],
|
||||||
relative: 'right',
|
relative: 'right',
|
||||||
getBaseSize: (width: number, height: number) => width,
|
getBaseSize: (width: number) => width,
|
||||||
formula: (width: number, height: number, value: number) => {
|
formula: (width: number, height: number, value: number) => {
|
||||||
const point = width * value
|
const point = width * value
|
||||||
return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`
|
return `M ${width} ${height / 2} L ${width - point} 0 L 0 0 L ${point} ${height / 2} L 0 ${height} L ${width - point} ${height} Z`
|
||||||
|
@ -123,6 +123,7 @@ const paragraph: NodeSpec = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/pipipi-pikachu/PPTist/issues/134
|
// https://github.com/pipipi-pikachu/PPTist/issues/134
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const { hard_break, ...otherNodes } = nodes
|
const { hard_break, ...otherNodes } = nodes
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Ref } from 'vue'
|
import { Ref } from 'vue'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useMainStore } from '@/store'
|
import { useMainStore } from '@/store'
|
||||||
import { CreateElementSelectionData, CreatingLineElement, CreatingShapeElement } from '@/types/edit'
|
import { CreateElementSelectionData } from '@/types/edit'
|
||||||
import useCreateElement from '@/hooks/useCreateElement'
|
import useCreateElement from '@/hooks/useCreateElement'
|
||||||
|
|
||||||
export default (viewportRef: Ref<HTMLElement | undefined>) => {
|
export default (viewportRef: Ref<HTMLElement | undefined>) => {
|
||||||
|
@ -86,7 +86,7 @@ import useOrderElement from '@/hooks/useOrderElement'
|
|||||||
import { ElementOrderCommands } from '@/types/edit'
|
import { ElementOrderCommands } from '@/types/edit'
|
||||||
|
|
||||||
import MoveablePanel from '@/components/MoveablePanel.vue'
|
import MoveablePanel from '@/components/MoveablePanel.vue'
|
||||||
import { Button, Input } from 'ant-design-vue'
|
import { Button } from 'ant-design-vue'
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
|
@ -60,7 +60,7 @@ import { ChartData } from '@/types/slides'
|
|||||||
import { KEYS } from '@/configs/hotkey'
|
import { KEYS } from '@/configs/hotkey'
|
||||||
import { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'
|
import { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/clipboard'
|
||||||
|
|
||||||
import { Button, Input } from 'ant-design-vue'
|
import { Button } from 'ant-design-vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useMainStore, useSlidesStore } from '@/store'
|
import { useMainStore, useSlidesStore } from '@/store'
|
||||||
import { SlideBackground, SlideTheme } from '@/types/slides'
|
import { SlideBackground, SlideTheme } from '@/types/slides'
|
||||||
|
@ -34,7 +34,7 @@ import { injectKeySlideId, injectKeySlideScale } from '@/types/injectKey'
|
|||||||
|
|
||||||
import VideoPlayer from './VideoPlayer/index.vue'
|
import VideoPlayer from './VideoPlayer/index.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
defineProps({
|
||||||
elementInfo: {
|
elementInfo: {
|
||||||
type: Object as PropType<PPTVideoElement>,
|
type: Object as PropType<PPTVideoElement>,
|
||||||
required: true,
|
required: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user