1.0.2 • Published 4 years ago

zy-scale-img v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

参数详情

参数值是否必填参数类型举例备注
width必填Number500不需要px
height必填Number500不需要px
url必填String'./demo.png'
scaleId必填String'scale_1'不需要#
container必填DomStringdocument.getElementsByClassName('abc')0放大镜容器
scale必填Number2.5放大倍数,1以上的数值

用法如下

执行命令:npm i zy-scale-img
引入方法:import { scaleImg } from "zy-scale-img"
html部分
javascript部分
    let options = {
        width: 500,
        height: 500,
        url: './demo.png',
        scaleId: 'scale_1',
        container:document.body || document.getElementsByClassName('abc')[0],
        scale:2
    }
    scaleImg(options)
效果预览
调用方式图1有误,应为scaleImg(options)

Image text Image text Image text

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago