mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
refactor: 替换Button、RadioButton、NumberInput
This commit is contained in:
parent
efce656fa1
commit
9a339a52a9
@ -8,6 +8,7 @@
|
|||||||
'primary': !disabled && type === 'primary',
|
'primary': !disabled && type === 'primary',
|
||||||
'checkbox': !disabled && type === 'checkbox',
|
'checkbox': !disabled && type === 'checkbox',
|
||||||
'radio': !disabled && type === 'radio',
|
'radio': !disabled && type === 'radio',
|
||||||
|
'small': size === 'small',
|
||||||
}"
|
}"
|
||||||
@click="handleClick()"
|
@click="handleClick()"
|
||||||
>
|
>
|
||||||
@ -20,10 +21,12 @@ const props = withDefaults(defineProps<{
|
|||||||
checked?: boolean
|
checked?: boolean
|
||||||
disabled?: boolean
|
disabled?: boolean
|
||||||
type?: 'default' | 'primary' | 'checkbox' | 'radio'
|
type?: 'default' | 'primary' | 'checkbox' | 'radio'
|
||||||
|
size?: 'small' | 'normal'
|
||||||
}>(), {
|
}>(), {
|
||||||
checked: false,
|
checked: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
type: 'default',
|
type: 'default',
|
||||||
|
size: 'normal',
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@ -50,6 +53,13 @@ const handleClick = () => {
|
|||||||
letter-spacing: 1px;
|
letter-spacing: 1px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.small {
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding: 0 7px;
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&.default {
|
&.default {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 1px solid #d9d9d9;
|
border: 1px solid #d9d9d9;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
&.default + .button.default {
|
&.default + .button {
|
||||||
border-left-color: $themeColor;
|
border-left-color: $themeColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,11 +70,13 @@ watch(() => props.value, () => {
|
|||||||
if (props.value !== number.value) {
|
if (props.value !== number.value) {
|
||||||
number.value = props.value
|
number.value = props.value
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(number, () => {
|
watch(number, () => {
|
||||||
let value = +number.value
|
let value = +number.value
|
||||||
if (isNaN(value)) value = 0
|
if (isNaN(value)) value = props.min
|
||||||
else if (value > props.max) value = props.max
|
else if (value > props.max) value = props.max
|
||||||
else if (value < props.min) value = props.min
|
else if (value < props.min) value = props.min
|
||||||
|
|
||||||
|
@ -48,10 +48,8 @@ import useLink from '@/hooks/useLink'
|
|||||||
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
||||||
import Tabs from '@/components/Tabs.vue'
|
import Tabs from '@/components/Tabs.vue'
|
||||||
import Input from '@/components/Input.vue'
|
import Input from '@/components/Input.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import { Select } from 'ant-design-vue'
|
||||||
Select,
|
|
||||||
} from 'ant-design-vue'
|
|
||||||
const SelectOption = Select.Option
|
const SelectOption = Select.Option
|
||||||
|
|
||||||
type TypeKey = 'web' | 'slide'
|
type TypeKey = 'web' | 'slide'
|
||||||
|
@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { Button } from 'ant-design-vue'
|
|
||||||
import message from '@/utils/message'
|
import message from '@/utils/message'
|
||||||
import Tabs from '@/components/Tabs.vue'
|
import Tabs from '@/components/Tabs.vue'
|
||||||
import Input from '@/components/Input.vue'
|
import Input from '@/components/Input.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
type TypeKey = 'video' | 'audio'
|
type TypeKey = 'video' | 'audio'
|
||||||
interface TabItem {
|
interface TabItem {
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<div class="custom" v-else>
|
<div class="custom" v-else>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="label" style="flex: 1;">行数:</div>
|
<div class="label" style="flex: 1;">行数:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="20"
|
:max="20"
|
||||||
v-model:value="customRow"
|
v-model:value="customRow"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="label" style="flex: 1;">列数:</div>
|
<div class="label" style="flex: 1;">列数:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="20"
|
:max="20"
|
||||||
v-model:value="customCol"
|
v-model:value="customCol"
|
||||||
@ -54,10 +54,8 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import message from '@/utils/message'
|
import message from '@/utils/message'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
InputNumber,
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
Button,
|
|
||||||
} from 'ant-design-vue'
|
|
||||||
|
|
||||||
interface InsertData {
|
interface InsertData {
|
||||||
row: number
|
row: number
|
||||||
|
@ -83,11 +83,9 @@ import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
|||||||
import FullscreenSpin from '@/components/FullscreenSpin.vue'
|
import FullscreenSpin from '@/components/FullscreenSpin.vue'
|
||||||
import Switch from '@/components/Switch.vue'
|
import Switch from '@/components/Switch.vue'
|
||||||
import Slider from '@/components/Slider.vue'
|
import Slider from '@/components/Slider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
Radio,
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
} from 'ant-design-vue'
|
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(event: 'close'): void
|
(event: 'close'): void
|
||||||
@ -174,6 +172,7 @@ const expImage = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
.export {
|
.export {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
import { storeToRefs } from 'pinia'
|
import { storeToRefs } from 'pinia'
|
||||||
import { useSlidesStore } from '@/store'
|
import { useSlidesStore } from '@/store'
|
||||||
import useExport from '@/hooks/useExport'
|
import useExport from '@/hooks/useExport'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(event: 'close'): void
|
(event: 'close'): void
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
class="config-item"
|
class="config-item"
|
||||||
v-model:value="rangeType"
|
v-model:value="rangeType"
|
||||||
>
|
>
|
||||||
<RadioButton style="width: 50%;" value="all">全部幻灯片</RadioButton>
|
<RadioButton style="width: 50%;" value="all">全部</RadioButton>
|
||||||
<RadioButton style="width: 50%;" value="current">当前幻灯片</RadioButton>
|
<RadioButton style="width: 50%;" value="current">当前页</RadioButton>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -68,12 +68,10 @@ import { print } from '@/utils/print'
|
|||||||
|
|
||||||
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
|
||||||
import Switch from '@/components/Switch.vue'
|
import Switch from '@/components/Switch.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
Select,
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
Radio,
|
import { Select } from 'ant-design-vue'
|
||||||
} from 'ant-design-vue'
|
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
const SelectOption = Select.Option
|
const SelectOption = Select.Option
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
@ -157,6 +155,7 @@ const expPDF = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
.export {
|
.export {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -58,11 +58,9 @@ import useExport from '@/hooks/useExport'
|
|||||||
import FullscreenSpin from '@/components/FullscreenSpin.vue'
|
import FullscreenSpin from '@/components/FullscreenSpin.vue'
|
||||||
import Switch from '@/components/Switch.vue'
|
import Switch from '@/components/Switch.vue'
|
||||||
import Slider from '@/components/Slider.vue'
|
import Slider from '@/components/Slider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
Radio,
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
} from 'ant-design-vue'
|
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(event: 'close'): void
|
(event: 'close'): void
|
||||||
|
@ -41,11 +41,9 @@ import { useSlidesStore } from '@/store'
|
|||||||
import useExport from '@/hooks/useExport'
|
import useExport from '@/hooks/useExport'
|
||||||
|
|
||||||
import Slider from '@/components/Slider.vue'
|
import Slider from '@/components/Slider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
Radio,
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
} from 'ant-design-vue'
|
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(event: 'close'): void
|
(event: 'close'): void
|
||||||
|
@ -38,7 +38,7 @@ import MoveablePanel from '@/components/MoveablePanel.vue'
|
|||||||
import Tabs from '@/components/Tabs.vue'
|
import Tabs from '@/components/Tabs.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Input from '@/components/Input.vue'
|
import Input from '@/components/Input.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
type TypeKey = 'search' | 'replace'
|
type TypeKey = 'search' | 'replace'
|
||||||
interface TabItem {
|
interface TabItem {
|
||||||
|
@ -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 } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
|
@ -77,12 +77,12 @@
|
|||||||
|
|
||||||
<div class="config-item">
|
<div class="config-item">
|
||||||
<div style="flex: 3;">持续时长:</div>
|
<div style="flex: 3;">持续时长:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:min="500"
|
:min="500"
|
||||||
:max="3000"
|
:max="3000"
|
||||||
:step="500"
|
:step="500"
|
||||||
:value="element.duration"
|
:value="element.duration"
|
||||||
@change="value => updateElementAnimationDuration(element.id, value as number)"
|
@update:value="value => updateElementAnimationDuration(element.id, value)"
|
||||||
style="flex: 5;"
|
style="flex: 5;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -127,10 +127,10 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
|||||||
|
|
||||||
import Tabs from '@/components/Tabs.vue'
|
import Tabs from '@/components/Tabs.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import Draggable from 'vuedraggable'
|
import Draggable from 'vuedraggable'
|
||||||
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {
|
import {
|
||||||
InputNumber,
|
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
|
@ -27,33 +27,33 @@
|
|||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<InputNumber
|
<NumberInput
|
||||||
prefix="水平:"
|
prefix="水平:"
|
||||||
:step="5"
|
:step="5"
|
||||||
:value="left"
|
:value="left"
|
||||||
@change="value => updateLeft(value as number)"
|
@update:value="value => updateLeft(value)"
|
||||||
style="flex: 4;"
|
style="flex: 4;"
|
||||||
/>
|
/>
|
||||||
<div style="flex: 1;"></div>
|
<div style="flex: 1;"></div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
prefix="垂直:"
|
prefix="垂直:"
|
||||||
:step="5"
|
:step="5"
|
||||||
:value="top"
|
:value="top"
|
||||||
@change="value => updateTop(value as number)"
|
@update:value="value => updateTop(value)"
|
||||||
style="flex: 4;"
|
style="flex: 4;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-if="handleElement!.type !== 'line'">
|
<template v-if="handleElement!.type !== 'line'">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<InputNumber
|
<NumberInput
|
||||||
prefix="宽度:"
|
prefix="宽度:"
|
||||||
:min="minSize"
|
:min="minSize"
|
||||||
:max="1500"
|
:max="1500"
|
||||||
:step="5"
|
:step="5"
|
||||||
:disabled="isVerticalText"
|
:disabled="isVerticalText"
|
||||||
:value="width"
|
:value="width"
|
||||||
@change="value => updateWidth(value as number)"
|
@update:value="value => updateWidth(value)"
|
||||||
style="flex: 4;"
|
style="flex: 4;"
|
||||||
/>
|
/>
|
||||||
<template v-if="['image', 'shape', 'audio'].includes(handleElement!.type)">
|
<template v-if="['image', 'shape', 'audio'].includes(handleElement!.type)">
|
||||||
@ -61,14 +61,14 @@
|
|||||||
<IconUnlock style="flex: 1;" class="icon-btn" v-tooltip="'宽高比锁定'" @click="updateFixedRatio(true)" v-else />
|
<IconUnlock style="flex: 1;" class="icon-btn" v-tooltip="'宽高比锁定'" @click="updateFixedRatio(true)" v-else />
|
||||||
</template>
|
</template>
|
||||||
<div style="flex: 1;" v-else></div>
|
<div style="flex: 1;" v-else></div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
prefix="高度:"
|
prefix="高度:"
|
||||||
:min="minSize"
|
:min="minSize"
|
||||||
:max="800"
|
:max="800"
|
||||||
:step="5"
|
:step="5"
|
||||||
:disabled="isHorizontalText || handleElement!.type === 'table'"
|
:disabled="isHorizontalText || handleElement!.type === 'table'"
|
||||||
:value="height"
|
:value="height"
|
||||||
@change="value => updateHeight(value as number)"
|
@update:value="value => updateHeight(value)"
|
||||||
style="flex: 4;"
|
style="flex: 4;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -78,13 +78,13 @@
|
|||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<InputNumber
|
<NumberInput
|
||||||
prefix="旋转:"
|
prefix="旋转:"
|
||||||
:min="-180"
|
:min="-180"
|
||||||
:max="180"
|
:max="180"
|
||||||
:step="5"
|
:step="5"
|
||||||
:value="rotate"
|
:value="rotate"
|
||||||
@change="value => updateRotate(value as number)"
|
@update:value="value => updateRotate(value)"
|
||||||
style="flex: 8;"
|
style="flex: 8;"
|
||||||
/>
|
/>
|
||||||
<div style="flex: 1;"></div>
|
<div style="flex: 1;"></div>
|
||||||
@ -107,12 +107,9 @@ import useOrderElement from '@/hooks/useOrderElement'
|
|||||||
import useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'
|
import useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'
|
||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import {
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
InputNumber,
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
Button,
|
|
||||||
} from 'ant-design-vue'
|
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { handleElement, handleElementId } = storeToRefs(useMainStore())
|
const { handleElement, handleElementId } = storeToRefs(useMainStore())
|
||||||
|
@ -59,8 +59,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|||||||
import type { ChartData } from '@/types/slides'
|
import type { 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 from '@/components/Button.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
data: ChartData
|
data: ChartData
|
||||||
|
@ -118,12 +118,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<Button class="no-padding" style="flex: 2;">推荐主题</Button>
|
<Button class="no-padding" style="width: 40%;">推荐主题</Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
<Button
|
<Button
|
||||||
class="no-padding"
|
class="no-padding"
|
||||||
:disabled="themeColor.length >= 10"
|
:disabled="themeColor.length >= 10"
|
||||||
style="flex: 3;"
|
style="width: 60%;"
|
||||||
@click="addThemeColor()"
|
@click="addThemeColor()"
|
||||||
>
|
>
|
||||||
<IconPlus class="btn-icon" /> 添加主题色
|
<IconPlus class="btn-icon" /> 添加主题色
|
||||||
@ -162,12 +162,12 @@ import ColorPicker from '@/components/ColorPicker/index.vue'
|
|||||||
import Modal from '@/components/Modal.vue'
|
import Modal from '@/components/Modal.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Checkbox from '@/components/Checkbox.vue'
|
import Checkbox from '@/components/Checkbox.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
const SelectOption = Select.Option
|
const SelectOption = Select.Option
|
||||||
|
|
||||||
const presetChartThemes = [
|
const presetChartThemes = [
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<ElementFlip />
|
<ElementFlip />
|
||||||
|
|
||||||
<ButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<Button style="flex: 5;" @click="clipImage()"><IconTailoring class="btn-icon" /> 裁剪图片</Button>
|
<Button style="width: calc(100% / 6 * 5);" @click="clipImage()"><IconTailoring class="btn-icon" /> 裁剪图片</Button>
|
||||||
<Popover trigger="click" v-model:open="clipPanelVisible">
|
<Popover trigger="click" v-model:open="clipPanelVisible">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="clip">
|
<div class="clip">
|
||||||
@ -24,12 +24,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<template v-for="type in ratioClipOptions" :key="type.label">
|
<template v-for="typeItem in ratioClipOptions" :key="typeItem.label">
|
||||||
<div class="title" v-if="type.label">按{{type.label}}:</div>
|
<div class="title" v-if="typeItem.label">按{{typeItem.label}}:</div>
|
||||||
<ButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<Button
|
<Button
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
v-for="item in type.children"
|
v-for="item in typeItem.children"
|
||||||
:key="item.key"
|
:key="item.key"
|
||||||
@click="presetImageClip('rect', item.ratio)"
|
@click="presetImageClip('rect', item.ratio)"
|
||||||
>{{item.key}}</Button>
|
>{{item.key}}</Button>
|
||||||
@ -37,7 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<Button class="no-padding" style="flex: 1;"><IconDown /></Button>
|
<Button class="popover-btn" style="width: calc(100% / 6);"><IconDown /></Button>
|
||||||
</Popover>
|
</Popover>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
@ -75,11 +75,9 @@ import ElementFilter from '../common/ElementFilter.vue'
|
|||||||
import ElementColorMask from '../common/ElementColorMask.vue'
|
import ElementColorMask from '../common/ElementColorMask.vue'
|
||||||
import FileInput from '@/components/FileInput.vue'
|
import FileInput from '@/components/FileInput.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
Popover,
|
import { Popover } from 'ant-design-vue'
|
||||||
} from 'ant-design-vue'
|
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const shapeClipPathOptions = CLIPPATHS
|
const shapeClipPathOptions = CLIPPATHS
|
||||||
const ratioClipOptions = [
|
const ratioClipOptions = [
|
||||||
@ -322,4 +320,7 @@ const setBackgroundImage = () => {
|
|||||||
background-color: #e1e1e1;
|
background-color: #e1e1e1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.popover-btn {
|
||||||
|
padding: 0 3px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -18,11 +18,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div style="flex: 2;">粗细:</div>
|
<div style="flex: 2;">粗细:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="3"
|
:max="3"
|
||||||
:value="handleLatexElement.strokeWidth"
|
:value="handleLatexElement.strokeWidth"
|
||||||
@change="value => updateLatex({ strokeWidth: value as number })"
|
@update:value="value => updateLatex({ strokeWidth: value })"
|
||||||
style="flex: 3;"
|
style="flex: 3;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -53,11 +53,9 @@ import LaTeXEditor from '@/components/LaTeXEditor/index.vue'
|
|||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Modal from '@/components/Modal.vue'
|
import Modal from '@/components/Modal.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
InputNumber,
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
Button,
|
import { Popover } from 'ant-design-vue'
|
||||||
Popover,
|
|
||||||
} from 'ant-design-vue'
|
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { handleElement } = storeToRefs(useMainStore())
|
const { handleElement } = storeToRefs(useMainStore())
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div style="flex: 2;">线条宽度:</div>
|
<div style="flex: 2;">线条宽度:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:value="handleLineElement.width"
|
:value="handleLineElement.width"
|
||||||
@change="value => updateLine({ width: value as number })"
|
@update:value="value => updateLine({ width: value })"
|
||||||
style="flex: 3;"
|
style="flex: 3;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -73,8 +73,8 @@ import ElementShadow from '../common/ElementShadow.vue'
|
|||||||
import ColorButton from '../common/ColorButton.vue'
|
import ColorButton from '../common/ColorButton.vue'
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {
|
import {
|
||||||
InputNumber,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div style="flex: 2;">边框粗细:</div>
|
<div style="flex: 2;">边框粗细:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:value="outline.width"
|
:value="outline.width || 0"
|
||||||
@change="value => updateOutline({ width: value as number })"
|
@update:value="value => updateOutline({ width: value })"
|
||||||
style="flex: 3;"
|
style="flex: 3;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -118,7 +118,7 @@
|
|||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="richTextAttrs.align"
|
:value="richTextAttrs.align"
|
||||||
@change="e => updateFontStyle('align', e.target.value)"
|
@update:value="value => updateFontStyle('align', value)"
|
||||||
>
|
>
|
||||||
<RadioButton value="left" style="flex: 1;" v-tooltip="'左对齐'"><IconAlignTextLeft /></RadioButton>
|
<RadioButton value="left" style="flex: 1;" v-tooltip="'左对齐'"><IconAlignTextLeft /></RadioButton>
|
||||||
<RadioButton value="center" style="flex: 1;" v-tooltip="'居中'"><IconAlignTextCenter /></RadioButton>
|
<RadioButton value="center" style="flex: 1;" v-tooltip="'居中'"><IconAlignTextCenter /></RadioButton>
|
||||||
@ -140,18 +140,18 @@ import ColorButton from '../common/ColorButton.vue'
|
|||||||
import TextColorButton from '../common/TextColorButton.vue'
|
import TextColorButton from '../common/TextColorButton.vue'
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {
|
import {
|
||||||
InputNumber,
|
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
Radio,
|
|
||||||
Input,
|
Input,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
const { Button: RadioButton, Group: RadioGroup } = Radio
|
|
||||||
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
||||||
const InputGroup = Input.Group
|
const InputGroup = Input.Group
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { richTextAttrs, availableFonts, activeElementList } = storeToRefs(useMainStore())
|
const { richTextAttrs, availableFonts, activeElementList } = storeToRefs(useMainStore())
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
><IconFontSize />-</Button>
|
><IconFontSize />-</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
:checked="richTextAttrs.bold"
|
:checked="richTextAttrs.bold"
|
||||||
@ -186,9 +186,9 @@
|
|||||||
v-tooltip="'删除线'"
|
v-tooltip="'删除线'"
|
||||||
@click="emitRichTextCommand('strikethrough')"
|
@click="emitRichTextCommand('strikethrough')"
|
||||||
><IconStrikethrough /></CheckboxButton>
|
><IconStrikethrough /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
v-tooltip="'清除格式'"
|
v-tooltip="'清除格式'"
|
||||||
@ -200,7 +200,7 @@
|
|||||||
v-tooltip="'格式刷'"
|
v-tooltip="'格式刷'"
|
||||||
@click="toggleFormatPainter()"
|
@click="toggleFormatPainter()"
|
||||||
><IconFormatBrush /></CheckboxButton>
|
><IconFormatBrush /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
@ -208,7 +208,7 @@
|
|||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="richTextAttrs.align"
|
:value="richTextAttrs.align"
|
||||||
@change="e => emitRichTextCommand('align', e.target.value)"
|
@update:value="value => emitRichTextCommand('align', value)"
|
||||||
>
|
>
|
||||||
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
||||||
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
||||||
@ -219,7 +219,7 @@
|
|||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="textAlign"
|
:value="textAlign"
|
||||||
@change="e => updateTextAlign(e.target.value)"
|
@update:value="value => updateTextAlign(value as 'top' | 'middle' | 'bottom')"
|
||||||
>
|
>
|
||||||
<RadioButton value="top" v-tooltip="'顶对齐'" style="flex: 1;"><IconAlignTextTopOne /></RadioButton>
|
<RadioButton value="top" v-tooltip="'顶对齐'" style="flex: 1;"><IconAlignTextTopOne /></RadioButton>
|
||||||
<RadioButton value="middle" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextMiddleOne /></RadioButton>
|
<RadioButton value="middle" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextMiddleOne /></RadioButton>
|
||||||
@ -256,21 +256,20 @@ import ColorButton from '../common/ColorButton.vue'
|
|||||||
import TextColorButton from '../common/TextColorButton.vue'
|
import TextColorButton from '../common/TextColorButton.vue'
|
||||||
import ShapeItemThumbnail from '@/views/Editor/CanvasTool/ShapeItemThumbnail.vue'
|
import ShapeItemThumbnail from '@/views/Editor/CanvasTool/ShapeItemThumbnail.vue'
|
||||||
import CheckboxButton from '@/components/CheckboxButton.vue'
|
import CheckboxButton from '@/components/CheckboxButton.vue'
|
||||||
import CheckboxButtonGroup from '@/components/ButtonGroup.vue'
|
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Slider from '@/components/Slider.vue'
|
import Slider from '@/components/Slider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
Radio,
|
|
||||||
Input,
|
Input,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
||||||
const InputGroup = Input.Group
|
const InputGroup = Input.Group
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const mainStore = useMainStore()
|
const mainStore = useMainStore()
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
</Popover>
|
</Popover>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
:checked="textAttrs.bold"
|
:checked="textAttrs.bold"
|
||||||
@ -80,13 +80,13 @@
|
|||||||
v-tooltip="'删除线'"
|
v-tooltip="'删除线'"
|
||||||
@click="updateTextAttrs({ strikethrough: !textAttrs.strikethrough })"
|
@click="updateTextAttrs({ strikethrough: !textAttrs.strikethrough })"
|
||||||
><IconStrikethrough /></CheckboxButton>
|
><IconStrikethrough /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<RadioGroup
|
<RadioGroup
|
||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="textAttrs.align"
|
:value="textAttrs.align"
|
||||||
@change="e => updateTextAttrs({ align: e.target.value })"
|
@update:value="value => updateTextAttrs({ align: value as 'left' | 'center' | 'right' })"
|
||||||
>
|
>
|
||||||
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
||||||
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
||||||
@ -182,22 +182,21 @@ import ElementOutline from '../common/ElementOutline.vue'
|
|||||||
import ColorButton from '../common/ColorButton.vue'
|
import ColorButton from '../common/ColorButton.vue'
|
||||||
import TextColorButton from '../common/TextColorButton.vue'
|
import TextColorButton from '../common/TextColorButton.vue'
|
||||||
import CheckboxButton from '@/components/CheckboxButton.vue'
|
import CheckboxButton from '@/components/CheckboxButton.vue'
|
||||||
import CheckboxButtonGroup from '@/components/ButtonGroup.vue'
|
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Switch from '@/components/Switch.vue'
|
import Switch from '@/components/Switch.vue'
|
||||||
import Checkbox from '@/components/Checkbox.vue'
|
import Checkbox from '@/components/Checkbox.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
Radio,
|
|
||||||
Input,
|
Input,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
||||||
const InputGroup = Input.Group
|
const InputGroup = Input.Group
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { handleElement, handleElementId, selectedTableCells: selectedCells, availableFonts } = storeToRefs(useMainStore())
|
const { handleElement, handleElementId, selectedTableCells: selectedCells, availableFonts } = storeToRefs(useMainStore())
|
||||||
@ -412,7 +411,7 @@ const setTableCol = (value: number) => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 4px 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.count-text {
|
.count-text {
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
><IconFontSize />-</Button>
|
><IconFontSize />-</Button>
|
||||||
</ButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
:checked="richTextAttrs.bold"
|
:checked="richTextAttrs.bold"
|
||||||
@ -105,9 +105,9 @@
|
|||||||
v-tooltip="'删除线'"
|
v-tooltip="'删除线'"
|
||||||
@click="emitRichTextCommand('strikethrough')"
|
@click="emitRichTextCommand('strikethrough')"
|
||||||
><IconStrikethrough /></CheckboxButton>
|
><IconStrikethrough /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
:checked="richTextAttrs.superscript"
|
:checked="richTextAttrs.superscript"
|
||||||
@ -132,9 +132,9 @@
|
|||||||
v-tooltip="'引用'"
|
v-tooltip="'引用'"
|
||||||
@click="emitRichTextCommand('blockquote')"
|
@click="emitRichTextCommand('blockquote')"
|
||||||
><IconQuote /></CheckboxButton>
|
><IconQuote /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
v-tooltip="'清除格式'"
|
v-tooltip="'清除格式'"
|
||||||
@ -163,7 +163,7 @@
|
|||||||
@click="openLinkPopover()"
|
@click="openLinkPopover()"
|
||||||
><IconLinkOne /></CheckboxButton>
|
><IconLinkOne /></CheckboxButton>
|
||||||
</Popover>
|
</Popover>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
@ -171,7 +171,7 @@
|
|||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="richTextAttrs.align"
|
:value="richTextAttrs.align"
|
||||||
@change="e => emitRichTextCommand('align', e.target.value)"
|
@update:value="value => emitRichTextCommand('align', value)"
|
||||||
>
|
>
|
||||||
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
<RadioButton value="left" v-tooltip="'左对齐'" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
||||||
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
<RadioButton value="center" v-tooltip="'居中'" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
||||||
@ -317,21 +317,20 @@ import ElementShadow from '../common/ElementShadow.vue'
|
|||||||
import ColorButton from '../common/ColorButton.vue'
|
import ColorButton from '../common/ColorButton.vue'
|
||||||
import TextColorButton from '../common/TextColorButton.vue'
|
import TextColorButton from '../common/TextColorButton.vue'
|
||||||
import CheckboxButton from '@/components/CheckboxButton.vue'
|
import CheckboxButton from '@/components/CheckboxButton.vue'
|
||||||
import CheckboxButtonGroup from '@/components/ButtonGroup.vue'
|
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Input from '@/components/Input.vue'
|
import Input from '@/components/Input.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
Radio,
|
|
||||||
Input as AntInput,
|
Input as AntInput,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
const { OptGroup: SelectOptGroup, Option: SelectOption } = Select
|
||||||
const InputGroup = AntInput.Group
|
const InputGroup = AntInput.Group
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
// 注意,存在一个未知原因的BUG,如果文本加粗后文本框高度增加,画布的可视区域定位会出现错误
|
// 注意,存在一个未知原因的BUG,如果文本加粗后文本框高度增加,画布的可视区域定位会出现错误
|
||||||
// 因此在执行预置样式命令时,将加粗命令放在尽可能靠前的位置,避免字号增大后再加粗
|
// 因此在执行预置样式命令时,将加粗命令放在尽可能靠前的位置,避免字号增大后再加粗
|
||||||
|
@ -23,7 +23,7 @@ import { getImageDataURL } from '@/utils/image'
|
|||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
|
|
||||||
import FileInput from '@/components/FileInput.vue'
|
import FileInput from '@/components/FileInput.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { handleElement } = storeToRefs(useMainStore())
|
const { handleElement } = storeToRefs(useMainStore())
|
||||||
|
@ -31,9 +31,8 @@ import useAlignActiveElement from '@/hooks/useAlignActiveElement'
|
|||||||
import useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'
|
import useAlignElementToCanvas from '@/hooks/useAlignElementToCanvas'
|
||||||
import useUniformDisplayElement from '@/hooks/useUniformDisplayElement'
|
import useUniformDisplayElement from '@/hooks/useUniformDisplayElement'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
const { canCombine, combineElements, uncombineElements } = useCombineElement()
|
const { canCombine, combineElements, uncombineElements } = useCombineElement()
|
||||||
const { alignActiveElement } = useAlignActiveElement()
|
const { alignActiveElement } = useAlignActiveElement()
|
||||||
|
@ -24,8 +24,7 @@ import type { TurningMode } from '@/types/slides'
|
|||||||
import { SLIDE_ANIMATIONS } from '@/configs/animation'
|
import { SLIDE_ANIMATIONS } from '@/configs/animation'
|
||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
import message from '@/utils/message'
|
import message from '@/utils/message'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { slides, currentSlide } = storeToRefs(slidesStore)
|
const { slides, currentSlide } = storeToRefs(slidesStore)
|
||||||
|
@ -213,8 +213,8 @@ import FileInput from '@/components/FileInput.vue'
|
|||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import Slider from '@/components/Slider.vue'
|
import Slider from '@/components/Slider.vue'
|
||||||
|
import Button from '@/components/Button.vue'
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Button } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
color: string
|
color: string
|
||||||
@ -17,7 +17,7 @@ defineProps<{
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.color-btn {
|
.color-btn {
|
||||||
display: flex;
|
display: flex !important;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
@ -35,9 +35,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div style="flex: 2;">边框粗细:</div>
|
<div style="flex: 2;">边框粗细:</div>
|
||||||
<InputNumber
|
<NumberInput
|
||||||
:value="outline.width"
|
:value="outline.width || 0"
|
||||||
@change="value => updateOutline({ width: value as number })"
|
@update:value="value => updateOutline({ width: value })"
|
||||||
style="flex: 3;"
|
style="flex: 3;"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -55,8 +55,8 @@ import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
|||||||
import ColorButton from './ColorButton.vue'
|
import ColorButton from './ColorButton.vue'
|
||||||
import ColorPicker from '@/components/ColorPicker/index.vue'
|
import ColorPicker from '@/components/ColorPicker/index.vue'
|
||||||
import Switch from '@/components/Switch.vue'
|
import Switch from '@/components/Switch.vue'
|
||||||
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {
|
import {
|
||||||
InputNumber,
|
|
||||||
Popover,
|
Popover,
|
||||||
Select,
|
Select,
|
||||||
} from 'ant-design-vue'
|
} from 'ant-design-vue'
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Button } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
color: string
|
color: string
|
||||||
@ -17,7 +17,7 @@ defineProps<{
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.text-color-btn {
|
.text-color-btn {
|
||||||
display: flex;
|
display: flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="style" v-if="activeTab === 'style'">
|
<div class="style" v-if="activeTab === 'style'">
|
||||||
<CheckboxButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<CheckboxButton
|
<CheckboxButton
|
||||||
style="flex: 1;"
|
style="flex: 1;"
|
||||||
:checked="richTextAttrs.bold"
|
:checked="richTextAttrs.bold"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
:checked="richTextAttrs.strikethrough"
|
:checked="richTextAttrs.strikethrough"
|
||||||
@click="emitRichTextCommand('strikethrough')"
|
@click="emitRichTextCommand('strikethrough')"
|
||||||
><IconStrikethrough /></CheckboxButton>
|
><IconStrikethrough /></CheckboxButton>
|
||||||
</CheckboxButtonGroup>
|
</ButtonGroup>
|
||||||
|
|
||||||
<ButtonGroup class="row">
|
<ButtonGroup class="row">
|
||||||
<Button
|
<Button
|
||||||
@ -52,7 +52,7 @@
|
|||||||
class="row"
|
class="row"
|
||||||
button-style="solid"
|
button-style="solid"
|
||||||
:value="richTextAttrs.align"
|
:value="richTextAttrs.align"
|
||||||
@change="e => emitRichTextCommand('align', e.target.value)"
|
@update:value="value => emitRichTextCommand('align', value)"
|
||||||
>
|
>
|
||||||
<RadioButton value="left" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
<RadioButton value="left" style="flex: 1;"><IconAlignTextLeft /></RadioButton>
|
||||||
<RadioButton value="center" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
<RadioButton value="center" style="flex: 1;"><IconAlignTextCenter /></RadioButton>
|
||||||
@ -133,15 +133,12 @@ import useAddSlidesOrElements from '@/hooks/useAddSlidesOrElements'
|
|||||||
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
import useHistorySnapshot from '@/hooks/useHistorySnapshot'
|
||||||
|
|
||||||
import CheckboxButton from '@/components/CheckboxButton.vue'
|
import CheckboxButton from '@/components/CheckboxButton.vue'
|
||||||
import CheckboxButtonGroup from '@/components/ButtonGroup.vue'
|
|
||||||
import Tabs from '@/components/Tabs.vue'
|
import Tabs from '@/components/Tabs.vue'
|
||||||
import Divider from '@/components/Divider.vue'
|
import Divider from '@/components/Divider.vue'
|
||||||
import {
|
import Button from '@/components/Button.vue'
|
||||||
Button,
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
Radio,
|
import RadioButton from '@/components/RadioButton.vue'
|
||||||
} from 'ant-design-vue'
|
import RadioGroup from '@/components/RadioGroup.vue'
|
||||||
const { Group: RadioGroup, Button: RadioButton } = Radio
|
|
||||||
const ButtonGroup = Button.Group
|
|
||||||
|
|
||||||
interface TabItem {
|
interface TabItem {
|
||||||
key: 'style' | 'common'
|
key: 'style' | 'common'
|
||||||
|
@ -41,8 +41,8 @@ import { VIEWPORT_SIZE } from '@/configs/canvas'
|
|||||||
|
|
||||||
import MobileThumbnails from '../MobileThumbnails.vue'
|
import MobileThumbnails from '../MobileThumbnails.vue'
|
||||||
import FileInput from '@/components/FileInput.vue'
|
import FileInput from '@/components/FileInput.vue'
|
||||||
import { Button } from 'ant-design-vue'
|
import Button from '@/components/Button.vue'
|
||||||
const ButtonGroup = Button.Group
|
import ButtonGroup from '@/components/ButtonGroup.vue'
|
||||||
|
|
||||||
const slidesStore = useSlidesStore()
|
const slidesStore = useSlidesStore()
|
||||||
const { viewportRatio, currentSlide } = storeToRefs(slidesStore)
|
const { viewportRatio, currentSlide } = storeToRefs(slidesStore)
|
||||||
@ -121,6 +121,7 @@ const handleInputMark = (e: Event) => {
|
|||||||
outline: 0;
|
outline: 0;
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
@include absolute-0();
|
@include absolute-0();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user