vxe-table 3.5.9-beta.4 → 3.5.9-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/edit/src/mixin.js +2 -2
- package/lib/filter/src/mixin.js +8 -5
- package/lib/filter/src/mixin.min.js +1 -1
- package/lib/form/src/form-item.js +1 -0
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/render.js +1 -0
- package/lib/form/src/render.min.js +1 -1
- package/lib/grid/src/grid.js +2 -1
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +332 -117
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +20 -15
- package/lib/input/src/input.min.js +1 -1
- package/lib/locale/lang/en-US.js +2 -0
- package/lib/locale/lang/en-US.min.js +1 -1
- package/lib/locale/lang/en-US.umd.js +2 -0
- package/lib/locale/lang/ja-JP.js +2 -0
- package/lib/locale/lang/ja-JP.min.js +1 -1
- package/lib/locale/lang/ja-JP.umd.js +2 -0
- package/lib/locale/lang/zh-CN.js +2 -0
- package/lib/locale/lang/zh-CN.min.js +1 -1
- package/lib/locale/lang/zh-CN.umd.js +2 -0
- package/lib/locale/lang/zh-HK.min.js +1 -1
- package/lib/locale/lang/zh-HK.umd.js +2 -0
- package/lib/locale/lang/zh-MO.min.js +1 -1
- package/lib/locale/lang/zh-MO.umd.js +2 -0
- package/lib/locale/lang/zh-TC.js +2 -0
- package/lib/locale/lang/zh-TC.min.js +1 -1
- package/lib/locale/lang/zh-TC.umd.js +2 -0
- package/lib/locale/lang/zh-TW.min.js +1 -1
- package/lib/locale/lang/zh-TW.umd.js +2 -0
- package/lib/select/src/select.js +213 -33
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +17 -3
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +1 -1
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +3 -3
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +1 -1
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/methods.js +72 -52
- package/lib/table/src/methods.min.js +1 -1
- package/lib/toolbar/style/style.css +13 -10
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/utils.js +2 -2
- package/lib/tools/utils.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +2 -2
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/package.json +1 -1
- package/packages/edit/src/mixin.js +2 -2
- package/packages/filter/src/mixin.js +5 -5
- package/packages/form/src/form-item.js +1 -1
- package/packages/form/src/render.js +1 -1
- package/packages/grid/src/grid.js +1 -2
- package/packages/input/src/input.js +17 -13
- package/packages/locale/lang/en-US.js +2 -0
- package/packages/locale/lang/ja-JP.js +2 -0
- package/packages/locale/lang/zh-CN.js +2 -0
- package/packages/locale/lang/zh-TC.js +2 -0
- package/packages/select/src/select.js +139 -16
- package/packages/table/src/body.js +1 -1
- package/packages/table/src/cell.js +3 -3
- package/packages/table/src/columnInfo.js +1 -1
- package/packages/table/src/methods.js +59 -49
- package/packages/tools/utils.js +2 -2
- package/packages/v-x-e-table/src/conf.js +2 -2
- package/styles/select.scss +24 -5
- package/styles/toolbar.scss +9 -5
- package/styles/variable.scss +0 -4
- package/types/form-item.d.ts +11 -8
- package/types/form.d.ts +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={use:!0,config:!0,t:!0,_t:!0,v:!0,VXETable:!0};exports.VXETable=void 0,exports._t=_t,exports.default=exports.config=void 0,exports.t=t,exports.use=use,exports.v=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../v-x-e-table/src/conf")),_interceptor=require("./src/interceptor");Object.keys(_interceptor).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_interceptor[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _interceptor[e]}}))});var _renderer=require("./src/renderer");Object.keys(_renderer).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_renderer[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _renderer[e]}}))});var _commands=require("./src/commands");Object.keys(_commands).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_commands[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _commands[e]}}))});var _menus=require("./src/menus");Object.keys(_menus).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_menus[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _menus[e]}}))});var _formats=require("./src/formats");Object.keys(_formats).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_formats[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _formats[e]}}))});var _setup=require("./src/setup");Object.keys(_setup).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_setup[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _setup[e]}}))});var _utils=require("../tools/utils"),_log=require("../tools/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var installedPlugins=[];function use(e,t){return e&&e.install&&-1===installedPlugins.indexOf(e)&&(e.install(VXETable,t),installedPlugins.push(e)),VXETable}function reg(e){"development"===process.env.NODE_ENV&&VXETable.Table&&(0,_log.errLog)("vxe.error.useErr",[e]),VXETable["_".concat(e)]=1}function getExportOrImpotType(e,r){var o=[];return _xeUtils.default.objectEach(e,function(e,t){0!==e&&e!==r||o.push(t)}),o}var VXETableConfig=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"zIndex",get:function(){return _utils.UtilTools.getLastZIndex()}},{key:"nextZIndex",get:function(){return _utils.UtilTools.nextZIndex()}},{key:"exportTypes",get:function(){return getExportOrImpotType(_conf.default.export.types,1)}},{key:"importTypes",get:function(){return getExportOrImpotType(_conf.default.export.types,2)}}]),e}(),config=new VXETableConfig;function t(e,t){return _conf.default.i18n(e,t)}function _t(e,t){return e?_xeUtils.default.toValueString(_conf.default.translate?_conf.default.translate(e,t):e):""}exports.config=config;var v="v3",VXETable={v:exports.v=v,version:"3.5.9-beta.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={use:!0,config:!0,t:!0,_t:!0,v:!0,VXETable:!0};exports.VXETable=void 0,exports._t=_t,exports.default=exports.config=void 0,exports.t=t,exports.use=use,exports.v=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../v-x-e-table/src/conf")),_interceptor=require("./src/interceptor");Object.keys(_interceptor).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_interceptor[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _interceptor[e]}}))});var _renderer=require("./src/renderer");Object.keys(_renderer).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_renderer[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _renderer[e]}}))});var _commands=require("./src/commands");Object.keys(_commands).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_commands[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _commands[e]}}))});var _menus=require("./src/menus");Object.keys(_menus).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_menus[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _menus[e]}}))});var _formats=require("./src/formats");Object.keys(_formats).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_formats[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _formats[e]}}))});var _setup=require("./src/setup");Object.keys(_setup).forEach(function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_setup[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _setup[e]}}))});var _utils=require("../tools/utils"),_log=require("../tools/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var installedPlugins=[];function use(e,t){return e&&e.install&&-1===installedPlugins.indexOf(e)&&(e.install(VXETable,t),installedPlugins.push(e)),VXETable}function reg(e){"development"===process.env.NODE_ENV&&VXETable.Table&&(0,_log.errLog)("vxe.error.useErr",[e]),VXETable["_".concat(e)]=1}function getExportOrImpotType(e,r){var o=[];return _xeUtils.default.objectEach(e,function(e,t){0!==e&&e!==r||o.push(t)}),o}var VXETableConfig=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"zIndex",get:function(){return _utils.UtilTools.getLastZIndex()}},{key:"nextZIndex",get:function(){return _utils.UtilTools.nextZIndex()}},{key:"exportTypes",get:function(){return getExportOrImpotType(_conf.default.export.types,1)}},{key:"importTypes",get:function(){return getExportOrImpotType(_conf.default.export.types,2)}}]),e}(),config=new VXETableConfig;function t(e,t){return _conf.default.i18n(e,t)}function _t(e,t){return e?_xeUtils.default.toValueString(_conf.default.translate?_conf.default.translate(e,t):e):""}exports.config=config;var v="v3",VXETable={v:exports.v=v,version:"3.5.9-beta.7",reg:reg,use:use,setup:_setup.setup,interceptor:_interceptor.interceptor,renderer:_renderer.renderer,commands:_commands.commands,formats:_formats.formats,menus:_menus.menus,config:config,t:t,_t:_t},_default=exports.VXETable=VXETable;exports.default=_default;
|
|
@@ -264,8 +264,8 @@ var _default = {
|
|
|
264
264
|
// parseFormat: 'yyyy-MM-dd HH:mm:ss.SSS',
|
|
265
265
|
// labelFormat: '',
|
|
266
266
|
// valueFormat: '',
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
startDate: new Date(1900, 0, 1),
|
|
268
|
+
endDate: new Date(2100, 0, 1),
|
|
269
269
|
startDay: 1,
|
|
270
270
|
selectDay: 1,
|
|
271
271
|
digits: 2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var iconPrefix="vxe-icon--",_default={size:null,zIndex:999,version:0,emptyCell:" ",loadingText:null,table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,radioConfig:{strict:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,message:"default"},sortConfig:{showIcon:!0},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",children:"children",hasChild:"hasChild",mapChildren:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0},editConfig:{showIcon:!0,showAsterisk:!0},importConfig:{modes:["insert","covering"]},exportConfig:{modes:["current","selected"]},printConfig:{modes:["current","selected"]},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{selectCellByHeader:!0},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{enabled:!0,gt:60},scrollY:{enabled:!0,gt:100}},export:{types:{}},icon:{TABLE_SORT_ASC:iconPrefix+"caret-top",TABLE_SORT_DESC:iconPrefix+"caret-bottom",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit-outline",TABLE_HELP:iconPrefix+"question",TABLE_TREE_LOADED:iconPrefix+"refresh roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"refresh roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",BUTTON_DROPDOWN:iconPrefix+"arrow-bottom",BUTTON_LOADING:iconPrefix+"refresh roll",SELECT_LOADED:iconPrefix+"refresh roll",SELECT_OPEN:iconPrefix+"caret-bottom rotate180",SELECT_CLOSE:iconPrefix+"caret-bottom",PAGER_JUMP_PREV:iconPrefix+"d-arrow-left",PAGER_JUMP_NEXT:iconPrefix+"d-arrow-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"more",INPUT_CLEAR:iconPrefix+"close",INPUT_PWD:iconPrefix+"eye-slash",INPUT_SHOW_PWD:iconPrefix+"eye",INPUT_PREV_NUM:iconPrefix+"caret-top",INPUT_NEXT_NUM:iconPrefix+"caret-bottom",INPUT_DATE:iconPrefix+"calendar",INPUT_SEARCH:iconPrefix+"search",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"zoomout",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info",MODAL_SUCCESS:iconPrefix+"success",MODAL_WARNING:iconPrefix+"warning",MODAL_ERROR:iconPrefix+"error",MODAL_QUESTION:iconPrefix+"question",MODAL_LOADING:iconPrefix+"refresh roll",TOOLBAR_TOOLS_REFRESH:iconPrefix+"refresh",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"refresh roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_ZOOM_IN:iconPrefix+"zoomin",TOOLBAR_TOOLS_ZOOM_OUT:iconPrefix+"zoomout",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"menu",FORM_PREFIX:iconPrefix+"question",FORM_SUFFIX:iconPrefix+"question",FORM_FOLDING:iconPrefix+"arrow-top rotate180",FORM_UNFOLDING:iconPrefix+"arrow-top"},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,message:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300},pager:{},form:{validConfig:{showMessage:!0,autoPos:!0},tooltipConfig:{enterable:!0},titleAsterisk:!0},input:{
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var iconPrefix="vxe-icon--",_default={size:null,zIndex:999,version:0,emptyCell:" ",loadingText:null,table:{fit:!0,showHeader:!0,animat:!0,delayHover:250,autoResize:!0,radioConfig:{strict:!0},checkboxConfig:{strict:!0},tooltipConfig:{enterable:!0},validConfig:{showMessage:!0,message:"default"},sortConfig:{showIcon:!0},filterConfig:{showIcon:!0},treeConfig:{rowField:"id",parentField:"parentId",children:"children",hasChild:"hasChild",mapChildren:"_X_ROW_CHILD",indent:20,showIcon:!0},expandConfig:{showIcon:!0},editConfig:{showIcon:!0,showAsterisk:!0},importConfig:{modes:["insert","covering"]},exportConfig:{modes:["current","selected"]},printConfig:{modes:["current","selected"]},mouseConfig:{extension:!0},keyboardConfig:{isEsc:!0},areaConfig:{selectCellByHeader:!0},clipConfig:{isCopy:!0,isCut:!0,isPaste:!0},fnrConfig:{isFind:!0,isReplace:!0},scrollX:{enabled:!0,gt:60},scrollY:{enabled:!0,gt:100}},export:{types:{}},icon:{TABLE_SORT_ASC:iconPrefix+"caret-top",TABLE_SORT_DESC:iconPrefix+"caret-bottom",TABLE_FILTER_NONE:iconPrefix+"funnel",TABLE_FILTER_MATCH:iconPrefix+"funnel",TABLE_EDIT:iconPrefix+"edit-outline",TABLE_HELP:iconPrefix+"question",TABLE_TREE_LOADED:iconPrefix+"refresh roll",TABLE_TREE_OPEN:iconPrefix+"caret-right rotate90",TABLE_TREE_CLOSE:iconPrefix+"caret-right",TABLE_EXPAND_LOADED:iconPrefix+"refresh roll",TABLE_EXPAND_OPEN:iconPrefix+"arrow-right rotate90",TABLE_EXPAND_CLOSE:iconPrefix+"arrow-right",BUTTON_DROPDOWN:iconPrefix+"arrow-bottom",BUTTON_LOADING:iconPrefix+"refresh roll",SELECT_LOADED:iconPrefix+"refresh roll",SELECT_OPEN:iconPrefix+"caret-bottom rotate180",SELECT_CLOSE:iconPrefix+"caret-bottom",PAGER_JUMP_PREV:iconPrefix+"d-arrow-left",PAGER_JUMP_NEXT:iconPrefix+"d-arrow-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"more",INPUT_CLEAR:iconPrefix+"close",INPUT_PWD:iconPrefix+"eye-slash",INPUT_SHOW_PWD:iconPrefix+"eye",INPUT_PREV_NUM:iconPrefix+"caret-top",INPUT_NEXT_NUM:iconPrefix+"caret-bottom",INPUT_DATE:iconPrefix+"calendar",INPUT_SEARCH:iconPrefix+"search",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"zoomout",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info",MODAL_SUCCESS:iconPrefix+"success",MODAL_WARNING:iconPrefix+"warning",MODAL_ERROR:iconPrefix+"error",MODAL_QUESTION:iconPrefix+"question",MODAL_LOADING:iconPrefix+"refresh roll",TOOLBAR_TOOLS_REFRESH:iconPrefix+"refresh",TOOLBAR_TOOLS_REFRESH_LOADING:iconPrefix+"refresh roll",TOOLBAR_TOOLS_IMPORT:iconPrefix+"upload",TOOLBAR_TOOLS_EXPORT:iconPrefix+"download",TOOLBAR_TOOLS_PRINT:iconPrefix+"print",TOOLBAR_TOOLS_ZOOM_IN:iconPrefix+"zoomin",TOOLBAR_TOOLS_ZOOM_OUT:iconPrefix+"zoomout",TOOLBAR_TOOLS_CUSTOM:iconPrefix+"menu",FORM_PREFIX:iconPrefix+"question",FORM_SUFFIX:iconPrefix+"question",FORM_FOLDING:iconPrefix+"arrow-top rotate180",FORM_UNFOLDING:iconPrefix+"arrow-top"},grid:{formConfig:{enabled:!0},pagerConfig:{enabled:!0},toolbarConfig:{enabled:!0},proxyConfig:{enabled:!0,autoLoad:!0,message:!0,props:{list:null,result:"result",total:"page.total",message:"message"}}},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300},pager:{},form:{validConfig:{showMessage:!0,autoPos:!0},tooltipConfig:{enterable:!0},titleAsterisk:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},textarea:{},select:{multiCharOverflow:8},toolbar:{},button:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},checkbox:{},switch:{},modal:{top:15,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,draggable:!0,storageKey:"VXE_MODAL_POSITION"},list:{scrollY:{enabled:!0,gt:100}},i18n:function(e){return e}};exports.default=_default;
|
package/package.json
CHANGED
|
@@ -189,7 +189,7 @@ export default {
|
|
|
189
189
|
const { afterFullData, tableFullData, tableFullTreeData, treeConfig, mergeList, editStore, checkboxOpts, selection, isInsertByRow, treeOpts } = this
|
|
190
190
|
const { transform } = treeOpts
|
|
191
191
|
const { actived, removeList, insertList } = editStore
|
|
192
|
-
const { checkField
|
|
192
|
+
const { checkField } = checkboxOpts
|
|
193
193
|
let rest = []
|
|
194
194
|
if (!rows) {
|
|
195
195
|
rows = tableFullData
|
|
@@ -203,7 +203,7 @@ export default {
|
|
|
203
203
|
}
|
|
204
204
|
})
|
|
205
205
|
// 如果绑定了多选属性,则更新状态
|
|
206
|
-
if (!
|
|
206
|
+
if (!checkField) {
|
|
207
207
|
rows.forEach(row => {
|
|
208
208
|
const sIndex = selection.indexOf(row)
|
|
209
209
|
if (sIndex > -1) {
|
|
@@ -130,13 +130,13 @@ export default {
|
|
|
130
130
|
filterStore.maxHeight = maxHeight
|
|
131
131
|
})
|
|
132
132
|
}
|
|
133
|
-
this.emitEvent('filter-visible', { column, property: column.
|
|
133
|
+
this.emitEvent('filter-visible', { column, field: column.field, property: column.field, filterList: this.getCheckedFilters(), visible: filterStore.visible }, evnt)
|
|
134
134
|
},
|
|
135
135
|
_getCheckedFilters () {
|
|
136
136
|
const { tableFullColumn } = this
|
|
137
137
|
const filterList = []
|
|
138
138
|
tableFullColumn.filter(column => {
|
|
139
|
-
const {
|
|
139
|
+
const { field, filters } = column
|
|
140
140
|
const valueList = []
|
|
141
141
|
const dataList = []
|
|
142
142
|
if (filters && filters.length) {
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
147
147
|
}
|
|
148
148
|
})
|
|
149
149
|
if (valueList.length) {
|
|
150
|
-
filterList.push({ column, property, values: valueList, datas: dataList })
|
|
150
|
+
filterList.push({ column, field, property: field, values: valueList, datas: dataList })
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
})
|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
161
161
|
confirmFilterEvent (evnt) {
|
|
162
162
|
const { filterStore, filterOpts, scrollXLoad: oldScrollXLoad, scrollYLoad: oldScrollYLoad } = this
|
|
163
163
|
const { column } = filterStore
|
|
164
|
-
const {
|
|
164
|
+
const { field } = column
|
|
165
165
|
const values = []
|
|
166
166
|
const datas = []
|
|
167
167
|
column.filters.forEach(item => {
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
this.handleTableData(true)
|
|
177
177
|
this.checkSelectionStatus()
|
|
178
178
|
}
|
|
179
|
-
this.emitEvent('filter-change', { column, property, values, datas, filters: filterList, filterList }, evnt)
|
|
179
|
+
this.emitEvent('filter-change', { column, field, property: field, values, datas, filters: filterList, filterList }, evnt)
|
|
180
180
|
this.closeFilter()
|
|
181
181
|
this.updateFooter().then(() => {
|
|
182
182
|
const { scrollXLoad, scrollYLoad } = this
|
|
@@ -54,7 +54,7 @@ const renderItem = (h, _vm, item, slots) => {
|
|
|
54
54
|
const showTitle = itemOverflow === 'title'
|
|
55
55
|
const showTooltip = itemOverflow === true || itemOverflow === 'tooltip'
|
|
56
56
|
const hasEllipsis = showTitle || showTooltip || showEllipsis
|
|
57
|
-
const params = { data, property: field, item, $form: _vm }
|
|
57
|
+
const params = { data, field, property: field, item, $form: _vm }
|
|
58
58
|
let isRequired
|
|
59
59
|
if (!itemVisibleMethod && compConf && compConf.itemVisibleMethod) {
|
|
60
60
|
itemVisibleMethod = compConf.itemVisibleMethod
|
|
@@ -26,7 +26,7 @@ export function renderTitle (h, _vm, item) {
|
|
|
26
26
|
const { data, tooltipOpts } = _vm
|
|
27
27
|
const { slots, field, itemRender, titlePrefix, titleSuffix } = item
|
|
28
28
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
29
|
-
const params = { data, property: field, item, $form: _vm }
|
|
29
|
+
const params = { data, field, property: field, item, $form: _vm }
|
|
30
30
|
const contVNs = []
|
|
31
31
|
const titVNs = []
|
|
32
32
|
if (titlePrefix) {
|
|
@@ -266,7 +266,7 @@ export default {
|
|
|
266
266
|
warnLog('vxe.error.errProp', [`grid.toolbar-config=${this.toolbarConfig}`, 'grid.toolbar-config={}'])
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
|
|
269
|
+
this.initPages()
|
|
270
270
|
GlobalEvent.on(this, 'keydown', this.handleGlobalKeydownEvent)
|
|
271
271
|
},
|
|
272
272
|
mounted () {
|
|
@@ -274,7 +274,6 @@ export default {
|
|
|
274
274
|
this.loadColumn(this.columns)
|
|
275
275
|
}
|
|
276
276
|
this.initToolbar()
|
|
277
|
-
this.initPages()
|
|
278
277
|
this.initProxy()
|
|
279
278
|
},
|
|
280
279
|
destroyed () {
|
|
@@ -647,8 +647,10 @@ export default {
|
|
|
647
647
|
|
|
648
648
|
// date、week、month、year
|
|
649
649
|
dateConfig: Object,
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
startDate: { type: [String, Number, Date], default: () => GlobalConfig.input.startDate },
|
|
651
|
+
endDate: { type: [String, Number, Date], default: () => GlobalConfig.input.endDate },
|
|
652
|
+
minDate: [String, Number, Date],
|
|
653
|
+
maxDate: [String, Number, Date],
|
|
652
654
|
// 已废弃 startWeek,被 startDay 替换
|
|
653
655
|
startWeek: Number,
|
|
654
656
|
startDay: { type: [String, Number], default: () => GlobalConfig.input.startDay },
|
|
@@ -725,24 +727,24 @@ export default {
|
|
|
725
727
|
return this.clearable && (this.isPawdType || this.isNumType || this.isDatePickerType || this.type === 'text' || this.type === 'search')
|
|
726
728
|
},
|
|
727
729
|
isDisabledPrevDateBtn () {
|
|
728
|
-
const { selectMonth,
|
|
730
|
+
const { selectMonth, dateStartTime } = this
|
|
729
731
|
if (selectMonth) {
|
|
730
|
-
return selectMonth <=
|
|
732
|
+
return selectMonth <= dateStartTime
|
|
731
733
|
}
|
|
732
734
|
return false
|
|
733
735
|
},
|
|
734
736
|
isDisabledNextDateBtn () {
|
|
735
|
-
const { selectMonth,
|
|
737
|
+
const { selectMonth, dateEndTime } = this
|
|
736
738
|
if (selectMonth) {
|
|
737
|
-
return selectMonth >=
|
|
739
|
+
return selectMonth >= dateEndTime
|
|
738
740
|
}
|
|
739
741
|
return false
|
|
740
742
|
},
|
|
741
|
-
|
|
742
|
-
return this.
|
|
743
|
+
dateStartTime () {
|
|
744
|
+
return this.startDate ? XEUtils.toStringDate(this.startDate) : null
|
|
743
745
|
},
|
|
744
|
-
|
|
745
|
-
return this.
|
|
746
|
+
dateEndTime () {
|
|
747
|
+
return this.endDate ? XEUtils.toStringDate(this.endDate) : null
|
|
746
748
|
},
|
|
747
749
|
supportMultiples () {
|
|
748
750
|
return ['date', 'week', 'month', 'quarter', 'year'].includes(this.type)
|
|
@@ -948,9 +950,9 @@ export default {
|
|
|
948
950
|
const selMonth = selectMonth.getMonth()
|
|
949
951
|
const selDay = selectMonth.getDay()
|
|
950
952
|
const prevOffsetDate = -weekDatas.indexOf(selDay)
|
|
951
|
-
const
|
|
953
|
+
const startDayDate = new Date(XEUtils.getWhatDay(selectMonth, prevOffsetDate).getTime() + hmsTime)
|
|
952
954
|
for (let index = 0; index < 42; index++) {
|
|
953
|
-
const date = XEUtils.getWhatDay(
|
|
955
|
+
const date = XEUtils.getWhatDay(startDayDate, index)
|
|
954
956
|
const itemFullYear = date.getFullYear()
|
|
955
957
|
const itemMonth = date.getMonth()
|
|
956
958
|
const itemDate = date.getDate()
|
|
@@ -1652,7 +1654,9 @@ export default {
|
|
|
1652
1654
|
this.dateTimeChangeEvent(evnt)
|
|
1653
1655
|
},
|
|
1654
1656
|
dateConfirmEvent () {
|
|
1655
|
-
|
|
1657
|
+
if (this.isDateTimeType || this.multiple) {
|
|
1658
|
+
this.dateChange(this.dateValue || this.currentDate)
|
|
1659
|
+
}
|
|
1656
1660
|
this.hidePanel()
|
|
1657
1661
|
},
|
|
1658
1662
|
dateMinuteEvent (evnt, item) {
|
|
@@ -4,7 +4,7 @@ import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
|
4
4
|
import vSize from '../../mixins/size'
|
|
5
5
|
import UtilTools, { getFuncText } from '../../tools/utils'
|
|
6
6
|
import DomTools from '../../tools/dom'
|
|
7
|
-
import { GlobalEvent } from '../../tools/event'
|
|
7
|
+
import { GlobalEvent, hasEventKey, EVENT_KEYS } from '../../tools/event'
|
|
8
8
|
|
|
9
9
|
function isOptionVisible (option) {
|
|
10
10
|
return option.visible !== false
|
|
@@ -112,6 +112,13 @@ function findOption (_vm, optionValue) {
|
|
|
112
112
|
return fullOptionList.find(item => optionValue === item[valueField])
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
function getRemoteSelectLabel (_vm, value) {
|
|
116
|
+
const { remoteValueList } = _vm
|
|
117
|
+
const remoteItem = remoteValueList.find(item => value === item.key)
|
|
118
|
+
const item = remoteItem ? remoteItem.result : null
|
|
119
|
+
return XEUtils.toValueString(item ? item[_vm.labelField] : value)
|
|
120
|
+
}
|
|
121
|
+
|
|
115
122
|
function getSelectLabel (_vm, value) {
|
|
116
123
|
const item = findOption(_vm, value)
|
|
117
124
|
return XEUtils.toValueString(item ? item[_vm.labelField] : value)
|
|
@@ -141,7 +148,7 @@ export function renderOption (h, _vm, list, group) {
|
|
|
141
148
|
mousedown: _vm.mousedownOptionEvent,
|
|
142
149
|
click: (evnt) => {
|
|
143
150
|
if (!isDisabled) {
|
|
144
|
-
_vm.changeOptionEvent(evnt, optionValue)
|
|
151
|
+
_vm.changeOptionEvent(evnt, optionValue, option)
|
|
145
152
|
}
|
|
146
153
|
},
|
|
147
154
|
mouseenter: () => {
|
|
@@ -182,7 +189,21 @@ export function renderOptgroup (h, _vm) {
|
|
|
182
189
|
}
|
|
183
190
|
|
|
184
191
|
function renderOpts (h, _vm) {
|
|
185
|
-
const { isGroup, visibleGroupList, visibleOptionList } = _vm
|
|
192
|
+
const { isGroup, visibleGroupList, visibleOptionList, searchLoading } = _vm
|
|
193
|
+
if (searchLoading) {
|
|
194
|
+
return [
|
|
195
|
+
h('div', {
|
|
196
|
+
class: 'vxe-select--search-loading'
|
|
197
|
+
}, [
|
|
198
|
+
h('i', {
|
|
199
|
+
class: ['vxe-select--search-icon', GlobalConfig.icon.SELECT_LOADED]
|
|
200
|
+
}),
|
|
201
|
+
h('span', {
|
|
202
|
+
class: 'vxe-select--search-text'
|
|
203
|
+
}, GlobalConfig.i18n('vxe.select.loadingText'))
|
|
204
|
+
])
|
|
205
|
+
]
|
|
206
|
+
}
|
|
186
207
|
if (isGroup) {
|
|
187
208
|
if (visibleGroupList.length) {
|
|
188
209
|
return renderOptgroup(h, _vm)
|
|
@@ -219,6 +240,10 @@ export default {
|
|
|
219
240
|
optionConfig: Object,
|
|
220
241
|
className: [String, Function],
|
|
221
242
|
size: { type: String, default: () => GlobalConfig.select.size || GlobalConfig.size },
|
|
243
|
+
filterable: Boolean,
|
|
244
|
+
filterMethod: Function,
|
|
245
|
+
remote: Boolean,
|
|
246
|
+
remoteMethod: Function,
|
|
222
247
|
emptyText: String,
|
|
223
248
|
// 已废弃,被 option-config.keyField 替换
|
|
224
249
|
optionId: { type: String, default: () => GlobalConfig.select.optionId },
|
|
@@ -250,13 +275,17 @@ export default {
|
|
|
250
275
|
fullOptionList: [],
|
|
251
276
|
visibleGroupList: [],
|
|
252
277
|
visibleOptionList: [],
|
|
278
|
+
remoteValueList: [],
|
|
253
279
|
panelIndex: 0,
|
|
254
280
|
panelStyle: null,
|
|
255
281
|
panelPlacement: null,
|
|
282
|
+
currentOption: null,
|
|
256
283
|
currentValue: null,
|
|
257
284
|
visiblePanel: false,
|
|
258
285
|
animatVisible: false,
|
|
259
|
-
isActivated: false
|
|
286
|
+
isActivated: false,
|
|
287
|
+
searchValue: '',
|
|
288
|
+
searchLoading: false
|
|
260
289
|
}
|
|
261
290
|
},
|
|
262
291
|
computed: {
|
|
@@ -288,9 +317,13 @@ export default {
|
|
|
288
317
|
return XEUtils.toNumber(this.multiCharOverflow)
|
|
289
318
|
},
|
|
290
319
|
selectLabel () {
|
|
291
|
-
const { value, multiple, multiMaxCharNum } = this
|
|
320
|
+
const { value, multiple, remote, multiMaxCharNum } = this
|
|
292
321
|
if (value && multiple) {
|
|
293
|
-
|
|
322
|
+
const vals = (XEUtils.isArray(value) ? value : [value])
|
|
323
|
+
if (remote) {
|
|
324
|
+
return vals.map(val => getRemoteSelectLabel(this, val)).join(', ')
|
|
325
|
+
}
|
|
326
|
+
return vals.map(val => {
|
|
294
327
|
const label = getSelectLabel(this, val)
|
|
295
328
|
if (multiMaxCharNum > 0 && label.length > multiMaxCharNum) {
|
|
296
329
|
return `${label.substring(0, multiMaxCharNum)}...`
|
|
@@ -298,6 +331,9 @@ export default {
|
|
|
298
331
|
return label
|
|
299
332
|
}).join(', ')
|
|
300
333
|
}
|
|
334
|
+
if (remote) {
|
|
335
|
+
return getRemoteSelectLabel(this, value)
|
|
336
|
+
}
|
|
301
337
|
return getSelectLabel(this, value)
|
|
302
338
|
}
|
|
303
339
|
},
|
|
@@ -349,13 +385,14 @@ export default {
|
|
|
349
385
|
GlobalEvent.off(this, 'blur')
|
|
350
386
|
},
|
|
351
387
|
render (h) {
|
|
352
|
-
const { $scopedSlots, vSize, className, inited, isActivated, loading, disabled, visiblePanel } = this
|
|
388
|
+
const { _e, $scopedSlots, vSize, className, inited, isActivated, loading, disabled, visiblePanel, filterable } = this
|
|
353
389
|
const prefixSlot = $scopedSlots.prefix
|
|
354
390
|
return h('div', {
|
|
355
391
|
class: ['vxe-select', className ? (XEUtils.isFunction(className) ? className({ $select: this }) : className) : '', {
|
|
356
392
|
[`size--${vSize}`]: vSize,
|
|
357
393
|
'is--visivle': visiblePanel,
|
|
358
394
|
'is--disabled': disabled,
|
|
395
|
+
'is--filter': filterable,
|
|
359
396
|
'is--loading': loading,
|
|
360
397
|
'is--active': isActivated
|
|
361
398
|
}]
|
|
@@ -400,6 +437,28 @@ export default {
|
|
|
400
437
|
},
|
|
401
438
|
style: this.panelStyle
|
|
402
439
|
}, inited ? [
|
|
440
|
+
filterable ? h('div', {
|
|
441
|
+
class: 'vxe-select-filter--wrapper'
|
|
442
|
+
}, [
|
|
443
|
+
h('vxe-input', {
|
|
444
|
+
ref: 'inpSearch',
|
|
445
|
+
class: 'vxe-select-filter--input',
|
|
446
|
+
props: {
|
|
447
|
+
value: this.searchValue,
|
|
448
|
+
type: 'text',
|
|
449
|
+
clearable: true,
|
|
450
|
+
placeholder: GlobalConfig.i18n('vxe.select.search'),
|
|
451
|
+
prefixIcon: GlobalConfig.icon.INPUT_SEARCH
|
|
452
|
+
},
|
|
453
|
+
on: {
|
|
454
|
+
modelValue: this.modelSearchEvent,
|
|
455
|
+
focus: this.focusSearchEvent,
|
|
456
|
+
keydown: this.keydownSearchEvent,
|
|
457
|
+
change: this.triggerSearchEvent,
|
|
458
|
+
search: this.triggerSearchEvent
|
|
459
|
+
}
|
|
460
|
+
})
|
|
461
|
+
]) : _e(),
|
|
403
462
|
h('div', {
|
|
404
463
|
ref: 'optWrapper',
|
|
405
464
|
class: 'vxe-select-option--wrapper'
|
|
@@ -441,19 +500,32 @@ export default {
|
|
|
441
500
|
this.refreshOption()
|
|
442
501
|
},
|
|
443
502
|
/**
|
|
444
|
-
*
|
|
503
|
+
* 刷新选项,当选项被搜索、动态显示/隐藏时可能会用到
|
|
445
504
|
*/
|
|
446
505
|
refreshOption () {
|
|
447
|
-
const { isGroup, fullOptionList, fullGroupList } = this
|
|
506
|
+
const { isGroup, fullOptionList, fullGroupList, filterable, filterMethod, searchValue, labelField, groupLabelField } = this
|
|
448
507
|
if (isGroup) {
|
|
449
|
-
|
|
508
|
+
if (filterable && filterMethod) {
|
|
509
|
+
this.visibleGroupList = fullGroupList.filter(group => isOptionVisible(group) && filterMethod({ group, option: null, searchValue }))
|
|
510
|
+
} else if (filterable) {
|
|
511
|
+
this.visibleGroupList = fullGroupList.filter(group => isOptionVisible(group) && (!searchValue || `${group[groupLabelField]}`.indexOf(searchValue) > -1))
|
|
512
|
+
} else {
|
|
513
|
+
this.visibleGroupList = fullGroupList.filter(isOptionVisible)
|
|
514
|
+
}
|
|
450
515
|
} else {
|
|
451
|
-
|
|
516
|
+
if (filterable && filterMethod) {
|
|
517
|
+
this.visibleOptionList = fullOptionList.filter(option => isOptionVisible(option) && filterMethod({ group: null, option, searchValue }))
|
|
518
|
+
} else if (filterable) {
|
|
519
|
+
this.visibleOptionList = fullOptionList.filter(option => isOptionVisible(option) && (!searchValue || `${option[labelField]}`.indexOf(searchValue) > -1))
|
|
520
|
+
} else {
|
|
521
|
+
this.visibleOptionList = fullOptionList.filter(isOptionVisible)
|
|
522
|
+
}
|
|
452
523
|
}
|
|
453
524
|
return this.$nextTick()
|
|
454
525
|
},
|
|
455
526
|
setCurrentOption (option) {
|
|
456
527
|
if (option) {
|
|
528
|
+
this.currentOption = option
|
|
457
529
|
this.currentValue = option[this.valueField]
|
|
458
530
|
}
|
|
459
531
|
},
|
|
@@ -484,6 +556,7 @@ export default {
|
|
|
484
556
|
this.hideOptionPanel()
|
|
485
557
|
},
|
|
486
558
|
clearValueEvent (evnt, selectValue) {
|
|
559
|
+
this.remoteValueList = []
|
|
487
560
|
this.changeEvent(evnt, selectValue)
|
|
488
561
|
this.$emit('clear', { value: selectValue, $event: evnt })
|
|
489
562
|
},
|
|
@@ -503,8 +576,8 @@ export default {
|
|
|
503
576
|
evnt.stopPropagation()
|
|
504
577
|
}
|
|
505
578
|
},
|
|
506
|
-
changeOptionEvent (evnt, selectValue) {
|
|
507
|
-
const { value, multiple } = this
|
|
579
|
+
changeOptionEvent (evnt, selectValue, option) {
|
|
580
|
+
const { value, multiple, remoteValueList } = this
|
|
508
581
|
if (multiple) {
|
|
509
582
|
let multipleValue
|
|
510
583
|
if (value) {
|
|
@@ -516,8 +589,15 @@ export default {
|
|
|
516
589
|
} else {
|
|
517
590
|
multipleValue = [selectValue]
|
|
518
591
|
}
|
|
592
|
+
const remoteItem = remoteValueList.find(item => item.key === selectValue)
|
|
593
|
+
if (remoteItem) {
|
|
594
|
+
remoteItem.result = option
|
|
595
|
+
} else {
|
|
596
|
+
remoteValueList.push({ key: selectValue, result: option })
|
|
597
|
+
}
|
|
519
598
|
this.changeEvent(evnt, multipleValue)
|
|
520
599
|
} else {
|
|
600
|
+
this.remoteValueList = [{ key: selectValue, result: option }]
|
|
521
601
|
this.changeEvent(evnt, selectValue)
|
|
522
602
|
this.hideOptionPanel()
|
|
523
603
|
}
|
|
@@ -544,7 +624,7 @@ export default {
|
|
|
544
624
|
}
|
|
545
625
|
},
|
|
546
626
|
handleGlobalKeydownEvent (evnt) {
|
|
547
|
-
const { visiblePanel, currentValue, clearable, disabled } = this
|
|
627
|
+
const { visiblePanel, currentValue, currentOption, clearable, disabled } = this
|
|
548
628
|
if (!disabled) {
|
|
549
629
|
const keyCode = evnt.keyCode
|
|
550
630
|
const isTab = keyCode === 9
|
|
@@ -563,7 +643,7 @@ export default {
|
|
|
563
643
|
} else if (isEnter) {
|
|
564
644
|
evnt.preventDefault()
|
|
565
645
|
evnt.stopPropagation()
|
|
566
|
-
this.changeOptionEvent(evnt, currentValue)
|
|
646
|
+
this.changeOptionEvent(evnt, currentValue, currentOption)
|
|
567
647
|
} else if (isUpArrow || isDwArrow) {
|
|
568
648
|
evnt.preventDefault()
|
|
569
649
|
let { firstOption, offsetOption } = findOffsetOption(this, currentValue, isUpArrow)
|
|
@@ -594,6 +674,15 @@ export default {
|
|
|
594
674
|
this.panelIndex = UtilTools.nextZIndex()
|
|
595
675
|
}
|
|
596
676
|
},
|
|
677
|
+
handleFocusSearch () {
|
|
678
|
+
if (this.filterable) {
|
|
679
|
+
this.$nextTick(() => {
|
|
680
|
+
if (this.$refs.inpSearch) {
|
|
681
|
+
this.$refs.inpSearch.focus()
|
|
682
|
+
}
|
|
683
|
+
})
|
|
684
|
+
}
|
|
685
|
+
},
|
|
597
686
|
focusEvent () {
|
|
598
687
|
if (!this.disabled) {
|
|
599
688
|
this.isActivated = true
|
|
@@ -602,6 +691,32 @@ export default {
|
|
|
602
691
|
blurEvent () {
|
|
603
692
|
this.isActivated = false
|
|
604
693
|
},
|
|
694
|
+
modelSearchEvent (value) {
|
|
695
|
+
this.searchValue = value
|
|
696
|
+
},
|
|
697
|
+
focusSearchEvent () {
|
|
698
|
+
this.isActivated = true
|
|
699
|
+
},
|
|
700
|
+
keydownSearchEvent (params) {
|
|
701
|
+
const { $event } = params
|
|
702
|
+
const isEnter = hasEventKey($event, EVENT_KEYS.ENTER)
|
|
703
|
+
if (isEnter) {
|
|
704
|
+
$event.preventDefault()
|
|
705
|
+
$event.stopPropagation()
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
triggerSearchEvent: XEUtils.debounce(function () {
|
|
709
|
+
const { remote, remoteMethod, searchValue } = this
|
|
710
|
+
if (remote && remoteMethod) {
|
|
711
|
+
this.searchLoading = true
|
|
712
|
+
Promise.resolve(remoteMethod({ searchValue })).then(() => this.$nextTick()).catch(() => this.$nextTick()).finally(() => {
|
|
713
|
+
this.searchLoading = false
|
|
714
|
+
this.refreshOption()
|
|
715
|
+
})
|
|
716
|
+
} else {
|
|
717
|
+
this.refreshOption()
|
|
718
|
+
}
|
|
719
|
+
}, 350, { trailing: true }),
|
|
605
720
|
isPanelVisible () {
|
|
606
721
|
return this.visiblePanel
|
|
607
722
|
},
|
|
@@ -635,8 +750,9 @@ export default {
|
|
|
635
750
|
}
|
|
636
751
|
},
|
|
637
752
|
showOptionPanel () {
|
|
638
|
-
const { loading, disabled } = this
|
|
753
|
+
const { loading, disabled, filterable } = this
|
|
639
754
|
if (!loading && !disabled) {
|
|
755
|
+
this.searchList = this.option
|
|
640
756
|
clearTimeout(this.hidePanelTimeout)
|
|
641
757
|
if (!this.inited) {
|
|
642
758
|
this.inited = true
|
|
@@ -646,6 +762,9 @@ export default {
|
|
|
646
762
|
}
|
|
647
763
|
this.isActivated = true
|
|
648
764
|
this.animatVisible = true
|
|
765
|
+
if (filterable) {
|
|
766
|
+
this.refreshOption()
|
|
767
|
+
}
|
|
649
768
|
setTimeout(() => {
|
|
650
769
|
const { value, multiple } = this
|
|
651
770
|
const currOption = findOption(this, multiple && value ? value[0] : value)
|
|
@@ -654,15 +773,19 @@ export default {
|
|
|
654
773
|
this.setCurrentOption(currOption)
|
|
655
774
|
this.scrollToOption(currOption)
|
|
656
775
|
}
|
|
776
|
+
this.handleFocusSearch()
|
|
657
777
|
}, 10)
|
|
658
778
|
this.updateZindex()
|
|
659
779
|
this.updatePlacement()
|
|
660
780
|
}
|
|
661
781
|
},
|
|
662
782
|
hideOptionPanel () {
|
|
783
|
+
this.searchValue = ''
|
|
784
|
+
this.searchLoading = false
|
|
663
785
|
this.visiblePanel = false
|
|
664
786
|
this.hidePanelTimeout = setTimeout(() => {
|
|
665
787
|
this.animatVisible = false
|
|
788
|
+
this.searchValue = ''
|
|
666
789
|
}, 350)
|
|
667
790
|
},
|
|
668
791
|
updatePlacement () {
|
|
@@ -205,7 +205,7 @@ function renderColumn (h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, r
|
|
|
205
205
|
}
|
|
206
206
|
// 如果编辑列开启显示状态
|
|
207
207
|
if (!fixedHiddenColumn && editConfig && (editRender || cellRender) && (editOpts.showStatus || editOpts.showUpdateStatus)) {
|
|
208
|
-
isDirty = $xetable.isUpdateByRow(row, column.
|
|
208
|
+
isDirty = $xetable.isUpdateByRow(row, column.field)
|
|
209
209
|
}
|
|
210
210
|
const tdVNs = []
|
|
211
211
|
if (fixedHiddenColumn && (allColumnOverflow ? isAllOverflow : allColumnOverflow)) {
|
|
@@ -478,7 +478,7 @@ export const Cell = {
|
|
|
478
478
|
renderCheckboxCellByProp (h, params) {
|
|
479
479
|
const { $table, row, column, isHidden } = params
|
|
480
480
|
const { treeConfig, treeIndeterminates } = $table
|
|
481
|
-
const { labelField, checkField
|
|
481
|
+
const { labelField, checkField, halfField, checkMethod, visibleMethod } = $table.checkboxOpts
|
|
482
482
|
const { slots } = column
|
|
483
483
|
const defaultSlot = slots ? slots.default : null
|
|
484
484
|
const checkboxSlot = slots ? slots.checkbox : null
|
|
@@ -488,7 +488,7 @@ export const Cell = {
|
|
|
488
488
|
let isDisabled = !!checkMethod
|
|
489
489
|
let on
|
|
490
490
|
if (!isHidden) {
|
|
491
|
-
isChecked = XEUtils.get(row,
|
|
491
|
+
isChecked = XEUtils.get(row, checkField)
|
|
492
492
|
on = {
|
|
493
493
|
click (evnt) {
|
|
494
494
|
if (!isDisabled && isVisible) {
|
|
@@ -712,7 +712,7 @@ export const Cell = {
|
|
|
712
712
|
const { sortable, remoteSort, filters, editRender } = column
|
|
713
713
|
let isRequired = false
|
|
714
714
|
if (editRules) {
|
|
715
|
-
const columnRules = XEUtils.get(editRules,
|
|
715
|
+
const columnRules = XEUtils.get(editRules, column.field)
|
|
716
716
|
if (columnRules) {
|
|
717
717
|
isRequired = columnRules.some(rule => rule.required)
|
|
718
718
|
}
|