Preview预览组件
注意
需要 组件 ^0.2.x 版本
组件参数
参数键名 | 数据类型 | 默认值 | 说明 | 备注 |
---|---|---|---|---|
target | string | SVPrint | 容器 Id 或 ClassName | |
dragKey | string | default | 必填, 拖拽标识 | |
dragStyle | string | "" | 必填, 默认位置,大小 | |
mode | string | default | 模式: "default", "top", "left", "bottom", "right", "fixed" | |
show | boolean | false | 是否显示 |
示例(vue3)
<template>
<div style="width: 100vw; height: 97vh;">
<Designer>
<template #other>
<DragBox target="SVPrint" drag-key="test" drag-style="width:200px;height:200px;left:238px;top:95px"
:show="true">
<template #iconTitle>
<i class="svicon sv-print"></i><span>自定义拖拽框</span>
</template>
<template #body>
<div>自定义拖拽框内容</div>
</template>
</DragBox>
</template>
</Designer>
</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from "vue";
import { Designer, Header, Preview, DragBox } from "@sv-print/vue3";
</script>