MicroCommunityWeb/docs/core/core.md
2020-03-20 11:44:21 +08:00

40 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## vcFramework 核心介绍
$that 为一个vue对象(为兼容0.1 版本 vc.component 也是为一个vue对象)在页面加载最后去创建页面组件中只存在一个vue对象也就是多个组件公用一个vue对象是用vc.extends()方法去继承 vue对象extends参数介绍如下
>vc.extends({
> propTypes: {
>
> },
> data:{
>
> },
> watch:function(){
> },
> _initMethod:function(){
>
> },
> _initEvent:function(){
>
> },
> methods:{
>
> }
> });
### propTypes节点
组件参数,一般情况下这个节点可以不用写,只有 引入组件时,需要传参时,才会用到。
### data节点
data节点就是vue的data节点用作数据绑定data下的最好是一个对象对象名取名为当前组件名+info组成对象下再去写需要绑定的字段信息这样做的目的是为 多个组件之间取相同的字段名称 导致影响显示效果。
### watch节点
watch节点为 vue的watch节点