From 252fbf526dccea12bac95d86b308c6e89b6edd0a Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Thu, 19 Nov 2020 22:26:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/api/form.js | 2 +- examples/views/input/Input.vue | 2 +- package.json | 2 +- packages/input/src/input.js | 7 +++---- types/input.d.ts | 4 ---- types/table.d.ts | 2 +- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/examples/api/form.js b/examples/api/form.js index d6484b4c7..ff5875cbd 100644 --- a/examples/api/form.js +++ b/examples/api/form.js @@ -190,7 +190,7 @@ const apis = [ }, { name: 'prevent-submit', - desc: '禁用默认提交方式,禁用后配合 validate() 方法可以更加自由的控制提交逻辑', + desc: '是否禁用默认的回车提交方式,禁用后配合 validate() 方法可以更加自由的控制提交逻辑', version: '', type: 'boolean', enum: '', diff --git a/examples/views/input/Input.vue b/examples/views/input/Input.vue index cfa0911c7..d421447f6 100644 --- a/examples/views/input/Input.vue +++ b/examples/views/input/Input.vue @@ -116,7 +116,7 @@ export default { value301: '', value302: '', value303: '', - value400: 'fdgfdgfdg09', + value400: '2018-01-09', value401: '', value402: '', value403: '', diff --git a/package.json b/package.json index 07bc822c6..733e35082 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "vxe-table-plugin-export-pdf": "^1.9.0", "vxe-table-plugin-export-xlsx": "^2.0.6", "vxe-table-plugin-iview": "^1.10.0", - "vxe-table-plugin-menus": "^1.5.0", + "vxe-table-plugin-menus": "^1.5.1", "vxe-table-plugin-shortcut-key": "^1.4.0", "vxe-table-plugin-virtual-tree": "0.5.6", "xe-ajax": "^4.0.5", diff --git a/packages/input/src/input.js b/packages/input/src/input.js index 87d51f7e2..b489b052b 100644 --- a/packages/input/src/input.js +++ b/packages/input/src/input.js @@ -626,7 +626,6 @@ export default { maxDate: { type: [String, Number, Date], default: () => GlobalConfig.input.maxDate }, startWeek: { type: Number, default: () => GlobalConfig.input.startWeek }, labelFormat: { type: String, default: () => GlobalConfig.input.labelFormat }, - parseFormat: { type: String, default: () => GlobalConfig.input.parseFormat }, valueFormat: { type: String, default: () => GlobalConfig.input.valueFormat }, editable: { type: Boolean, default: true }, festivalMethod: { type: Function, default: () => GlobalConfig.input.festivalMethod }, @@ -1471,14 +1470,14 @@ export default { } }, dateParseValue (date) { - const { type, dateLabelFormat, parseFormat } = this + const { type, dateLabelFormat, valueFormat } = this let dValue = null let dLabel = '' if (date) { if (type === 'time') { - dValue = toStringTimeDate(date, parseFormat) + dValue = toStringTimeDate(date, valueFormat) } else { - dValue = XEUtils.toStringDate(date, parseFormat) + dValue = XEUtils.toStringDate(date, valueFormat) } } if (XEUtils.isValidDate(dValue)) { diff --git a/types/input.d.ts b/types/input.d.ts index 110d3b838..0f4344382 100644 --- a/types/input.d.ts +++ b/types/input.d.ts @@ -60,10 +60,6 @@ export declare class Input extends VXETableComponent { * 只对 type=date|week|month|year 有效,输入框中显示的日期格式 */ labelFormat?: string; - /** - * 只对 type=date|week|month|year 有效,绑定值的解析格式,如果是值为字符串时可能会用到 - */ - parseFormat?: string; /** * 只对 type=date|week|month|year 有效,绑定值的返回格式,默认返回 Date 类型,如果指定格式则返回字符串 */ diff --git a/types/table.d.ts b/types/table.d.ts index 50a3f0ee2..39b40b363 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -801,7 +801,7 @@ export declare class Table extends VXETableComponent { * @param records 新数据 * @param row 指定行 */ - insertAt(records: RecordInfo | RecordInfo[], row: RowInfo | number | null): Promise<{ row: RowInfo, rows: RowInfo[] }>; + insertAt(records: RecordInfo | RecordInfo[], row: RowInfo | -1 | null): Promise<{ row: RowInfo, rows: RowInfo[] }>; /** * 删除指定行数据,指定 row 或 [row, ...] 删除多条数据,如果为空则删除所有数据 * @param rows 指定行