Giter VIP home page Giter VIP logo

bigscream's Introduction

Big Screen General Solution All in One

Philosophy

  • Do not encapsulate component unless it repeats itself

  • Component sits as close as possible to the place where it is used

    • e.g. src/components/Nav.vue is used in src/App.vue, so Nav.vue is placed in src/components folder

Rules

Common

  • self-governing

    • this is the NO.1 rule overall

      each component should be self-governing, which means it should be able to work independently without any other components

      • fetch data by itself
      • apply the global theme by itself
      • get the global config by itself
      • get the global state by itself

Components Hierarchy / Folder Structure

  • Page 组件

    以下目录结构是针对3级路由设计!
    • 一级路由组件 (只有路由没有实体组件)

      • 二级路由组件 (在 pages 下面 )
        • 地图组件
        • 三级路由组件 (在 子 pages 下面 )
          • Grid Layout 组件 (Charts)
          • 业务组件 ( > 1 个)
            • 渲染组件
              • Echart 类型 (引用 1*)
              • Vue 类型 (引用 2*)
    • 全局组件 (components)

      • Echart 类型 (定义 1*)
      • Vue 类型 (定义 2*)
  • Chart 组件

    Chart 组件是指的 Grid Layout 里面的 图表组件 它是一个 Stateful 组件

组件命名

.
├── Foo.vue             // 与文件夹名称一致
└── components          // Foo 中使用的子组件
    ├── charts          // 组件放在文件夹, 名称小写
    │   └── Charts.vue
    └── map             // 组件放在文件夹, 名称小写
        ├── Map.vue
        └── data.js     // 依赖文件就近存储

Echart Components

Vue Components

Features

  • Layering

    there are 4 layers in the given demo, they are nav, charts, map, background. It is also common you have more than 4 layers.

    • logically nested

      nav layer and background layer are logically parent of the rest of layers

    • physically sibling

      on the other hand those four layers are physically sibling

  • Animation

    • Components in / out
    • Control at page level
  • State Management

    • Cache Page Level Query Params
  • Service/API Agent

    • Cache
    • Auto Retry

References

Compatibility

Potential Issues

  • Pointer Events Lost due to Overlapping

    to fix this issue some css properties need to be used with combination

bigscream's People

Contributors

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