Skip to content

Commit

Permalink
update demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengFeijie committed Oct 25, 2019
1 parent 63e1041 commit be2ae8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Vue的倒计时组件
// 全局注册
Vue.use(vueTimerCountdown, { component: 'TimerCountdown' }) // 组件名默认是:timer-countdown
```
```javascript
import Vue from 'vue'
import { vueTimerCountdown } from 'vue-timer-countdown'

// 全局注册
Vue.component('TimerCountdown', vueTimerCountdown)
```
2. 浏览器

```html
Expand All @@ -39,6 +47,7 @@ Vue的倒计时组件
<script>
// 全局注册
Vue.use(vueTimerCountdown.default, { component: 'timer-countdown' }) // 组件名默认是:timer-countdown
// 或:Vue.component('timer-countdown', vueTimerCountdown.vueTimerCountdown)
</script>
```
2. 局部注册
Expand Down
1 change: 1 addition & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<script>
// 全局注册
// Vue.use(vueTimerCountdown.default, { component: 'timer-countdown' })
// 或:Vue.component('timer-countdown', vueTimerCountdown.vueTimerCountdown)

new Vue({
components: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"rollup-plugin-vue": "^5.0.1",
"vue-template-compiler": "^2.6.10"
},
"version": "1.1.0"
"version": "1.1.1"
}

0 comments on commit be2ae8f

Please sign in to comment.