|
@@ -54,6 +54,7 @@ export default defineComponent({
|
|
|
});
|
|
|
const route = useRoute();
|
|
|
const isDragIng = ref(false);
|
|
|
+ const NPopoverRef = ref()
|
|
|
const initMoveable = async () => {
|
|
|
if (document.querySelector('.wrap')) {
|
|
|
const moveable = new Moveable(document.querySelector('.wrap') as any, {
|
|
@@ -98,6 +99,7 @@ export default defineComponent({
|
|
|
// clientY
|
|
|
}) => {
|
|
|
isDragIng.value = true;
|
|
|
+ NPopoverRef.value.setShow(false)
|
|
|
const subdEl = document.getElementById(
|
|
|
`moveNPopover`
|
|
|
) as HTMLDivElement;
|
|
@@ -319,15 +321,15 @@ export default defineComponent({
|
|
|
onMounted(() => {
|
|
|
initMoveable();
|
|
|
// // initMoveableClass();
|
|
|
- // const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
|
|
|
+ const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
|
|
|
// // const classEl = document.getElementById(
|
|
|
// // `moveNPopover2`
|
|
|
// // ) as HTMLDivElement;
|
|
|
- // initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
+ initBoxRectInfo(subdEl, boxBoundaryInfo);
|
|
|
// // initBoxRectInfo(classEl, classBoundaryInfo);
|
|
|
- // initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
+ initBoundaryWrap(subdEl, boxBoundaryInfo);
|
|
|
// // initBoundaryWrap(classEl, classBoundaryInfo);
|
|
|
- // window.addEventListener("resize", resetSize);
|
|
|
+ window.addEventListener("resize", resetSize);
|
|
|
});
|
|
|
|
|
|
const resetSize = ()=>{
|
|
@@ -394,22 +396,22 @@ export default defineComponent({
|
|
|
}
|
|
|
// rate(target, 0)
|
|
|
});
|
|
|
- // target.addEventListener('contextmenu', (event: any) => {
|
|
|
- // event.preventDefault();
|
|
|
- // dialog.warning({
|
|
|
- // title: '提示',
|
|
|
- // content: '是否收入托盘',
|
|
|
- // positiveText: '确定',
|
|
|
- // negativeText: '取消',
|
|
|
- // onPositiveClick: () => {
|
|
|
- // console.log('确定')
|
|
|
- // },
|
|
|
- // onNegativeClick: () => {
|
|
|
- // console.log('取消')
|
|
|
- // }
|
|
|
- // })
|
|
|
+ target.addEventListener('contextmenu', (event: any) => {
|
|
|
+ event.preventDefault();
|
|
|
+ dialog.warning({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否收入托盘',
|
|
|
+ positiveText: '确定',
|
|
|
+ negativeText: '取消',
|
|
|
+ onPositiveClick: () => {
|
|
|
+ console.log('确定')
|
|
|
+ },
|
|
|
+ onNegativeClick: () => {
|
|
|
+ console.log('取消')
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- // });
|
|
|
+ });
|
|
|
|
|
|
actionEnd(target, 'right');
|
|
|
};
|
|
@@ -434,7 +436,7 @@ export default defineComponent({
|
|
|
|
|
|
// 这里是选装的方式
|
|
|
const actionEnd = (target: any, type: any) => {
|
|
|
- return
|
|
|
+
|
|
|
switch (type) {
|
|
|
case 'left':
|
|
|
rate(target, '90deg');
|
|
@@ -533,6 +535,7 @@ export default defineComponent({
|
|
|
<NPopover
|
|
|
raw
|
|
|
trigger="click"
|
|
|
+ ref={NPopoverRef}
|
|
|
show-arrow={false}
|
|
|
placement={directionType.value as 'left' | 'right'}
|
|
|
v-slots={{
|