0.0.5 • Published 6 years ago

hll-m-component v0.0.5

Weekly downloads
16
License
-
Repository
-
Last release
6 years ago

hll-m-component

hll移动端公共组件库,适用于Vue2.x,可以按需引入

安装

npm install hll-m-component --save

使用

注册组件

// 引入 hll-m-component 主文件
import { cityList } from 'hll-m-component';

// 全局注册组件
Vue.component('city-list', cityList);

// 局部注册(此例子为单文件组件)
import { cityList } from 'hll-m-component';
export default {
  components: {
    cityList
  }
}

.vue 单文件组件中使用:

<city-list :city-list-raw="cityList"
            :current-city-id="currentCityId"
            @chooseCity="getChoosedCity"
            v-if="isShowCityList && cityList.length"></city-list>

组件列表

  • cityList组件

组件参数说明

  1. cityList组件
选项类型是否必填描述
city-list-rawArray必填城市列表数据,城市列表数据(数据结构为2018年使用的数据结构)
current-city-idNumber or String必填当前城市id
chooseCityFunction必填接受组件向外传递的选中城市的数据

example地址

https://andrewuetyang.gitee.io/hll-m-component

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago