| | |
| | | */ |
| | | componentDidMount () { |
| | | this.reloadTab(false) |
| | | |
| | | document.onkeydown = (event) => { |
| | | let e = event || window.event |
| | | let keyCode = e.keyCode || e.which || e.charCode |
| | | let preKey = '' |
| | | |
| | | if (e.ctrlKey) { |
| | | preKey = 'ctrl' |
| | | } |
| | | if (e.shiftKey) { |
| | | preKey = 'shift' |
| | | } else if (e.altKey) { |
| | | preKey = 'alt' |
| | | } |
| | | |
| | | if (!preKey || !keyCode) return |
| | | |
| | | let _shortcut = `${preKey}+${keyCode}` |
| | | |
| | | if (_shortcut === 'ctrl+83') { |
| | | let node = document.getElementById('save-config') |
| | | if (node && node.click) { |
| | | node.click() |
| | | } |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | document.onkeydown = () => {} |
| | | } |
| | | |
| | | /** |
| | |
| | | return tab |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | // 按钮不存在时,去掉绑定的双击按钮 |
| | | if (_config.setting.doubleClick && _config.action.findIndex((item) => item.uuid === _config.setting.doubleClick) === -1) { |
| | | _config.setting.doubleClick = '' |
| | | } |
| | | |
| | | // 未设置数据源或标签不合法时,启用状态为false |
| | |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看按钮配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | {this.state.dict['header.menu.action.configurable']} |
| | | 按钮配置 |
| | | </p> : null |
| | | } |
| | | </div> |
| | |
| | | <Tooltip placement="topLeft" title="点击按钮,可完成或查看标签配置信息。"> |
| | | <QuestionCircleOutlined className="mk-form-tip"/> |
| | | </Tooltip> |
| | | {this.state.dict['header.menu.tab.configurable']} |
| | | 标签配置 |
| | | </p> : null |
| | | } |
| | | {configTabs.map((item, index) => { |
| | |
| | | <div className="setting"> |
| | | <Card title={ |
| | | <div> |
| | | {this.state.dict['header.menu.page.configurable']} |
| | | 页面配置 |
| | | <RedoOutlined style={{marginLeft: '10px'}} title="刷新标签列表" onClick={() => this.reloadTab(true)} /> |
| | | </div> |
| | | } bordered={false} extra={ |
| | |
| | | <ReplaceField type="table" config={config} updateConfig={this.updateconfig}/> |
| | | <EditComponent dict={this.state.dict} type="table" options={['search', 'form', 'action', 'columns']} config={this.state.config} MenuID={this.props.menu.MenuID} thawButtons={this.state.thawButtons} refresh={this.editConfig}/> |
| | | <Switch className="big" checkedChildren={this.state.dict['model.enable']} unCheckedChildren={this.state.dict['model.disable']} checked={this.state.config.enabled} onChange={this.onEnabledChange} /> |
| | | <Button type="primary" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> |
| | | <Button type="primary" id="save-config" onClick={this.submitConfig} loading={this.state.menuloading}>{this.state.dict['model.save']}</Button> |
| | | <Button onClick={this.cancelConfig}>{this.state.dict['model.back']}</Button> |
| | | </div> |
| | | } style={{ width: '100%' }}> |