0.0.1 • Published 5 years ago
bybon-ui v0.0.1
#Bybon UI 基础模块
##简介 基础模块是独立于业务的功能模块,是业务控件的基础。 其中包含的组件,方法等与业务无关,实现逻辑不能包含业务相关逻辑。
##包含的控件类别 1. 组件 位置:/src/components 组件使用如下方法进行注册:
Vue.component('name', component);
使用时,通过组件标签进行引用:
<component-name></component-name>
- 方法 位置:/src/methods 方法使用如下方法进行注册:
Vue.prototype.method = method;
使用时,通过 Vue 实例调用该方法:
vm.method(options);
主题 位置:/src/themes
mixins 位置:/src/mixins
directives 位置:/src/directives
##命名规范 1. 组件
- 组件名采用驼峰命名法,首字母大写。
- 组件名须以Byb开头
- 组件中使用到的 html class 名称,须以byb-开头
- 组件中的方法采用驼峰命名,首字母小写,名称尽量简短易懂
- 组件中的私有方法(内部使用,不对外暴露),须以byb开头,例如:bybPrivateMethod
- 组件中的共有方法(对外暴露,可以通过$refs.component.publicMethod引用),不需要加 byb 开头
- 方法
- 方法采用驼峰命名,首字母小写,名称尽量简短易懂
- 方法中的私有方法(内部使用,不对外暴露),须以byb开头,例如:bybPrivateMethod
- 方法中的共有方法(对外暴露,可以通过vm.$publicMethod引用),须以$开头,例如$publicMethod
##Icon icon使用阿里巴巴的 iconfont, 详细内容请访问: https://www.iconfont.cn/collections/detail?spm=a313x.7781069.1998910419.d9df05512&cid=33
0.0.1
5 years ago