1.1.0 • Published 1 month ago

surface-plus v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

文档地址

surface-plus

安装

# 1.安装surface和element

npm install surface-plus

// element
npm install element-plus


# 2.在main.js中注册
import { createApp } from 'vue'
import App from './App.vue'

import 'element-plus/dist/index.css'
import Surface from 'surface-plus/dist/index.esm';
import ElementPlus from 'element-plus'

createApp(App)
    .use(Surface)
    .use(ElementPlus)
    .mount('#app')

统一接口响应格式

// 0成功、大于0为错误
{
    "code": 0, 
    "data": [],
    "msg": "success"
}

如果需要修改自定义配置可以在surface注册时传入配置

app.use(Surface, {
    responseKeys: { // 异步请求响应 key 别名
        code: 'code',
        data: 'data',
        msg: 'msg',
    },
    responseSuccessCode: 0, // 请求成功`code`的值 其他值都为失败
})
1.1.0

1 month ago

1.0.19

7 months ago

1.0.20

5 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

9 months ago

1.0.15

10 months ago

1.0.13

11 months ago

1.0.12

12 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago