Socket
Book a DemoInstallSign in
Socket

duo-image-zoomer

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

duo-image-zoomer

a image zoomer

1.0.2
latest
Source
npmnpm
Version published
Weekly downloads
10
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

一个简洁的图片放大镜

目录

  • 目录

快速入门

安装

$ npm i duo-image-zoomer --save             # install duo-image-zoomer 

用法

main.js 文件:


import duoImageZoomer from 'duo-image-zoomer'

Vue.use(duoImageZoomer)

使用:

<template>
  <div>
    <duo-image-zoomer 
      :mode="mode"
      :scale="scale"
      :width="width"
      :height="height"
      :imageList="imageList"
      :thumbnailSize="thumbnailSize"
    />
  </div>
</template>
<script>
export default {
  data() {
    return {
      scale: 6, // 缩放倍数
      width: 300, // 图片宽度
      height: 300, // 图片高度
      mode: "outer", // 模式:总共2种模式:inner/outer
      thumbnailSize: 40, // 缩略图尺寸
      imageList: [ // 图片资源
        "http://tenfei05.cfp.cn/creative/vcg/veer/612/veer-316521159.jpg",
        "http://static.veer.com/veer/static/resources/FourPack/2021-05-25/4403b939d6274a869e67acaa2fa35684.jpg",
        "https://shigongbao.oss-cn-chengdu.aliyuncs.com/pictures/2020-09-08/1599535221238-tQfrTrrwOLSdhtiVBY.jpg",
        "https://shigongbao.oss-cn-chengdu.aliyuncs.com/pictures/2020-09-08/1599535213868-GDJJZizFVtepBxlXpq.jpg",
        "https://goss.cfp.cn/static/home/h2_5.png",
        "http://tenfei01.cfp.cn/creative/vcg/veer/612/veer-303762225.jpg",
        "http://d300.paixin.com/thumbs/1739009/19194001/staff_1024.jpg",
        "https://goss.cfp.cn/static/home/h2_6.png",
        "http://d300.paixin.com/thumbs/1067920/20205975/staff_1024.jpg",
      ],
    };
  },
};
</script>

→ simple demo

维护者

Keywords

zoom

FAQs

Package last updated on 04 Jun 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.