leisure-core 0.6.2 → 0.6.3

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.
@@ -256,9 +256,22 @@ export default {
256
256
  ];
257
257
 
258
258
  this.$store.commit("setDict", dict);
259
- // const menus = JSON.parse(JSON.stringify(this.$store.getters.menu));
260
259
 
261
- // this.menuData = menus.filter(function (item) {
260
+ const menus = JSON.parse(JSON.stringify(this.$store.getters.menu));
261
+ this.menuData = menus.filter(function (item) {
262
+ if (item.children) {
263
+ // 确保子菜单数组的响应性
264
+ const filteredChildren = item.children.filter(
265
+ (item1) => item1.ishide === 0
266
+ );
267
+ this.$set(item, "children", filteredChildren);
268
+ }
269
+ return item;
270
+ });
271
+
272
+ //代码2
273
+ // this.menuData = this.$store.getters.menu;
274
+ // this.menuData = this.$store.getters.menu.filter(function (item) {
262
275
  // if (item.children) {
263
276
  // item.children = item.children.filter(function (item1) {
264
277
  // return item1.ishide === 0;
@@ -267,16 +280,6 @@ export default {
267
280
  // return item;
268
281
  // });
269
282
 
270
- this.menuData = this.$store.getters.menu;
271
- this.menuData = this.$store.getters.menu.filter(function (item) {
272
- if (item.children) {
273
- item.children = item.children.filter(function (item1) {
274
- return item1.ishide === 0;
275
- });
276
- }
277
- return item;
278
- });
279
-
280
283
  this.$emit("homeInit");
281
284
  document.addEventListener("keydown", this.handleKeyDown);
282
285
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.6.02",
3
+ "version": "0.6.03",
4
4
  "description": "leisure-core是京心数据基于vue2.x开发的一套后台管理系统桌面端组件库,封装了大量实用的UI控件模板,非常方便开发者快速搭建前端应用",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",