This commit is contained in:
xuliangzhan
2020-08-30 16:11:13 +08:00
parent e8130600bd
commit e419e0c942
17 changed files with 118 additions and 65 deletions

View File

@@ -13,4 +13,4 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
}
})();</script><link href=/vxe-table/static/js/chunk-1b979dc0.a7208679.js rel=prefetch><link href=/vxe-table/static/js/chunk-2d216214.a9b84dcf.js rel=prefetch><link href=/vxe-table/static/js/chunk-2d216257.6a8b5f89.js rel=prefetch><link href=/vxe-table/static/css/chunk-vendors.cfd9ba4a.css rel=preload as=style><link href=/vxe-table/static/css/index.c043e28a.css rel=preload as=style><link href=/vxe-table/static/js/chunk-vendors.67204438.js rel=preload as=script><link href=/vxe-table/static/js/index.3786980a.js rel=preload as=script><link href=/vxe-table/static/css/chunk-vendors.cfd9ba4a.css rel=stylesheet><link href=/vxe-table/static/css/index.c043e28a.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/static/js/chunk-vendors.67204438.js></script><script src=/vxe-table/static/js/index.3786980a.js></script></body></html>
})();</script><link href=/vxe-table/static/js/chunk-1b979dc0.a7208679.js rel=prefetch><link href=/vxe-table/static/js/chunk-2d216214.a9b84dcf.js rel=prefetch><link href=/vxe-table/static/js/chunk-2d216257.6a8b5f89.js rel=prefetch><link href=/vxe-table/static/css/chunk-vendors.cfd9ba4a.css rel=preload as=style><link href=/vxe-table/static/css/index.c043e28a.css rel=preload as=style><link href=/vxe-table/static/js/chunk-vendors.5740306f.js rel=preload as=script><link href=/vxe-table/static/js/index.f6ca1efe.js rel=preload as=script><link href=/vxe-table/static/css/chunk-vendors.cfd9ba4a.css rel=stylesheet><link href=/vxe-table/static/css/index.c043e28a.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/static/js/chunk-vendors.5740306f.js></script><script src=/vxe-table/static/js/index.f6ca1efe.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -13,4 +13,4 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
}
})();</script><link href=/vxe-table/v1/static/css/chunk-vendors.5ca25808.css rel=preload as=style><link href=/vxe-table/v1/static/css/index.d12d83dc.css rel=preload as=style><link href=/vxe-table/v1/static/js/chunk-vendors.66fa3899.js rel=preload as=script><link href=/vxe-table/v1/static/js/index.944a6d61.js rel=preload as=script><link href=/vxe-table/v1/static/css/chunk-vendors.5ca25808.css rel=stylesheet><link href=/vxe-table/v1/static/css/index.d12d83dc.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/v1/static/js/chunk-vendors.66fa3899.js></script><script src=/vxe-table/v1/static/js/index.944a6d61.js></script></body></html>
})();</script><link href=/vxe-table/v1/static/css/chunk-vendors.5ca25808.css rel=preload as=style><link href=/vxe-table/v1/static/css/index.d12d83dc.css rel=preload as=style><link href=/vxe-table/v1/static/js/chunk-vendors.66fa3899.js rel=preload as=script><link href=/vxe-table/v1/static/js/index.5bebc20a.js rel=preload as=script><link href=/vxe-table/v1/static/css/chunk-vendors.5ca25808.css rel=stylesheet><link href=/vxe-table/v1/static/css/index.d12d83dc.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/v1/static/js/chunk-vendors.66fa3899.js></script><script src=/vxe-table/v1/static/js/index.5bebc20a.js></script></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -13,4 +13,4 @@
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
}
})();</script><link href=/vxe-table/v2/static/css/chunk-vendors.88b16125.css rel=preload as=style><link href=/vxe-table/v2/static/css/index.e8c6fa14.css rel=preload as=style><link href=/vxe-table/v2/static/js/chunk-vendors.91cdd506.js rel=preload as=script><link href=/vxe-table/v2/static/js/index.41a53113.js rel=preload as=script><link href=/vxe-table/v2/static/css/chunk-vendors.88b16125.css rel=stylesheet><link href=/vxe-table/v2/static/css/index.e8c6fa14.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/v2/static/js/chunk-vendors.91cdd506.js></script><script src=/vxe-table/v2/static/js/index.41a53113.js></script></body></html>
})();</script><link href=/vxe-table/v2/static/css/chunk-vendors.88b16125.css rel=preload as=style><link href=/vxe-table/v2/static/css/index.e8c6fa14.css rel=preload as=style><link href=/vxe-table/v2/static/js/chunk-vendors.91cdd506.js rel=preload as=script><link href=/vxe-table/v2/static/js/index.09b43a86.js rel=preload as=script><link href=/vxe-table/v2/static/css/chunk-vendors.88b16125.css rel=stylesheet><link href=/vxe-table/v2/static/css/index.e8c6fa14.css rel=stylesheet></head><body><noscript><strong>We're sorry but vxe-table doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/vxe-table/v2/static/js/chunk-vendors.91cdd506.js></script><script src=/vxe-table/v2/static/js/index.09b43a86.js></script></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -1659,6 +1659,15 @@ const apis = [
enum: '',
defVal: 'false',
list: []
},
{
name: 'extension',
desc: '只对 area 启用后有效,是否开启区域延伸选取功能,开启后可以通过鼠标点击区域右下角延伸扩大选取范围',
version: 'pro',
type: 'boolean',
enum: '',
defVal: 'true',
list: []
}
]
},
@@ -3849,6 +3858,24 @@ const apis = [
}
]
},
{
name: 'openFind()',
desc: '如果功能被支持,用于 mouse-config.area打开单元格查找功能',
version: 'pro',
type: 'Promise',
enum: '',
defVal: '',
list: []
},
{
name: 'openReplace()',
desc: '如果功能被支持,用于 mouse-config.area打开单元格替换功能',
version: 'pro',
type: 'Promise',
enum: '',
defVal: '',
list: []
},
{
name: 'focus()',
desc: '使表格获取焦点',

View File

@@ -88,48 +88,48 @@ import switchAPI from '../../api/switch'
import listAPI from '../../api/list'
import pulldownAPI from '../../api/pulldown'
// import i18n from '../../i18n'
// const attributes = window.attributes = {}
// const tags = window.tags = {}
import i18n from '../../i18n'
const attributes = window.attributes = {}
const tags = window.tags = {}
// const tagMaps = [
// ['vxe-table', tableAPI, { subtags: ['vxe-table-column'], description: '基础表格' }],
// ['vxe-table-column', tableColumnAPI, { description: '基础表格 - 列' }],
// ['vxe-grid', gridAPI, { description: '高级表格' }],
// ['vxe-toolbar', toolbarAPI, { description: '工具栏' }],
// ['vxe-pager', pagerAPI, { description: '分页' }],
// ['vxe-radio', radioAPI, { description: '单选框' }],
// ['vxe-radio-group', radioGroupAPI, { description: '单选组' }],
// ['vxe-radio-button', radioButtonAPI, { description: '单选按钮' }],
// ['vxe-checkbox', checkboxAPI, { description: '复选框' }],
// ['vxe-checkbox-group', checkboxGroupAPI, { description: '复选组' }],
// ['vxe-switch', switchAPI, { description: '开关按钮' }],
// ['vxe-input', inputAPI, { description: '输入框' }],
// ['vxe-select', selectAPI, { subtags: ['vxe-optgroup', 'vxe-option'], description: '下拉框' }],
// ['vxe-optgroup', optgroupAPI, { subtags: ['vxe-option'], description: '下拉框 - 分组' }],
// ['vxe-option', optionAPI, { description: '下拉框 - 选项' }],
// ['vxe-button', buttonAPI, { description: '按钮' }],
// ['vxe-tooltip', tooltipAPI, { description: '工具提示' }],
// ['vxe-modal', modalAPI, { description: '模态窗口' }],
// ['vxe-form', formAPI, { subtags: ['vxe-form-item'], description: '表单' }],
// ['vxe-form-item', formItemAPI, { description: '表单 - 项' }],
// ['vxe-list', listAPI, { description: '列表' }],
// ['vxe-pulldown', pulldownAPI, { description: '下拉容器' }]
// ]
const tagMaps = [
['vxe-table', tableAPI, { subtags: ['vxe-table-column'], description: '基础表格' }],
['vxe-table-column', tableColumnAPI, { description: '基础表格 - 列' }],
['vxe-grid', gridAPI, { description: '高级表格' }],
['vxe-toolbar', toolbarAPI, { description: '工具栏' }],
['vxe-pager', pagerAPI, { description: '分页' }],
['vxe-radio', radioAPI, { description: '单选框' }],
['vxe-radio-group', radioGroupAPI, { description: '单选组' }],
['vxe-radio-button', radioButtonAPI, { description: '单选按钮' }],
['vxe-checkbox', checkboxAPI, { description: '复选框' }],
['vxe-checkbox-group', checkboxGroupAPI, { description: '复选组' }],
['vxe-switch', switchAPI, { description: '开关按钮' }],
['vxe-input', inputAPI, { description: '输入框' }],
['vxe-select', selectAPI, { subtags: ['vxe-optgroup', 'vxe-option'], description: '下拉框' }],
['vxe-optgroup', optgroupAPI, { subtags: ['vxe-option'], description: '下拉框 - 分组' }],
['vxe-option', optionAPI, { description: '下拉框 - 选项' }],
['vxe-button', buttonAPI, { description: '按钮' }],
['vxe-tooltip', tooltipAPI, { description: '工具提示' }],
['vxe-modal', modalAPI, { description: '模态窗口' }],
['vxe-form', formAPI, { subtags: ['vxe-form-item'], description: '表单' }],
['vxe-form-item', formItemAPI, { description: '表单 - 项' }],
['vxe-list', listAPI, { description: '列表' }],
['vxe-pulldown', pulldownAPI, { description: '下拉容器' }]
]
// tagMaps.forEach(confs => {
// const props = confs[1].find(item => item.name === 'Props').list
// const keys = []
// props.forEach(item => {
// const name = XEUtils.kebabCase(item.name)
// attributes[`${confs[0]}/${name}`] = {
// type: XEUtils.toString(item.type).toLowerCase(),
// description: item.descKey ? i18n.t(item.descKey) : item.desc
// }
// keys.push(name)
// })
// tags[confs[0]] = Object.assign({ attributes: keys }, confs[2])
// })
tagMaps.forEach(confs => {
const props = confs[1].find(item => item.name === 'Props').list
const keys = []
props.forEach(item => {
const name = XEUtils.kebabCase(item.name)
attributes[`${confs[0]}/${name}`] = {
type: XEUtils.toString(item.type).toLowerCase(),
description: item.descKey ? i18n.t(item.descKey) : item.desc
}
keys.push(name)
})
tags[confs[0]] = Object.assign({ attributes: keys }, confs[2])
})
export default {
data () {

View File

@@ -36,15 +36,25 @@
<pre>
<code>
mouse-config 鼠标配置
| Mouse | (area) 鼠标选取指定区域 |
| Mouse + Ctrl | (area) 鼠标选取多重区域 |
keyboard-config 按键配置
| Ctrl + X | (isClip) 将单元格标记为剪贴状态并将内容复制到剪贴板支持 Excel WPS |
| Ctrl + C | (isClip) 将单元格标记为复制状态并将内容复制到剪贴板支持 Excel WPS |
| Ctrl + V | (isClip) 将剪贴板的内容粘贴到指定区域中支持 Excel WPS |
| Ctrl + M | (isMerge) 将选取的单元格合并或取消合并 |
| Ctrl + F | (isFNR) 查找数据全表或查找指定区域数据 |
| Ctrl + H | (isFNR) 替换数据全表或替换指定区域数据 |
| Arrow Up | isArrow如果存在则移动到上面的单元格 |
| Arrow Down | isArrow如果存在则移动到下面的单元格 |
| Arrow Left | isArrow如果存在则移动到左边的单元格 |
| Arrow Right | isArrow如果存在则移动到右边的单元格 |
| Tab | isTab如果存在则移动到右边单元格如果到最后一列且存在下一行则从下一行开始移 |
| Tab + Shift | isTab如果存在则移动到左边单元格如果到第一列且存在上一行则从上一行开始移 |
| Spacebar | 如果单元格是复选框或单选框则切换勾选状态 |
| Enter | isEnter如果存在取消单元格编辑并移动到下面的单元格 |
| Enter + Shift | isEnter如果存在取消单元格编辑并移动到上面的单元格 |
| Tab | isTab如果存在则移动到右边单元格如果存在区域则在指定区域内移动如果移动到最后一列则从下一行开始移以此循环 |
| Tab + Shift | isTab如果存在则移动到左边单元格则在指定区域内移动如果移动到第一列则从上一行开始移以此循环 |
| Spacebar | (isChecked) 如果选取的区域存在复选框则切换勾选状态 |
| Enter | isEnter如果存在取消单元格编辑并移动到下面的单元格则在指定区域内移动如果移动到最后一行则从下一列开始移到以此循环 |
| Enter + Shift | isEnter如果存在取消单元格编辑并移动到上面的单元格则在指定区域内移动如果移动到第一行则从上一列开始移到以此循环 |
| Delete | isDel清空单元格内容 |
| Backspace | isDel清空单元格内容并激活为编辑状态 |
| F2 | 如果存在激活单元格为编辑状态 |

View File

@@ -1299,6 +1299,10 @@
"type": "string",
"description": "只对 type=alert | confirm | message 有效,消息状态"
},
"vxe-modal/class-name": {
"type": "string",
"description": "给窗口附加 className"
},
"vxe-modal/icon-status": {
"type": "string",
"description": "自定义状态图标"

View File

@@ -421,6 +421,7 @@
"title",
"type",
"status",
"class-name",
"icon-status",
"message",
"cancel-button-text",

View File

@@ -78,7 +78,7 @@
"vxe-table-plugin-export-pdf": "^1.8.5",
"vxe-table-plugin-export-xlsx": "^1.6.0",
"vxe-table-plugin-iview": "^1.9.1",
"vxe-table-plugin-menus": "^1.4.3",
"vxe-table-plugin-menus": "^1.4.6",
"vxe-table-plugin-shortcut-key": "^1.3.0",
"vxe-table-plugin-virtual-tree": "0.3.3",
"xe-ajax": "^4.0.4",

View File

@@ -520,7 +520,7 @@ export default {
}, [
h('span', {
staticClass: 'vxe-table--cell-main-area'
}, [
}, mouseOpts.extension ? [
h('span', {
staticClass: 'vxe-table--cell-main-area-btn',
on: {
@@ -529,7 +529,7 @@ export default {
}
}
})
]),
] : null),
h('span', {
staticClass: 'vxe-table--cell-copy-area'
}),

View File

@@ -81,6 +81,9 @@ const GlobalConfig = {
isPrint: true,
modes: ['current', 'selected']
},
mouseConfig: {
extension: true
},
scrollX: {
gt: 60
// oSize: 0

View File

@@ -3723,7 +3723,7 @@ const Methods = {
}
// Module methods
const funcs = 'setFilter,clearFilter,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,exportData,openImport,importData,readFile,importByFile,print,openCustom'.split(',')
const funcs = 'setFilter,clearFilter,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,clearCopyCellArea,setCellAreas,openFind,openReplace,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,exportData,openImport,importData,readFile,importByFile,print,openCustom'.split(',')
funcs.forEach(name => {
Methods[name] = function (...args) {

8
types/table.d.ts vendored
View File

@@ -944,6 +944,14 @@ export declare class Table extends VXETableModule {
* @param options 参数
*/
print(options: PrintOptons): Promise<any>;
/**
* 用于 mouse-config.area打开单元格查找功能
*/
openFind(): Promise<any>;
/**
* 用于 mouse-config.area打开单元格替换功能
*/
openReplace(): Promise<any>;
/**
* 使表格获取焦点
*/