Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
vue3-transform-dom
Advanced tools
一个基于Vue3的可以缩放和拖动dom元素的组件
npm install vue3-transform-dom --save
属性名 | 说明 | 类型 | 默认值 |
---|---|---|---|
width | 宽 | number | - |
height | 高 | number | - |
disableMove | 是否禁止移动 | boolean | false |
disableScale | 是否禁止缩放 | boolean | false |
scaleStep | 宽 | number | 0.1 |
minWH | dom被缩小到的最小的宽高尺寸 | number | 1 |
maxWH | dom被放大到的最大的宽高尺寸 | number | Infinity |
limitInWindow | 是否限制数据始终有区域位于窗口内部 | boolean | false |
limitSize | 显示在窗口内部的最小值 | number | 100 |
{
/**
* @see {https://www.npmjs.com/package/transfer-to-window}
*/
transfer2window: TransferTowindow;
}
/**
* 获取鼠标相对于el的坐标
*/
getPosition(e: MouseEvent): { x: number, y: number }
/**
* 强制刷新
*/
forceFresh()
/**
* 中心缩放
* @param zoomOut 放大
*/
zoomByCenter(zoomOut: boolean)
transfer2window
参考transfer-to-window<template>
<transform-dom :width="1024" :height="1024">
<div class="inner">
inner dom
</div>
</transform-dom>
</template>
FAQs
A component based on vue3 that can scale and drag dom...
We found that vue3-transform-dom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.