本帖最后由 想念 于 2024-11-18 18:54 编辑
使用的是<gc-spread-sheets-designer @designerInitialized="designerInitialized"></gc-spread-sheets-designer>。designerInitialized中的这部分代码是
- let designerConfig = JSON.parse(JSON.stringify(GC.Spread.Sheets.Designer.DefaultConfig))
- // 添加上下文菜单项
- designerConfig.contextMenu.unshift('setcheck')
- designerConfig.commandMap = {}
- Object.assign(designerConfig.commandMap, {
- setcheck: {
- title: '设置可编辑',
- text: '设置可编辑',
- iconClass: '',
- bigButton: 'true',
- commandName: 'setcheck',
- execute: async () => {
- this.resetWorksheet()
- // this.cancel()
- let spread = value.getWorkbook()
- let sheet = spread.getActiveSheet()
- this.worksheetOpen = true
- this.setWorksheet.colum.name = sheet.name()
- this.setWorksheet.colum.list = sheet.getSelections()
- }
- }
- })
- this.designer.setConfig(designerConfig)
复制代码 如何改造呢
|