From 5178480d13cf519d8b714c2121055d6dc5c47d0f Mon Sep 17 00:00:00 2001 From: wangxueliang Date: Thu, 17 Oct 2019 13:42:03 +0800 Subject: [PATCH] fix: table demo & update snapshots --- components/table/demo/custom-filter-panel.md | 6 +++--- components/upload/Upload.jsx | 2 +- .../__tests__/__snapshots__/uploadlist.test.js.snap | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/table/demo/custom-filter-panel.md b/components/table/demo/custom-filter-panel.md index ddbc46c70..68d3d3fe3 100644 --- a/components/table/demo/custom-filter-panel.md +++ b/components/table/demo/custom-filter-panel.md @@ -109,7 +109,7 @@ Implement a customized column search example via `filterDropdown`. filterIcon: 'filterIcon', customRender: 'customRender', }, - onFilter: (value, record) => record.name.toLowerCase().includes(value.toLowerCase()), + onFilter: (value, record) => record.name.toString().toLowerCase().includes(value.toLowerCase()), onFilterDropdownVisibleChange: visible => { if (visible) { setTimeout(() => { @@ -127,7 +127,7 @@ Implement a customized column search example via `filterDropdown`. filterIcon: 'filterIcon', customRender: 'customRender', }, - onFilter: (value, record) => record.age.toLowerCase().includes(value.toLowerCase()), + onFilter: (value, record) => record.age.toString().toLowerCase().includes(value.toLowerCase()), onFilterDropdownVisibleChange: visible => { if (visible) { setTimeout(() => { @@ -145,7 +145,7 @@ Implement a customized column search example via `filterDropdown`. filterIcon: 'filterIcon', customRender: 'customRender', }, - onFilter: (value, record) => record.address.toLowerCase().includes(value.toLowerCase()), + onFilter: (value, record) => record.address.toString().toLowerCase().includes(value.toLowerCase()), onFilterDropdownVisibleChange: visible => { if (visible) { setTimeout(() => { diff --git a/components/upload/Upload.jsx b/components/upload/Upload.jsx index a8527b76c..22653341e 100644 --- a/components/upload/Upload.jsx +++ b/components/upload/Upload.jsx @@ -233,6 +233,7 @@ export default { const vcUploadProps = { props: { ...this.$props, + prefixCls, beforeUpload: this.reBeforeUpload, }, on: { @@ -244,7 +245,6 @@ export default { reject: this.onReject, }, ref: 'uploadRef', - class: `${prefixCls}-btn`, attrs: this.$attrs, }; diff --git a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap index c10197078..f0fb717ce 100644 --- a/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap +++ b/components/upload/__tests__/__snapshots__/uploadlist.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Upload List handle error 1`] = ` -
foo.png
foo.png
@@ -9,7 +9,7 @@ exports[`Upload List handle error 1`] = `
-
+
@@ -20,7 +20,7 @@ exports[`Upload List handle error 1`] = ` `; exports[`Upload List handle error 2`] = ` -
foo.png
foo.png
@@ -28,7 +28,7 @@ exports[`Upload List handle error 2`] = `
-
+
@@ -38,7 +38,7 @@ exports[`Upload List handle error 2`] = ` `; -exports[`Upload List should be uploading when upload a file 1`] = `
`; +exports[`Upload List should be uploading when upload a file 1`] = `
`; exports[`Upload List should non-image format file preview 1`] = `