# 快速上手
## 使用之前
在開始使用 iPlay Uniapp 之前,你需要先閱讀[MPVUE](http://mpvue.com/mpvue/)的相關文檔。
## 如何使用
先下載 iPlay Uniapp 的代碼,將`components`目錄拷貝到自己的項目中。然后按照如下的方式使用組件,以 Button 為例,其它組件在對應的文檔頁查看:
[iPlay Uniapp下載地址](http://jueketang.com)
1\. 添加需要的組件:
~~~
//全局添加 --- 在main.js中添加
import iButton from '@/components/button/i-button.vue';
Vue.component('i-button', iButton);
//局部添加 --- 在使用頁面中添加
import iButton from '@/components/button/i-button.vue';
export default {
components: {
'i-button': iButton
}
}
~~~
2\. 在 vue頁面 中使用組件:
~~~
<i-button type="primary" @click="handleClick">這是一個按鈕</i-button>
~~~
## 預覽所有組件