Skip to content
A folk version of d2-admin-start-kit to help you start D2Admin project quickly and easily. d2-admin-start-kit的模块化开发版本. 通过分离d2admin的内部代码中业务逻辑相关的部分, 使上手D2Admin 更加方便快捷.
JavaScript Vue CSS HTML
Branch: master
Clone or download
Latest commit 81cb11f Aug 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
packages/filters-date update documents Aug 9, 2019
public add screenshot Aug 10, 2019
src fix axios delegate Aug 19, 2019
tests/unit initial commit Aug 9, 2019
tools/vue-filename-injector initial commit Aug 9, 2019
.browserslistrc initial commit Aug 9, 2019
.env initial commit Aug 9, 2019
.env.development initial commit Aug 9, 2019
.env.production initial commit Aug 9, 2019
.eslintignore initial commit Aug 9, 2019
.eslintrc.js initial commit Aug 9, 2019
.gitignore update documents Aug 9, 2019
.postcssrc.js initial commit Aug 9, 2019
LICENSE initial commit Aug 9, 2019
README.md fix axios delegate Aug 16, 2019
README.zh.md fix axios delegate Aug 16, 2019
alias.config.js initial commit Aug 9, 2019
babel.config.js
jest.config.js initial commit Aug 9, 2019
package.json fix axios delegate Aug 16, 2019
vue.config.js initial commit Aug 9, 2019

README.md

GitHub package.json version GitHub last commit GitHub

This project is a folk version of d2-admin-start-kit. It separates d2 admin internal stuffs and business logic clearly to help you start D2Admin project quickly and easily.

[中文]

Delegate

d2-admin-start-kit-plus expose delegate to integrate your own implementation.

Replace these delegates default implementation on start up with your own.

Module

Generally we design software architecture in modular way for real project. d2-admin-start-kit-plus defines following directory structure in convention to organize codes.

  • [your module]
    • api
      • [your api].js
      • mock.js
    • views
      • [your page].vue
      • [assets/image.jpg]
    • store (TODO)
    • routes.js

Differences from original D2Admin

We assume you are familiar with D2Admin, and we make a little bit changes from original D2Admin configuration. Please be aware before start to use this project.

  • Mock switch
    • it's now control by MOCK in .env file
    • path in mock.js will not be conver to RegExp anymore, you could choose use regexp for plain text by yourself to match mock URL.
  • Devtool
    • it's now source-map, original it's cheap-source-map. If you run into performance issue, consider modify it.
  • Async Component
    • Originally D2Admin switch sync/async Vue component loading by env (development/production). But we have difficulty to handle this in module way with webpack. So we change it to:
      • Load D2Admin components in sync way.
      • Load module components in async way. If you get performance issue, consider change it to sync way.
  • You could now access localStorage database via util.db.js without Vuex. [PR-211]

Upgrade D2Admin

Pull this project with updates then just copy and replace /src/d2admin directory of your own project should be just fine.

TODO

  • Support Vuex module register dynamically.
  • Load module dynamically.
  • Permission check for vue component.
  • npm package for D2Admin.
You can’t perform that action at this time.