mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2026-01-23 06:18:11 +00:00
24 lines
492 B
Vue
24 lines
492 B
Vue
<template>
|
|
<span ref="target" class="m-editor-resizer" :class="{ 'm-editor-resizer-draging': isDraging }">
|
|
<slot></slot>
|
|
</span>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { ref } from 'vue';
|
|
import type { OnDrag } from 'gesto';
|
|
|
|
import { useGetSo } from '@editor/hooks/use-getso';
|
|
|
|
defineOptions({
|
|
name: 'MEditorResizer',
|
|
});
|
|
|
|
const emit = defineEmits<{
|
|
change: [e: OnDrag];
|
|
}>();
|
|
|
|
const target = ref<HTMLSpanElement>();
|
|
const { isDraging } = useGetSo(target, emit);
|
|
</script>
|