Git Product home page Git Product logo

mt_h5_app's Introduction

mt_h5_App

高仿美团h5 App

目录结构

-- src
--- component
--- static
--- page
---- index 首页
----- actions //接口文件
----- reducers
----- Home // 大组件
------ Header // 细分组件
------- Header.jsx
------- Header.scss
----- index.html page的根html
----- index.js page的根js
----- store.js
-- dev // development时需要的静态数据
-- webpack.config.dev.js //多页面配置

移动端配置

  • 适配 px转换为rem
// 使用的scss
@function px2rem($px) {
    $rem: 37.5px;
    @return ($px / $rem) + rem;
}

//在 webpack.config.XX.js中rules的sass loader中配置

或 安装 lib-flexible 和 px2rem 插件

  • 适配html的font-size 在index.html 中引入/static/rem.js 订阅resize事件,根据document.documentElement.clientWidth / 10 来设置html的font-size(px)

项目启动

  1. 安装依赖

yarn install

  1. 启动

yarn run dev

  1. 打包

yarn run build

项目预览

mt_h5_app's People

Contributors

tomorrowisnewday avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.