# vue-admin-test-sdk

> 一个真正开箱即用的后台管理系统模板

Latest version **0.0.15** (published 2019-08-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-admin-test-sdk
pnpm add vue-admin-test-sdk
yarn add vue-admin-test-sdk
bun add vue-admin-test-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.15 |
| Published | 2019-08-02 |
| First published | 2019-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 27 |
| Unpacked size | 13.5 MB |
| Known vulnerabilities | 0 (+41 in 9 direct dependencies) |
| Install scripts | no |
| GitHub stars | 7 |
| Author | 易墨 |
| Maintainers | blingfeng |
| Keywords | vue, vue-router, vue-admin, vue-template, element-ui, me-admin-sdk, vue-framework |

## Links

- npm: https://www.npmjs.com/package/vue-admin-test-sdk
- Repository: https://github.com/yimogit/me-admin-sdk
- Homepage: https://github.com/yimogit/me-admin-sdk#readme
- Issues: https://github.com/yimogit/me-admin-sdk/issues
- npm.io page: https://npm.io/package/vue-admin-test-sdk

## Dependencies (27)

- [vue](https://npm.io/package/vue.md) 2.6.10
- [vuex](https://npm.io/package/vuex.md) 3.1.0
- [xlsx](https://npm.io/package/xlsx.md) 0.14.1
- [axios](https://npm.io/package/axios.md) 0.18.0
- [jszip](https://npm.io/package/jszip.md) 3.2.1
- [echarts](https://npm.io/package/echarts.md) 4.2.1
- [fuse.js](https://npm.io/package/fuse.js.md) 3.4.4
- [dropzone](https://npm.io/package/dropzone.md) 5.5.1
- [jsonlint](https://npm.io/package/jsonlint.md) 1.6.3
- [showdown](https://npm.io/package/showdown.md) 1.9.0
- [clipboard](https://npm.io/package/clipboard.md) 2.0.4
- [driver.js](https://npm.io/package/driver.js.md) 0.9.5
- [js-cookie](https://npm.io/package/js-cookie.md) 2.2.0
- [nprogress](https://npm.io/package/nprogress.md) 0.2.0
- [codemirror](https://npm.io/package/codemirror.md) 5.45.0
- [element-ui](https://npm.io/package/element-ui.md) 2.7.0
- [file-saver](https://npm.io/package/file-saver.md) 2.0.1
- [screenfull](https://npm.io/package/screenfull.md) 4.2.0
- [sortablejs](https://npm.io/package/sortablejs.md) 1.8.4
- [tui-editor](https://npm.io/package/tui-editor.md) 1.3.3
- [vue-router](https://npm.io/package/vue-router.md) 3.0.2
- [vue-count-to](https://npm.io/package/vue-count-to.md) 1.0.13
- [vuedraggable](https://npm.io/package/vuedraggable.md) 2.20.0
- [normalize.css](https://npm.io/package/normalize.css.md) 7.0.0
- [vue-splitpane](https://npm.io/package/vue-splitpane.md) 1.0.4
- [path-to-regexp](https://npm.io/package/path-to-regexp.md) 2.4.0
- [uglifyjs-webpack-plugin](https://npm.io/package/uglifyjs-webpack-plugin.md) ^2.1.3

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 0.0.15 (latest) — 2019-08-02

## README

# me-admin-sdk

封装了 me-admin-template，使其真正的可开箱即用

示例：
- [完整版使用](https://yimogit.github.io/me-admin-sdk/example/html/full.html)
- [无依赖版本使用](https://yimogit.github.io/me-admin-sdk/example/html/mini.html)
- [打包示例](https://yimogit.github.io/me-admin-sdk/example/dist/index.html)
## npm 包

![](https://img.shields.io/npm/v/me-admin-sdk.svg)

安装：`npm install --save me-admin-sdk`

项目引用

```js
import 'element-ui/lib/theme-chalk/index.css' // element-ui样式
import 'nprogress/nprogress.css' // Progress 进度条样式
import MeAdminSdk from 'me-admin-sdk'
//注册api接口
//调用：this.$api.test.getInfo()
MeAdminSdk.registerApi('test', function(fetch) {
  return {
    getInfo(params) {
      return request({
        url: '/getinfo',
        method: 'get',
        params: params,
        data: {}
      })
    }
  }
})
//注册codes,一些通用方法
//调用：this.$codes.index_path
MeAdminSdk.registerCodes(null, function() {
  return {
    index_path: '/'
  }
})
MeAdminSdk.register(options)
```

vue.config.js 设置

```js
module.exports = {
  //...
  configureWebpack: {
    resolve: {
      alias: {
        vue$: 'vue/dist/vue.esm.js'
      }
    }
  }
  //...
}
```

## 完整版

将依赖的 vue 全家桶及所有依赖的包一并打包到一个文件

相关依赖：`vue,vuex,vue-router,element-ui,axios,nprogress`
若不适用 `this.$ui.pages.fetch` 方法发送 ajax 请求则可以不引用 `axios`
若不需要线上顶部进度条则可以不引用 `nprogress`

```js
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="https://unpkg.com/nprogress@0.2.0/nprogress.css">

// <script src="./me-admin-sdk-full.js"></script>
<script src="https://unpkg.com/me-admin-sdk/dist/me-admin-sdk-full.js"></script>
<script type="text/javascript">
      MeAdminSdk.register(options)
</script>
```

## 组件版

组件形式打包,打包时将依赖排除，使用时需要引用使用的依赖

```js
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<link rel="stylesheet" href="https://unpkg.com/nprogress@0.2.0/nprogress.css">

<script src="https://unpkg.com/vue@2.5.17/dist/vue.min.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.min.js"></script>
<script src="https://unpkg.com/vue-router@3.0.2/dist/vue-router.min.js"></script>
<script src="https://unpkg.com/element-ui@2.7.0/lib/index.js"></script>
<script src="https://unpkg.com/axios@0.18.0/dist/axios.min.js"></script>
<script src="https://unpkg.com/nprogress@0.2.0/nprogress.js"></script>
<script src="https://unpkg.com/me-admin-sdk/dist/me-admin-sdk.js"></script>
<script type="text/javascript">
      MeAdminSdk.register(options)
</script>
```

## options

```js
{
  //要绑定的节点,若需要自定义实例则传递 {el:null}
  el: '#app',//自定义 vue 实例 {el:null}
  //vue实例
  currentAppKey: '__currentApp',
  // vue路由 必须验证(authName!=null)，若不验证，则需使用skipauth:true
  router:{
    routes: [],
  },
  // vuex store
  store: {
    state: {},
    getters: {},
    mutations: {},
    actions: {}
  },
  // 系统信息
  sysInfo: {
    //登录名
    authName: '超级管理员',
    //系统标题
    sysTitle: 'XXXX后台管理系统',
    //默认主题颜色
    sysTheme: '#409EFF',
    //菜单图标列表
    iconList: ['iconfont icon-system','el-icon-info'],//手动引入图标库，传入其class名
    //菜单
    menus: [{
        menuId: 'a3361b3ceada4fc8bc1a65969fb652b9',
        menuName: '控制台',
        menuIcon: 'iconfont icon-dashboard',
        menuCode: 'home',
        children: null//可多级嵌套
    }],
    //权限模块 路由name值
    modules: ['system_admin_list'],//['*'] 为超级管理员权限
    //首页访问路由
    indexPath: '/',
    //登录访问路由
    loginPath: '/login',
    //退出访问路由
    logoutPath: '/logout'
  }
},
```

---
_Source: https://npm.io/package/vue-admin-test-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
