{{ menuItem[name] }}
组件还没完善,但是可以使用,需要增加属性增加的可以自己添加。
import ScrollList from "@/components/ScrollList/index.vue";
components: {
ScrollList
},
我是vue3:
const data = [
[
{
icon: require('../assets/pic/[email protected]'),
name: "关注",
path: JSON.stringify({name: "test", params: {type: 1}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "媒体资讯",
path: JSON.stringify({name: "test", params: {type: 1}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "名作鉴赏",
path: JSON.stringify({name: "test", params: {type: "famous"}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "鉴赏宝典",
path: JSON.stringify({name: "test", params: {type: 5}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "工艺赏析",
path: JSON.stringify({name: "test", params: {type: 3}})
},
// 更多项...
],
[
{
icon: require('../assets/pic/[email protected]'),
name: "文化历史",
path: JSON.stringify({name: "test", params: {type: 7}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "入门知识",
path: JSON.stringify({name: "test", params: {type: 7}})
},
{
icon: require('../assets/pic/activity.png'),
name: "活动资讯",
path: JSON.stringify({name: "test", params: {type: 7}})
},
{
icon: require('../assets/pic/government_information.png'),
name: "官方公告",
path: JSON.stringify({name: "test", params: {type: 8}})
},
{
icon: require('../assets/pic/[email protected]'),
name: "产业信息",
path: JSON.stringify({name: "test", params: {type: test}})
},
// 更多项...
],
// 更多分组...
];
const scrollListWidth = "60px";// 传递给 ScrollList 的宽度
const scrollListBottom = "20px"; // 传递给 ScrollList 的指示器底部距离
const iconSizeKnowledge = ref({
width: "60px", height: "60px"
})
return {
data,
scrollListWidth,
scrollListBottom,
keyword,
isSearchBoxFixed, famousLampStyle, masterStyle, iconSize, iconSizeJz, iconSizeKnowledge
};