mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
加入文档
This commit is contained in:
parent
c7690e85a0
commit
51ed4e3a36
@ -2,12 +2,10 @@
|
||||
* 安装
|
||||
|
||||
* [直接script](install/script.md)
|
||||
* [编码规范](start/CodeStandards.md)
|
||||
* [视频](start/vedio.md)
|
||||
|
||||
* 环境搭建
|
||||
* 说明
|
||||
|
||||
* [开发环境部署](start/dev_install.md)
|
||||
* [vcFramework是什么](read/read.md)
|
||||
* [生产环境部署](start/prod_install.md)
|
||||
|
||||
* 系统功能
|
||||
|
||||
@ -8,3 +8,5 @@
|
||||
><script src="/vcCore/vcFramework.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
42
docs/read/read.md
Normal file
42
docs/read/read.md
Normal file
@ -0,0 +1,42 @@
|
||||
## 介绍
|
||||
|
||||
### vcFramework 是什么
|
||||
vcFramework 是一套 前段组件化开发的套件,设计之初主要是为了解决前段不在依赖后端java等情况下完成组件化开发,也是为了改造HC小区管理系统为前后端分离系统。将一个目录下的HTML 文件和同名的JS文件定义为一个组件。
|
||||
|
||||
### 组件样例
|
||||
|
||||
#### 组件引入
|
||||
|
||||
> <div>
|
||||
> <vc:create name='helloword'>
|
||||
> </div>
|
||||
|
||||
#### 组件定义
|
||||
|
||||
1、HTML部分 文件名为 helloword.html
|
||||
|
||||
> <div>{{helloWordInfo.hello}}</div>
|
||||
|
||||
2、JS部分 文件名为 helloword.js
|
||||
|
||||
> (function (vc) {
|
||||
> var DEFAULT_PAGE = 1;
|
||||
> var DEFAULT_ROWS = 10;
|
||||
> vc.extends({
|
||||
> data: {
|
||||
> helloWordInfo: {
|
||||
> // 这里是 变量定义
|
||||
> hello:'hello word'
|
||||
> }
|
||||
> },
|
||||
> _initMethod: function () {
|
||||
> // 初始化方法
|
||||
> },
|
||||
> _initEvent: function () {
|
||||
> //这里是事件侦听
|
||||
> },
|
||||
> methods: {
|
||||
> a: function () {}
|
||||
> }
|
||||
> });
|
||||
>})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user