byt-ui 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/byt-ui.common.js
CHANGED
|
@@ -85556,13 +85556,13 @@ var website = __webpack_require__(2411);
|
|
|
85556
85556
|
* @Description:
|
|
85557
85557
|
* @Author: 王国火
|
|
85558
85558
|
* @Date: 2022-10-18 12:37:03
|
|
85559
|
-
* @LastEditTime: 2022-10-
|
|
85559
|
+
* @LastEditTime: 2022-10-27 10:48:12
|
|
85560
85560
|
* @LastEditors: 王国火
|
|
85561
85561
|
*/
|
|
85562
85562
|
|
|
85563
85563
|
|
|
85564
85564
|
const getCookie = (key, context) => {
|
|
85565
|
-
const searchKey = `${website["default"].key}
|
|
85565
|
+
const searchKey = `${website["default"].key}-${key}`;
|
|
85566
85566
|
|
|
85567
85567
|
if (context && context.req) {
|
|
85568
85568
|
if (context.req.headers.cookie) {
|
|
@@ -85579,7 +85579,7 @@ const getCookie = (key, context) => {
|
|
|
85579
85579
|
}
|
|
85580
85580
|
};
|
|
85581
85581
|
const setCookie = (key, value, expires = 7, path = '/') => {
|
|
85582
|
-
return js_cookie.set(`${website["default"].key}
|
|
85582
|
+
return js_cookie.set(`${website["default"].key}-${key}`, value, {
|
|
85583
85583
|
expires,
|
|
85584
85584
|
path
|
|
85585
85585
|
});
|
|
@@ -85614,7 +85614,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85614
85614
|
* @Description:
|
|
85615
85615
|
* @Author: 王国火
|
|
85616
85616
|
* @Date: 2022-10-08 09:10:49
|
|
85617
|
-
* @LastEditTime: 2022-10-25
|
|
85617
|
+
* @LastEditTime: 2022-10-25 11:03:35
|
|
85618
85618
|
* @LastEditors: 王国火
|
|
85619
85619
|
*/
|
|
85620
85620
|
|
|
@@ -85648,7 +85648,7 @@ const getStore = (key, debug = false) => {
|
|
|
85648
85648
|
const name = `${keyName}-${key}`;
|
|
85649
85649
|
let obj = window.sessionStorage.getItem(name) || window.localStorage.getItem(name);
|
|
85650
85650
|
let content;
|
|
85651
|
-
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return;
|
|
85651
|
+
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return null;
|
|
85652
85652
|
|
|
85653
85653
|
try {
|
|
85654
85654
|
obj = JSON.parse(obj);
|
|
@@ -85676,14 +85676,10 @@ const getStore = (key, debug = false) => {
|
|
|
85676
85676
|
* 删除localStorage
|
|
85677
85677
|
*/
|
|
85678
85678
|
|
|
85679
|
-
const removeStore =
|
|
85679
|
+
const removeStore = key => {
|
|
85680
85680
|
const name = `${keyName}-${key}`;
|
|
85681
|
-
|
|
85682
|
-
|
|
85683
|
-
window.sessionStorage.removeItem(name);
|
|
85684
|
-
} else {
|
|
85685
|
-
window.localStorage.removeItem(name);
|
|
85686
|
-
}
|
|
85681
|
+
window.sessionStorage.removeItem(name);
|
|
85682
|
+
window.localStorage.removeItem(name);
|
|
85687
85683
|
};
|
|
85688
85684
|
/**
|
|
85689
85685
|
* 获取全部localStorage
|
package/lib/byt-ui.umd.js
CHANGED
|
@@ -85566,13 +85566,13 @@ var website = __webpack_require__(92502);
|
|
|
85566
85566
|
* @Description:
|
|
85567
85567
|
* @Author: 王国火
|
|
85568
85568
|
* @Date: 2022-10-18 12:37:03
|
|
85569
|
-
* @LastEditTime: 2022-10-
|
|
85569
|
+
* @LastEditTime: 2022-10-27 10:48:12
|
|
85570
85570
|
* @LastEditors: 王国火
|
|
85571
85571
|
*/
|
|
85572
85572
|
|
|
85573
85573
|
|
|
85574
85574
|
const getCookie = (key, context) => {
|
|
85575
|
-
const searchKey = `${website["default"].key}
|
|
85575
|
+
const searchKey = `${website["default"].key}-${key}`;
|
|
85576
85576
|
|
|
85577
85577
|
if (context && context.req) {
|
|
85578
85578
|
if (context.req.headers.cookie) {
|
|
@@ -85589,7 +85589,7 @@ const getCookie = (key, context) => {
|
|
|
85589
85589
|
}
|
|
85590
85590
|
};
|
|
85591
85591
|
const setCookie = (key, value, expires = 7, path = '/') => {
|
|
85592
|
-
return js_cookie.set(`${website["default"].key}
|
|
85592
|
+
return js_cookie.set(`${website["default"].key}-${key}`, value, {
|
|
85593
85593
|
expires,
|
|
85594
85594
|
path
|
|
85595
85595
|
});
|
|
@@ -85624,7 +85624,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
85624
85624
|
* @Description:
|
|
85625
85625
|
* @Author: 王国火
|
|
85626
85626
|
* @Date: 2022-10-08 09:10:49
|
|
85627
|
-
* @LastEditTime: 2022-10-25
|
|
85627
|
+
* @LastEditTime: 2022-10-25 11:03:35
|
|
85628
85628
|
* @LastEditors: 王国火
|
|
85629
85629
|
*/
|
|
85630
85630
|
|
|
@@ -85658,7 +85658,7 @@ const getStore = (key, debug = false) => {
|
|
|
85658
85658
|
const name = `${keyName}-${key}`;
|
|
85659
85659
|
let obj = window.sessionStorage.getItem(name) || window.localStorage.getItem(name);
|
|
85660
85660
|
let content;
|
|
85661
|
-
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return;
|
|
85661
|
+
if ((0,_validate__WEBPACK_IMPORTED_MODULE_1__.validatenull)(obj)) return null;
|
|
85662
85662
|
|
|
85663
85663
|
try {
|
|
85664
85664
|
obj = JSON.parse(obj);
|
|
@@ -85686,14 +85686,10 @@ const getStore = (key, debug = false) => {
|
|
|
85686
85686
|
* 删除localStorage
|
|
85687
85687
|
*/
|
|
85688
85688
|
|
|
85689
|
-
const removeStore =
|
|
85689
|
+
const removeStore = key => {
|
|
85690
85690
|
const name = `${keyName}-${key}`;
|
|
85691
|
-
|
|
85692
|
-
|
|
85693
|
-
window.sessionStorage.removeItem(name);
|
|
85694
|
-
} else {
|
|
85695
|
-
window.localStorage.removeItem(name);
|
|
85696
|
-
}
|
|
85691
|
+
window.sessionStorage.removeItem(name);
|
|
85692
|
+
window.localStorage.removeItem(name);
|
|
85697
85693
|
};
|
|
85698
85694
|
/**
|
|
85699
85695
|
* 获取全部localStorage
|