拉娇娇娇娇娇娇娇娇

在这里插入图片描述在这里插入代码片
//缓存orderColumn
let cacheColumn = sessionStorage.getItem(‘column’)
cacheColumn = cacheColumn ? JSON.parse(sessionStorage.getItem(‘column’)) : {}
let router = this.KaTeX parse error: Expected 'EOF', got '&' at position 542: …(storageColumn &̲& Object.keys(s…route.path
let tbName = this.tableName
if (Object.keys(storageColumn).includes(router) && Object.keys(storageColumn[router]).includes(tbName)) {
let cls = this.newColumn
let scls = storageColumn[router][tbName]
let newItem = []
let param = {}
scls.forEach((item, index) => {
if (item.property && cls[index] && cls[index].field) {
if (!newItem.includes(item.property) && !newItem.includes(cls[index].field)) {
if (item.property != cls[index].field) {
param[cls[index].field] = {}
param[cls[index].field].oldIndex = cls.indexOf(cls[index])
newItem.push(cls[index].field)
newItem.push(item.property)
}
} else if (newItem.includes(item.property)) {
newItem.push(cls[index].field)
param[item.property].newIndex = index
}
}
})
Object.keys(param).forEach((item) => {
const currRow = this.newColumn.splice(param[item].oldIndex, 1)[0]
this.newColumn.splice(param[item].newIndex, 0, currRow)
})
}
}
在这里插入图片描述
在这里插入图片描述 columns: { deep: true, immediate: true, handler(n, o) { this.newColumn = n }, },
在这里插入图片描述menuClicks(columnData) { let visibleCls = sessionStorage.getItem('visibleColumn') visibleCls = visibleCls ? JSON.parse(sessionStorage.getItem('visibleColumn')) : {} let router = this.$route.path let tbName = this.tableName if (!Object.keys(visibleCls).includes(router)) { visibleCls[router] = {} } if (!visibleCls[router][tbName]) { visibleCls[router][tbName] = [] if (columnData.columnIndex != undefined && columnData.menu.code === 'HIDDEN_COLUMN') { visibleCls[router][tbName].push(columnData.columnIndex) }else { visibleCls[router][tbName] = [] } } else { if (columnData.columnIndex != undefined && columnData.menu.code === 'HIDDEN_COLUMN') { visibleCls[router][tbName].push(columnData.columnIndex) } else { visibleCls[router][tbName] = [] } } sessionStorage.setItem('visibleColumn', JSON.stringify(visibleCls)) this.visibleColumn() },
在这里插入图片描述visibleColumn() { let _this = this //visibleColumn let visibleColumn = sessionStorage.getItem('visibleColumn') ? JSON.parse(sessionStorage.getItem('visibleColumn')) : undefined if (visibleColumn && Object.keys(visibleColumn).length > 0) { let router = _this.$route.path let tbName = _this.tableName if (Object.keys(visibleColumn).includes(router) && Object.keys(visibleColumn[router]).includes(tbName)) { let vcls = visibleColumn[router][tbName] _this.myColumns.forEach((item, index) => { if (vcls.includes(index)) { item.visible = false } else if (this.newColumn[index].visible != false) { item.visible = true } }) _this.$nextTick(() => { _this.$refs.xGrid.loadColumn(_this.myColumns) _this.$refs.xGrid.refreshColumn() }) } } },
在这里插入图片描述this.visibleColumn()
在这里插入图片描述:custom-config=“{ storage: false }”
在这里插入图片描述@menu-click=“menuClicks”
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Drawer::Drawer(QWidget *parent, Qt::WindowFlags f) :QToolBox(parent, f) { setWindowTitle(tr("Myself QQ 2013")); //设置主窗口的标题 setWindowIcon(QPixmap(":/image/qq.png")); //设置主窗体标题栏图标 toolBtn1 = new QToolButton; toolBtn1->setText(tr("道枝小尧")); toolBtn1->setIcon(QPixmap(":/image/spqy.png")); toolBtn1->setIconSize(QPixmap(":/image/spqy.png").size()); toolBtn1->setAutoRaise(true); toolBtn1->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn1, SIGNAL(clicked()), this, SLOT(showChatWidget1())); toolBtn2 = new QToolButton; toolBtn2->setText(tr("忆梦如澜")); toolBtn2->setIcon(QPixmap(":/image/ymrl.png")); toolBtn2->setIconSize(QPixmap(":/image/ymrl.png").size()); toolBtn2->setAutoRaise(true); toolBtn2->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn2, SIGNAL(clicked()), this, SLOT(showChatWidget2())); toolBtn3 = new QToolButton; toolBtn3->setText(tr("出版人")); toolBtn3->setIcon(QPixmap(":/image/qq.png")); toolBtn3->setIconSize(QPixmap(":/image/qq.png").size()); toolBtn3->setAutoRaise(true); toolBtn3->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn3, SIGNAL(clicked()), this, SLOT(showChatWidget3())); toolBtn4 = new QToolButton; toolBtn4->setText(tr("Cherry")); toolBtn4->setIcon(QPixmap(":/image/Cherry.png")); toolBtn4->setIconSize(QPixmap(":/image/Cherry.png").size()); toolBtn4->setAutoRaise(true); toolBtn4->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn4, SIGNAL(clicked()), this, SLOT(showChatWidget4())); toolBtn5 = new QToolButton; toolBtn5->setText(tr("淡然")); toolBtn5->setIcon(QPixmap(":/image/dr.png")); toolBtn5->setIconSize(QPixmap(":/image/dr.png").size()); toolBtn5->setAutoRaise(true); toolBtn5->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn5, SIGNAL(clicked()), this, SLOT(showChatWidget5())); toolBtn6 = new QToolButton; toolBtn6->setText(tr("娇娇")); toolBtn6->setIcon(QPixmap(":/image/jj.png")); toolBtn6->setIconSize(QPixmap(":/image/jj.png").size()); toolBtn6->setAutoRaise(true); toolBtn6->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn6, SIGNAL(clicked()), this, SLOT(showChatWidget6())); toolBtn7 = new QToolButton; toolBtn7->setText(tr("洛水无痕")); toolBtn7->setIcon(QPixmap(":/image/lswh.png")); toolBtn7->setIconSize(QPixmap(":/image/lswh.png").size()); toolBtn7->setAutoRaise(true); toolBtn7->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); connect(toolBtn7, SIGNAL(clicked()), this, SLOT(showChatWidget7()));改为连接网络数据库
06-09

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值