@lambo-design/pro-layout 1.0.0-beta.76 → 1.0.0-beta.77

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.76",
3
+ "version": "1.0.0-beta.77",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -48,11 +48,17 @@ export default {
48
48
  methods: {
49
49
  fetchCollectedMenus() {
50
50
  ajax.get(config.upmsServerContext + "/manage/upmsMenuCollect/list").then(resp => {
51
- const collectedMenus = resp.data;
51
+ const collectedMenus = response.data.data;
52
52
  console.log('collectedMenus', collectedMenus)
53
- collectedMenus.forEach(menuName => {
54
- this.$set(this.isCollected, menuName, true);
55
- });
53
+ if (Array.isArray(collectedMenus)) {
54
+ collectedMenus.forEach(menu => {
55
+ // 使用 menu 的 name 属性作为键
56
+ this.$set(this.isCollected, menu.name, true);
57
+ });
58
+ } else {
59
+ console.error("Expected an array but got:", typeof collectedMenus);
60
+ }
61
+ ;
56
62
  }).catch(err => {
57
63
  console.error("Error fetching collected menus:", err);
58
64
  });