1.0.2 • Published 4 years ago

ch-control v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

此项目为h5移动端组件库,欢迎大家讨论,更期待您的pr

仓库源码地址:https://git.cardinfolink.net/Cardinfolink/servplat-h5/-/tree/ch-control

目录结构:

│  .babelrc
│  .editorconfig
│  .gitignore
│  .npmignore
│  .postcssrc.js
│  ch-control
│  control
│  index.html
│  package-lock.json
│  package.json
│  README.md
│  
├─build
│      build.js
│      check-versions.js
│      logo.png
│      utils.js
│      vue-loader.conf.js
│      webpack.base.conf.js
│      webpack.dev.conf.js
│      webpack.prod.conf.js
│      
├─config
│      dev.env.js
│      index.js
│      prod.env.js
│      
├─node_modules
├─pluign
│  │  index.js
│  │  README.md
│  │  
│  ├─assets
│  │  │  global.css
│  │  │  
│  │  └─images
│  │          upload.png
│  │          
│  ├─ch-components
│  │      button.vue
│  │      card.vue
│  │      index.js
│  │      line.vue
│  │      navbar.vue
│  │      title.vue
│  │      upload.vue
│  │      
│  └─lib
│          index.js
│          
├─src
│  │  App.vue
│  │  main.js
│  │  
│  ├─assets
│  │      button.png
│  │      logo.png
│  │      navbar.png
│  │      
│  ├─components
│  │      button-demo.vue
│  │      card-demo.vue
│  │      home-demo.vue
│  │      navbar-demo.vue
│  │      title-demo.vue
│  │      upload-demo.vue
│  │      
│  ├─router
│  │      index.js
│  │      
│  └─view
│          home.vue
│          
└─static
        .gitkeep

项目启动

npm start

本地访问路径
http://localhost:8080/#/

开发插件

1. 修改main.js文件如下。

import { Chui } from '../pluign/index.js'
import '../pluign/assets/global.css'

Vue.use(Chui)
2.在 pluign/ch-components/文件下新建单页面组件文件,修改pluign/ch-components/index.js 文件,引入新建文件组件。
3.修改 pluign/index.js文件,在Vue对象中注入组件。
4.在main.js文件按需引入或全局引入组件即可。