add context module

develop 3.2.2.RELEASE
就眠仪式 2020-11-23 17:41:45 +08:00
parent 1187d7d5d9
commit 3f9636e365
4 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,22 @@
layui.define(['jquery', 'element'], function(exports) {
"use strict";
/**
* 上下文全局配置存储
* */
var MOD_NAME = 'context',
$ = layui.jquery,
element = layui.element;
var context = new function() {
this.put = function(key,value){
localStorage.setItem(key,value);
}
this.get = function(){
return localStorage.getItem(key);
}
}
exports(MOD_NAME, context);
});

View File

@ -2,7 +2,7 @@ layui.define(['jquery', 'element'], function(exports) {
"use strict";
/**
*
*
* */
var MOD_NAME = 'convert',
$ = layui.jquery,

View File

@ -39,5 +39,6 @@ layui.config({
card: "card",
loading: "loading",
cropper:"cropper",
convert:"convert"
convert:"convert",
context:"context"
});

View File

@ -39,5 +39,6 @@ layui.config({
card: "card",
loading: "loading",
cropper:"cropper",
convert:"convert"
convert:"convert",
context:"context"
});