Git Product home page Git Product logo

jdfinance's Introduction

组件化思维与技巧之京东金融实战

本项目使用的是Vue(2.5.9)实现的组件化课程,侧重思维与方法的训练。在模块化方面不仅涉及常规的JS还有CSS,CSS的模块化使用Sass组织代码,将模块化设计做到极致。在构建部分采用webpack(3.10.0) 和 npm scripts独立完成,不依赖任何第三方的脚手架。

体验地址

体验地址

请使用手机扫码体验,微信或者浏览器的扫一扫都可以的。

CSS模块化设计

  1. 设计原则
  • 可复用能继承要完整
  • 周期性迭代
  1. 设计方法
  • 先整体后部分再颗粒化
  • 先抽象再具体

图例1 图例2

代码

  1. /app/css/layout.scss
  2. /app/css/element.scss

JS组件设计

  1. 设计原则
  • 高内聚低耦合
  • 周期性迭代
  1. 设计方法
  • 先整体后部分再颗粒化
  • 尽可能的抽象

自适应

  1. 基本概念
  1. 工作原理
  • 利用viewport和设备像素比调整基准像素
  • 利用px2rem自动转换css单位

SPA设计

  1. 设计意义
  • 前后端分离
  • 减轻服务器压力
  • 增强用户体验
  • prerender预渲染优化SEO
  1. 工作原理
  • history API
  • hash 图例3 图例4

jdfinance's People

Contributors

chenbj2333 avatar

Watchers

 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.