@lambo-design/shared 1.0.0-beta.7 → 1.0.0-beta.8
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/package.json +1 -1
- package/utils/platform.js +10 -4
package/package.json
CHANGED
package/utils/platform.js
CHANGED
|
@@ -152,14 +152,20 @@ export const showTitle = (item, vm) => {
|
|
|
152
152
|
/**
|
|
153
153
|
* @description 本地存储和获取标签导航列表
|
|
154
154
|
*/
|
|
155
|
-
export const setTagNavListInLocalstorage = list => {
|
|
156
|
-
|
|
155
|
+
export const setTagNavListInLocalstorage = (list , key) => {
|
|
156
|
+
if (!key) {
|
|
157
|
+
key = 'LD-tagNavList';
|
|
158
|
+
}
|
|
159
|
+
localStorage[key] = JSON.stringify(list)
|
|
157
160
|
}
|
|
158
161
|
/**
|
|
159
162
|
* @returns {Array} 其中的每个元素只包含路由原信息中的name, path, meta三项
|
|
160
163
|
*/
|
|
161
|
-
export const getTagNavListFromLocalstorage = () => {
|
|
162
|
-
|
|
164
|
+
export const getTagNavListFromLocalstorage = (key) => {
|
|
165
|
+
if (!key) {
|
|
166
|
+
key = 'LD-tagNavList';
|
|
167
|
+
}
|
|
168
|
+
const list = localStorage[key]
|
|
163
169
|
return list ? JSON.parse(list) : []
|
|
164
170
|
}
|
|
165
171
|
|