vue 区域组件_vue2热点区域组件

vue 区域组件

VUE-HOTZONE (VUE-HOTZONE)

Vue cover flow component(vue).

Vue盖流组件(vue)。

安装 (Install)

npm install vue-hotzone --save
# or
yarn add vue-hotzone

(Use)

// Use in component
import hotzone from 'vue-hotzone'

export default {
  components: {
    hotzone
  }
}

// Use in global
import hotzone from 'vue-hotzone'

Vue.component(hotzone.name, hotzone)

// or
Vue.use(hotzone)
<hotzone [options]></hotzone>

选件 (Options)

属性 (Attributes)

You can set them to your data function

您可以将它们设置为数据功能

AttributeTypeDescriptionKeys
imageStringimage of hotzone(required: true)
maxNumbermax number of zones
zonesInitArrayinit zonesitem(heightPer, leftPer, topPer, widthPer)
属性 类型 描述 按键
图片 hotzone的图片(必填:true)
最高 最大区域数
zoneInit 数组 初始化区 item(heightPer,leftPer,topPer,widthPer)
大事记 (Events)
Event NameDescriptionParameters
changetriggers when the zones changesthe array of the zones
addtriggers when the zone addthe add zone item
removetriggers when the zone removethe index of the remove zone
overRangetriggers when zones number > maxthe index of the overRange zone
erasetriggers when add zone overRange or smaller than the minimum area(48*48)the index of the erase zone
活动名称 描述 参量
更改 区域更改时触发 区域阵列
在区域添加时触发 添加区域项
去掉 区域删除时触发 删除区域的索引
范围外 当区域编号>最大时触发 overRange区域的索引
抹去 当添加区域overRange或小于最小区域时触发(48 * 48) 擦除区的索引

发展 (Develop)

git clone https://github.com/OrangeXC/vue-hotzone.git

cd vue-hotzone

yarn # or npm install

yarn serve # or npm run serve

翻译自: https://vuejsexamples.com/a-vue2-hot-zone-component/

vue 区域组件

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值