vue-ad-bar
v0.1.2
Published
an ad bar base vue
Downloads
15
Maintainers
Readme
vue-ad-bar
Usage
Install
$ npm i vue-ad-bar
Mount
<template>
<div class="hello">
<vue-ad-bar :img="adsPic" bgColor="#d8d8d8" link="https://vv13.cn"></vue-ad-bar>
...
</div>
</template>
<script>
import VueAdBar from "vue-ad-bar";
import adsPic from "./ads.png";
export default {
components: {
VueAdBar
},
data() {
return {
adsPic,
};
}
};
</script>
API
| key | desc | type | default | required | | :-------- | ------------------------ | ------- | -------- | -------- | | img | ad img url | String | | true | | width | max width of the ad bar | String | "1200px" | | | height | max height of the ad bar | String | "80px" | | | link | ad link | String | | | | bgColor | bar background-color | String | | | | showClose | show close btn | Boolean | true | | | click | trigger by click ad-bar | Event | | | | close | trigger by close btn | Event | | | | close | close icon | Slot | | |