|
@@ -2,13 +2,14 @@ import { css } from "@linaria/core";
|
|
|
import { defineComponent, onMounted, onUnmounted } from "vue";
|
|
|
import { useEditor } from "../../../..";
|
|
|
import { IconMove, IconClear, IconAdd, IconResizeY } from "@/assets/icons";
|
|
|
+import { TransferCtrl } from "@/modules/editor/controllers/TransferCtrl";
|
|
|
|
|
|
export const StreamCardTransfer = defineComponent({
|
|
|
setup() {
|
|
|
const editor = useEditor();
|
|
|
- const { store, controls, helper } = editor;
|
|
|
- const { streamCardTransferCtrl } = controls;
|
|
|
-
|
|
|
+ const { store, helper } = editor;
|
|
|
+
|
|
|
+ const streamCardTransferCtrl = new TransferCtrl(editor);
|
|
|
onMounted(() => {
|
|
|
const pageEl = helper.findRootComp()?.$el;
|
|
|
if (pageEl) {
|
|
@@ -24,7 +25,6 @@ export const StreamCardTransfer = defineComponent({
|
|
|
});
|
|
|
|
|
|
return () => {
|
|
|
-
|
|
|
const transferStyle = streamCardTransferCtrl.transferStyle;
|
|
|
|
|
|
return (
|
|
@@ -48,8 +48,11 @@ export const StreamCardTransfer = defineComponent({
|
|
|
<div
|
|
|
class={resizeHeightBtnCls}
|
|
|
style={{ top: transferStyle.height }}
|
|
|
- onMousedown={(e) =>
|
|
|
- streamCardTransferCtrl.mousedown(e, "resizeY")
|
|
|
+ onMousedown={(e) => {
|
|
|
+ e.stopPropagation();
|
|
|
+
|
|
|
+ streamCardTransferCtrl.mousedown(e, "resizeY")
|
|
|
+ }
|
|
|
}
|
|
|
>
|
|
|
<IconResizeY />
|