Giter Site home page Giter Site logo

vue-covid's Introduction

项目介绍

  1. 丁香医生疫情 移动端H5
  2. 腾讯疫情 结合

项目准备工作

  1. 搭建项目 依赖 vue create vue-yiqing (router)

  2. 项目初始化

    1. css初始化
    2. 移动端适配
    3. 图标(iconfont)
    4. 网络请求axios npm i axios querystring -S
    5. 其他三方库 npm i swiper -S npm i moment -S
    6. vant组件库
          npm i vant@latest-v2 -S
          npm i babel-plugin-import -D
          // 对于使用 babel7 的用户,可以在 babel.config.js 中配置
          module.exports = {
              plugins: [
                  ['import', {
                      libraryName: 'vant',
                      libraryDirectory: 'es',
                      style: true
                      }, 'vant']
              ]
          };
  3. 推送远程仓库

首页

接口

echarts 4.x

  1. 图表工具 -- 柱状图 折线图 饼图 地图使用

  2. 安装echarts
    npm i [email protected] -S

  3. vue中使用图表工具

    1. 组件内局部使用

    2. 全局注入

          //导入echarts 
          import echarts from 'echarts'
          Vue.prototype.$echarts= echarts
    3. 封装vue插件

        vue封装插件语法:
            const install = function(Vue){
                Object.defineProperties(Vue.prototype,{
                    $myecharts :{
                        get(){
                            return {
                                line(){
                                    //-----
                                },
                                bar(){
    
                                }
                            }
                        }
                    }
                })
    
            }
    
        main.js 
            //导入echarts插件
            import echarts2 from './plugins/echarts'
            Vue.use(echarts2)

echarts 5.x

  1. 终止项目ctrl+c 把node_modlues源码 map文件
  2. cnpm i echarts -S --force (--force强制安装模块 覆盖之前的模块)
  3. 修改导入的模块信息 import * as echarts from 'echarts';

vue-covid's People

Contributors

theordinarylemon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.