0.0.7 • Published 3 years ago

vue-hotzone-vue3 v0.0.7

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

Introduction

A vue2 hotzone component

Demo | 案例

Install

npm i 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)

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

Develop

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

$ cd vue-hotzone

$ yarn

$ yarn serve

License

Vue-hotzone is MIT licensed.

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago