diff --git a/examples/docs/en-US/upload.md b/examples/docs/en-US/upload.md index 9ed66c7f9..3a4befe6f 100644 --- a/examples/docs/en-US/upload.md +++ b/examples/docs/en-US/upload.md @@ -351,7 +351,7 @@ data | additions options of request | object | — | — name | key name for uploaded file | string | — | file with-credentials | whether cookies are sent | boolean | — |false show-upload-list | whether to show the uploaded file list | boolean | — | true -type | type of Upload | string | select/drag | select + drag | whether to activate drag and drop mode | boolean | — | false accept | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept), will not work when `thumbnail-mode` is `true` | string | — | — on-preview | hook function when clicking the uploaded files | function(file) | — | — on-remove | hook function when files are removed | function(file, fileList) | — | — diff --git a/examples/docs/zh-CN/upload.md b/examples/docs/zh-CN/upload.md index 20d863678..05ca46974 100644 --- a/examples/docs/zh-CN/upload.md +++ b/examples/docs/zh-CN/upload.md @@ -401,7 +401,7 @@ | name | 可选参数, 上传的文件字段名 | string | — | file | | with-credentials | 支持发送 cookie 凭证信息 | boolean | — | false | | show-file-list | 是否显示已上传文件列表 | boolean | — | true | -| type | 上传控件类型 | string | select,drag | select | +| drag | 是否启用拖拽上传 | boolean | — | false | | accept | 可选参数, 接受上传的[文件类型](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept)(thumbnail-mode 模式下此参数无效)| string | — | — | | on-preview | 可选参数, 点击已上传的文件链接时的钩子, 可以通过 file.response 拿到服务端返回数据 | function(file) | — | — | | on-remove | 可选参数, 文件列表移除文件时的钩子 | function(file, fileList) | — | — | diff --git a/packages/table/src/table-header.js b/packages/table/src/table-header.js index 48d395cd2..db5873028 100644 --- a/packages/table/src/table-header.js +++ b/packages/table/src/table-header.js @@ -111,8 +111,8 @@ export default { { column.sortable ? this.handleSortClick($event, column) }> - - + this.handleSortClick($event, column, 'ascending') }> + this.handleSortClick($event, column, 'descending') }> : '' } @@ -383,9 +383,9 @@ export default { return !order ? 'ascending' : order === 'ascending' ? 'descending' : null; }, - handleSortClick(event, column) { + handleSortClick(event, column, givenOrder) { event.stopPropagation(); - let order = this.toggleOrder(column.order); + let order = givenOrder || this.toggleOrder(column.order); let target = event.target; while (target && target.tagName !== 'TH') {