fix(core): 修复页面未完全加载时使用Mixly.Storage储存数据会导致boardType值为空
This commit is contained in:
@@ -14,7 +14,7 @@ const {
|
|||||||
|
|
||||||
const { laytpl } = layui;
|
const { laytpl } = layui;
|
||||||
|
|
||||||
const { SELECTED_BOARD } = Config;
|
const { BOARD } = Config;
|
||||||
|
|
||||||
Storage.user = function (key, value) {
|
Storage.user = function (key, value) {
|
||||||
let storagePath = path.join(LocalStorage.PATH['USER'], key);
|
let storagePath = path.join(LocalStorage.PATH['USER'], key);
|
||||||
@@ -28,7 +28,7 @@ Storage.user = function (key, value) {
|
|||||||
|
|
||||||
Storage.board = function (key, value) {
|
Storage.board = function (key, value) {
|
||||||
let storagePath = path.join(laytpl(LocalStorage.PATH['BOARD']).render({
|
let storagePath = path.join(laytpl(LocalStorage.PATH['BOARD']).render({
|
||||||
boardType: SELECTED_BOARD.boardType
|
boardType: BOARD.boardType
|
||||||
}), key);
|
}), key);
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1) {
|
||||||
LocalStorage.set(storagePath, value);
|
LocalStorage.set(storagePath, value);
|
||||||
@@ -40,8 +40,7 @@ Storage.board = function (key, value) {
|
|||||||
|
|
||||||
Storage.thirdParty = function (name, key, value) {
|
Storage.thirdParty = function (name, key, value) {
|
||||||
let storagePath = path.join(laytpl(LocalStorage.PATH['THIRD_PARTY']).render({
|
let storagePath = path.join(laytpl(LocalStorage.PATH['THIRD_PARTY']).render({
|
||||||
boardType: SELECTED_BOARD.boardType,
|
boardType: BOARD.boardType,
|
||||||
boardName: SELECTED_BOARD.boardName,
|
|
||||||
thirdPartyName: name ?? 'default'
|
thirdPartyName: name ?? 'default'
|
||||||
}), key);
|
}), key);
|
||||||
if (arguments.length > 1) {
|
if (arguments.length > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user