代码拉取完成,页面将自动刷新
同步操作将从 lennyaaa/admindemo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import QtQuick 2.0
Item {
// id: menuDelegateLevel2
property var name;
property var icon;
width:800
height: 600
Rectangle {
id: level2
property bool isExpand: false
anchors.fill: parent
color: "#16181d"
MouseArea {
onClicked: {
}
}
MenuView{
id: item_tree
width: parent.width/2
anchors{
left: parent.left
top: parent.top
bottom: parent.bottom
margins: 10
}
//model: []
//set model data
Component.onCompleted: {
console.log(1)
//root_window.setTestDataA();
level2.setTestDataB();
console.log(2)
setMenuClicked("home")
}
onMenuClicked: function(name){
console.log("name " + name)
}
}
function setTestDataB(){
item_tree.model=JSON.parse(qsTr('
[
{
"name": "home",
"desc": "首页",
"icon": "image/home.png",
"toIndex": "FirstForm",
"subMenus":[]
},
{
"name": "config",
"desc": "系统配置",
"icon": "image/config.png",
"toIndex": "",
"subMenus":[
{
"name": "config1",
"desc": "系统配置1",
"icon": "",
"toIndex": "",
"subMenus":[]
},
{
"name": "config2",
"desc": "系统配置2",
"icon": "",
"toIndex": "",
"subMenus":[]
}]
},
{
"name": "app",
"desc": "系统应用",
"icon": "image/app.png",
"toIndex": "",
"subMenus":[
{
"name": "app1",
"desc":"应用配置1",
"icon":"",
"toIndex": "",
"subMenus":[
{
"name": "subapp1",
"desc":"子配置1",
"icon":"",
"toIndex": "",
"subMenus":[]
},
{
"name": "subapp2",
"desc":"子配置2",
"icon":"",
"toIndex": "",
"subMenus":[]
}
]
},
{
"name": "app2",
"desc":"应用配置2",
"icon":"",
"toIndex": "",
"subMenus":[]
}]
},
{
"name": "help",
"desc": "帮助",
"icon": "image/help.png",
"toIndex": "FirstForm",
"subMenus":[]
}
]'))
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。