bl-common-vue3 0.0.56 → 0.0.57

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.
@@ -84579,6 +84579,7 @@ notification_api.warn = notification_api.warning;
84579
84579
 
84580
84580
 
84581
84581
 
84582
+
84582
84583
  var utils = {
84583
84584
  numberReg: /^\d+(\.\d+)?$/,
84584
84585
  // 数字验证正则
@@ -84695,11 +84696,9 @@ var utils = {
84695
84696
  * 存取公共存储参数
84696
84697
  */
84697
84698
  setCommonLocal: function setCommonLocal(key, value) {
84698
- var localData = localStorage.getItem(utils.blCommonKey);
84699
-
84700
- if (localData) {
84701
- localData[key] = JSON.String(value);
84702
- }
84699
+ var localData = localStorage.getItem(utils.blCommonKey) || {};
84700
+ localData[key] = value;
84701
+ localStorage.setItem(utils.blCommonKey, JSON.stringify(localData));
84703
84702
  },
84704
84703
  getCommonLocal: function getCommonLocal(key) {
84705
84704
  var localData = localStorage.getItem(utils.blCommonKey);
@@ -84588,6 +84588,7 @@ notification_api.warn = notification_api.warning;
84588
84588
 
84589
84589
 
84590
84590
 
84591
+
84591
84592
  var utils = {
84592
84593
  numberReg: /^\d+(\.\d+)?$/,
84593
84594
  // 数字验证正则
@@ -84704,11 +84705,9 @@ var utils = {
84704
84705
  * 存取公共存储参数
84705
84706
  */
84706
84707
  setCommonLocal: function setCommonLocal(key, value) {
84707
- var localData = localStorage.getItem(utils.blCommonKey);
84708
-
84709
- if (localData) {
84710
- localData[key] = JSON.String(value);
84711
- }
84708
+ var localData = localStorage.getItem(utils.blCommonKey) || {};
84709
+ localData[key] = value;
84710
+ localStorage.setItem(utils.blCommonKey, JSON.stringify(localData));
84712
84711
  },
84713
84712
  getCommonLocal: function getCommonLocal(key) {
84714
84713
  var localData = localStorage.getItem(utils.blCommonKey);