docs: update example
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
var weRequest = require('../src/weRequest');
|
import weRequest from '../src/index'
|
||||||
|
|
||||||
weRequest.init({
|
weRequest.init({
|
||||||
// [可选] 存在localStorage的session名称,且CGI请求的data中会自动带上以此为名称的session值;可不配置,默认为session
|
// [可选] 存在localStorage的session名称,且CGI请求的data中会自动带上以此为名称的session值;可不配置,默认为session
|
||||||
@@ -89,4 +89,4 @@ weRequest.init({
|
|||||||
sessionExpireKey: "sessionExpireKey"
|
sessionExpireKey: "sessionExpireKey"
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = weRequest;
|
export default weRequest;
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/IvinWu/weRequest.git"
|
"url": "https://github.com/IvinWu/weRequest.git"
|
||||||
},
|
},
|
||||||
"main": "build/weRequest.js",
|
"main": "src/index.ts",
|
||||||
"typings": "build/index.d.ts",
|
"typings": "src/typings/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"commit": "git cz"
|
"commit": "git cz"
|
||||||
|
|||||||
Reference in New Issue
Block a user