zcl-personalcenter
v0.1.2
Published
个人中心
Downloads
2
Readme
personalcenter
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Customize configuration
岗隆购-个人中心组件
API
Props
|参数 |说明 |类型 |默认值|必须 | |:- | :-| :-| :-| :-| |base_url |api接口基础头,例如:http://192.168.0.37:8008/api/v1/|String|- |true| |user_token|用户token |String|- |true| |login_or_out_show|登录退出按钮是否展示 |Boolean|true|false|
Events
|事件名 |说明 |回调参数 | |:- | :-| :-| |user_login_out |退出登录|-| |user_login |登录/注册|-| |user_setting|设置|-| |update_logo_img|修改logo图片|-| |edit_user_information|修改用户信息|-| |see_integral|查看积分|-| |see_coupon|查看优惠券|-| |see_order|查看订单|code:0是全部,1是待支付,2是待收货,3是待评价,4是退货/售后| |see_address|查看收货地址|-|
Example
- 下载
npm i ganglonggou-personal-center
- main.js
import PersonalCenter from "ganglonggou-personal-center/personal-center.common";
import "ganglonggou-personal-center/personal-center.css"
Vue.use(PersonalCenter);
- 使用
<personal-center :user_token="user_token" :base_url="base_url" :login_or_out_show="false"
@user_login_out="user_login_out" @user_login="user_login" @user_setting="user_setting"
@update_logo_img="update_logo_img" @edit_user_information="edit_user_information"
@see_integral="see_integral" @see_coupon="see_coupon" @see_order="see_order"
@see_address="see_address">
</personal-center>