refactor: 补充emits声明

This commit is contained in:
pipipi-pikachu 2021-08-15 00:11:25 +08:00
parent cc75249551
commit 55a7f07218
22 changed files with 23 additions and 0 deletions

View File

@ -27,6 +27,7 @@ export default defineComponent({
components: {
Checkboard,
},
emits: ['colorChange'],
props: {
value: {
type: Object as PropType<ColorFormats.RGBA>,

View File

@ -34,6 +34,7 @@ const getCheckboard = (white: string, grey: string, size: number) => {
export default defineComponent({
name: 'checkboard',
emits: ['colorChange'],
props: {
size: {
type: Number,

View File

@ -14,6 +14,7 @@ import tinycolor, { ColorFormats } from 'tinycolor2'
export default defineComponent({
name: 'editable-input',
emits: ['colorChange'],
props: {
value: {
type: Object as PropType<ColorFormats.RGBA>,

View File

@ -21,6 +21,7 @@ import tinycolor, { ColorFormats } from 'tinycolor2'
export default defineComponent({
name: 'hue',
emits: ['colorChange'],
props: {
value: {
type: Object as PropType<ColorFormats.RGBA>,

View File

@ -25,6 +25,7 @@ import { throttle, clamp } from 'lodash'
export default defineComponent({
name: 'saturation',
emits: ['colorChange'],
props: {
value: {
type: Object as PropType<ColorFormats.RGBA>,

View File

@ -133,6 +133,7 @@ export default defineComponent({
Saturation,
EditableInput,
},
emits: ['update:modelValue'],
props: {
modelValue: {
type: String,

View File

@ -17,6 +17,7 @@ import { defineComponent, ref } from 'vue'
export default defineComponent({
name: 'file-input',
emits: ['change'],
props: {
accept: {
type: String,

View File

@ -33,6 +33,7 @@ import { useStore } from '@/store'
export default defineComponent({
name: 'element-create-selection',
emits: ['created'],
setup(props, { emit }) {
const store = useStore()
const ctrlOrShiftKeyActive = computed<boolean>(() => store.getters.ctrlOrShiftKeyActive)

View File

@ -17,6 +17,7 @@ import useLink from '@/hooks/useLink'
export default defineComponent({
name: 'link-dialog',
emits: ['close'],
setup(props, { emit }) {
const store = useStore()
const handleElement = computed<PPTElement | null>(() => store.getters.handleElement)

View File

@ -15,6 +15,7 @@ import { defineComponent } from 'vue'
export default defineComponent({
name: 'chart-pool',
emits: ['select'],
setup(props, { emit }) {
const chartList = ['bar', 'line', 'pie']

View File

@ -59,6 +59,7 @@ import LinePointMarker from '@/views/components/element/LineElement/LinePointMar
export default defineComponent({
name: 'line-pool',
emits: ['select'],
components: {
LinePointMarker,
},

View File

@ -39,6 +39,7 @@ import { SHAPE_LIST, ShapePoolItem } from '@/configs/shapes'
export default defineComponent({
name: 'shape-pool',
emits: ['select'],
setup(props, { emit }) {
const shapeList = SHAPE_LIST

View File

@ -58,6 +58,7 @@ import { message } from 'ant-design-vue'
export default defineComponent({
name: 'table-generator',
emits: ['insert', 'close'],
setup(props, { emit }) {
const endCell = ref<number[]>([])
const customRow = ref(3)

View File

@ -19,6 +19,7 @@ import { Slide } from '@/types/slides'
export default defineComponent({
name: 'remark',
emits: ['update:height'],
props: {
height: {
type: Number,

View File

@ -20,6 +20,7 @@ import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
export default defineComponent({
name: 'layout-pool',
emits: ['select'],
components: {
ThumbnailSlide,
},

View File

@ -54,6 +54,7 @@ const CELL_HEIGHT = 32
export default defineComponent({
name: 'chart-data-editor',
emits: ['save', 'close'],
props: {
data: {
type: Object as PropType<ChartData>,

View File

@ -25,6 +25,7 @@ import ThumbnailSlide from '@/views/components/ThumbnailSlide/index.vue'
export default defineComponent({
name: 'slide-thumbnails',
emits: ['close'],
components: {
ThumbnailSlide,
},

View File

@ -47,6 +47,7 @@ const writingBoardColors = ['#000000', '#ffffff', '#1e497b', '#4e81bb', '#e2534d
export default defineComponent({
name: 'writing-board-tool',
emits: ['close'],
components: {
WritingBoard,
},

View File

@ -75,6 +75,7 @@ type ScaleClipRangeType = 't-l' | 't-r' | 'b-l' | 'b-r'
export default defineComponent({
name: 'image-clip-handler',
emits: ['clip'],
props: {
src: {
type: String,

View File

@ -18,6 +18,8 @@ import { alignmentCommand } from '@/utils/prosemirror/commands/setTextAlign'
import { toggleList } from '@/utils/prosemirror/commands/toggleList'
export default defineComponent({
name: 'prosemirror-editor',
emits: ['update', 'focus', 'blur'],
props: {
elementId: {
type: String,

View File

@ -16,6 +16,7 @@ import { pasteCustomClipboardString, pasteExcelClipboardString } from '@/utils/c
export default defineComponent({
name: 'custom-textarea',
emits: ['updateValue', 'insertExcelData'],
props: {
value: {
type: String,

View File

@ -87,6 +87,7 @@ import CustomTextarea from './CustomTextarea.vue'
export default defineComponent({
name: 'editable-table',
emits: ['change', 'changeColWidths', 'changeSelectedCells'],
components: {
CustomTextarea,
},