Merge branch 'master' into feat-1.4.0
# Conflicts: # components/table/interface.js # components/vc-upload/demo/simple.jsxpull/1040/head
						commit
						adbd82b910
					
				|  | @ -7,3 +7,4 @@ es/ | |||
| lib/ | ||||
| _site/ | ||||
| dist/ | ||||
| package.json | ||||
|  |  | |||
|  | @ -0,0 +1,8 @@ | |||
| # These are supported funding model platforms | ||||
| 
 | ||||
| github: [tangjinzhou] | ||||
| patreon: # Replace with a single Patreon username | ||||
| open_collective: ant-design-vue | ||||
| ko_fi: # Replace with a single Ko-fi username | ||||
| tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||||
| custom: # Replace with a single custom sponsorship URL | ||||
|  | @ -10,6 +10,24 @@ | |||
| 
 | ||||
| --- | ||||
| 
 | ||||
| ## 1.3.10 | ||||
| `2019-06-11` | ||||
| - ๐ Remove useless `module.export` of package. [#850](https://github.com/vueComponent/ant-design-vue/issues/850) | ||||
| 
 | ||||
| ## 1.3.9 | ||||
| `2019-05-26` | ||||
| - ๐ Fix `TreeSelect` without `dataRef` [#712](https://github.com/vueComponent/ant-design-vue/issues/712) | ||||
| - ๐ `Tooltip` add `destroyTooltipOnHide` to identify whether to destroy tooltip after hiding [#727](https://github.com/vueComponent/ant-design-vue/issues/727) | ||||
| - ๐ Fix `Avatar` does not update the problem when setting `src` dynamically [#731](https://github.com/vueComponent/ant-design-vue/issues/731) | ||||
| - ๐ Fix `LocaleProvider` change `moment` language does not work [28b7a6](https://github.com/vueComponent/ant-design-vue/commit/28b7a68dc48a0a994e98063d462b99380e3ee547) | ||||
| - ๐ `Modal.confirm` add `closable` configuration [#798](https://github.com/vueComponent/ant-design-vue/pull/798) | ||||
| - ๐ Fixed a problem when `Select` custom `dropdownRender` was not automatically closed [#644](https://github.com/vueComponent/ant-design-vue/issues/644) | ||||
| - ๐ Fix the problem of removing Dom error under ie9, no need to introduce polyfill separately [#705](https://github.com/vueComponent/ant-design-vue/issues/705) | ||||
| - ๐ Fix `Input.Search` repeat mount id problem [#726](https://github.com/vueComponent/ant-design-vue/issues/726) | ||||
| - ๐ Fix `Table` does not work when customizing expandIcon using function form [#751](https://github.com/vueComponent/ant-design-vue/issues/751) | ||||
| - ๐ Fix `Icon` `extraCommonProps` property does not work [#737](https://github.com/vueComponent/ant-design-vue/issues/737) | ||||
| - ๐ Fix `DirectoryTree` expandAction="doubleclick" does not work [#745](https://github.com/vueComponent/ant-design-vue/issues/745) | ||||
| 
 | ||||
| ## 1.3.8 | ||||
| `2019-04-04` | ||||
| - ๐ Fix `Table` unclickable problem under IE [#504](https://github.com/vueComponent/ant-design-vue/issues/504) | ||||
|  |  | |||
|  | @ -10,6 +10,24 @@ | |||
| 
 | ||||
| --- | ||||
| 
 | ||||
| ## 1.3.10 | ||||
| `2019-06-11` | ||||
| - ๐ ็งป้คๆๅ
ๅๅคไฝ็ `module.export` [#850](https://github.com/vueComponent/ant-design-vue/issues/850) | ||||
| 
 | ||||
| ## 1.3.9 | ||||
| `2019-05-26` | ||||
| - ๐ ไฟฎๅค `TreeSelect` ๆฒกๆ `dataRef` ็้ฎ้ข [#712](https://github.com/vueComponent/ant-design-vue/issues/712) | ||||
| - ๐ `Tooltip` ๆทปๅ  `destroyTooltipOnHide` ็จไบๆ ่ฏ้่ๅๆฏๅฆ้ๆฏtooltip [#727](https://github.com/vueComponent/ant-design-vue/issues/727) | ||||
| - ๐ ไฟฎๅค `Avatar` ๅจๆ่ฎพ็ฝฎ src ๆถไธๆดๆฐ้ฎ้ข [#731](https://github.com/vueComponent/ant-design-vue/issues/731) | ||||
| - ๐ ไฟฎๅค `LocaleProvider` ๆดๆน `moment` ่ฏญ่จไธ็ๆ้ฎ้ข [28b7a6](https://github.com/vueComponent/ant-design-vue/commit/28b7a68dc48a0a994e98063d462b99380e3ee547) | ||||
| - ๐ `Modal.confirm` ๆฐๅข `closable` ้
็ฝฎ [#798](https://github.com/vueComponent/ant-design-vue/pull/798) | ||||
| - ๐ ไฟฎๅค `Select` ่ชๅฎไน `dropdownRender` ๆถ๏ผๆฒก่ฝ่ชๅจๅ
ณ้ญ็้ฎ้ข [#644](https://github.com/vueComponent/ant-design-vue/issues/644) | ||||
| - ๐ ไฟฎๅคๅจ ie9 ไธ็งป้ค Dom ๆฅ้้ฎ้ข๏ผๆ ้ๅ็ฌๅผๅ
ฅ polyfill [#705](https://github.com/vueComponent/ant-design-vue/issues/705) | ||||
| - ๐ ไฟฎๅค `Input.Search` ้ๅคๆ่ฝฝ id ้ฎ้ข [#726](https://github.com/vueComponent/ant-design-vue/issues/726) | ||||
| - ๐ ไฟฎๅค `Table` ไฝฟ็จๅฝๆฐๅฝขๅผ่ชๅฎไน expandIcon ๆถไธ็ๆ้ฎ้ข [#751](https://github.com/vueComponent/ant-design-vue/issues/751) | ||||
| - ๐ ไฟฎๅค `Icon` extraCommonProps ๅฑๆงไธ็ๆ้ฎ้ข [#737](https://github.com/vueComponent/ant-design-vue/issues/737) | ||||
| - ๐ ไฟฎๅค `DirectoryTree` expandAction="doubleclick" ไธ็ๆ้ฎ้ข [#745](https://github.com/vueComponent/ant-design-vue/issues/745) | ||||
| 
 | ||||
| ## 1.3.8 | ||||
| `2019-04-04` | ||||
| - ๐ ไฟฎๅค `Table` ๅจ IE ไธไธๅฏ็นๅป้ฎ้ข [#504](https://github.com/vueComponent/ant-design-vue/issues/504) | ||||
|  |  | |||
|  | @ -74,8 +74,6 @@ function babelify(js, modules) { | |||
|   delete babelConfig.cacheDirectory; | ||||
|   if (modules === false) { | ||||
|     babelConfig.plugins.push(replaceLib); | ||||
|   } else { | ||||
|     babelConfig.plugins.push(require.resolve('babel-plugin-add-module-exports')); | ||||
|   } | ||||
|   let stream = js.pipe(babel(babelConfig)).pipe( | ||||
|     through2.obj(function z(file, encoding, next) { | ||||
|  |  | |||
|  | @ -2,10 +2,5 @@ const rucksack = require('rucksack-css'); | |||
| const autoprefixer = require('autoprefixer'); | ||||
| 
 | ||||
| module.exports = { | ||||
|   plugins: [ | ||||
|     rucksack(), | ||||
|     autoprefixer({ | ||||
|       browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 9', 'iOS >= 8', 'Android >= 4'], | ||||
|     }), | ||||
|   ], | ||||
|   plugins: [rucksack(), autoprefixer()], | ||||
| }; | ||||
|  |  | |||
|  | @ -26,7 +26,6 @@ Add or remove form items dynamically. | |||
|           `names[${k}]`, | ||||
|           { | ||||
|             validateTrigger: ['change', 'blur'], | ||||
|             preserve: true, | ||||
|             rules: [{ | ||||
|               required: true, | ||||
|               whitespace: true, | ||||
|  |  | |||
|  | @ -151,7 +151,7 @@ validateFields(['field1', 'field2'], options, (errors, values) => { | |||
| | --- | --- | --- | --- | | ||||
| | id | ๅฟ
ๅกซ่พๅ
ฅๆงไปถๅฏไธๆ ๅฟใๆฏๆๅตๅฅๅผ็ๅๆณใ | string |  | | ||||
| | options.getValueFromEvent | ๅฏไปฅๆ onChange ็ๅๆฐ๏ผๅฆ event๏ผ่ฝฌๅไธบๆงไปถ็ๅผ | function(..args) | [reference](https://github.com/react-component/form#option-object) | | ||||
| | options.initialValue | ๅญ่็น็ๅๅงๅผ๏ผ็ฑปๅใๅฏ้ๅผๅ็ฑๅญ่็นๅณๅฎ(ๆณจๆ๏ผ็ฑไบๅ
้จๆ ก้ชๆถไฝฟ็จ `===` ๅคๆญๆฏๅฆๅๅ๏ผๅปบ่ฎฎไฝฟ็จๅ้็ผๅญๆ้่ฎพ็ฝฎ็ๅผ่้็ดๆฅไฝฟ็จๅญ้ข้)) |  |  | | ||||
| | options.initialValue | ๅญ่็น็ๅๅงๅผ๏ผ็ฑปๅใๅฏ้ๅผๅ็ฑๅญ่็นๅณๅฎ(ๆณจๆ๏ผ็ฑไบๅ
้จๆ ก้ชๆถไฝฟ็จ `===` ๅคๆญๆฏๅฆๅๅ๏ผๅปบ่ฎฎไฝฟ็จๅ้็ผๅญๆ้่ฎพ็ฝฎ็ๅผ่้็ดๆฅไฝฟ็จๅญ้ข้) |  |  | | ||||
| | options.normalize | ่ฝฌๆข้ป่ฎค็ value ็ปๆงไปถ๏ผ[ไธไธช้ๆฉๅ
จ้จ็ไพๅญ](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - | | ||||
| | options.preserve | ๅณไพฟๅญๆฎตไธๅไฝฟ็จ๏ผไนไฟ็่ฏฅๅญๆฎต็ๅผ | boolean | false | | ||||
| | options.rules | ๆ ก้ช่งๅ๏ผๅ่ไธๆนๆๆกฃ | object\[] |  | | ||||
|  |  | |||
|  | @ -1,9 +1,10 @@ | |||
| import Icon from './index'; | ||||
| import { mergeProps } from '../_util/props-util'; | ||||
| 
 | ||||
| const customCache = new Set(); | ||||
| 
 | ||||
| export default function create(options) { | ||||
|   const { scriptUrl } = options; | ||||
|   const { scriptUrl, extraCommonProps = {} } = options; | ||||
| 
 | ||||
|   /** | ||||
|    * DOM API required. | ||||
|  | @ -43,7 +44,8 @@ export default function create(options) { | |||
|       if (children) { | ||||
|         content = children; | ||||
|       } | ||||
|       return <Icon {...{ ...data, props: restProps, on: listeners }}>{content}</Icon>; | ||||
|       const iconProps = mergeProps(extraCommonProps, data, { props: restProps, on: listeners }); | ||||
|       return <Icon {...iconProps}>{content}</Icon>; | ||||
|     }, | ||||
|   }; | ||||
|   return Iconfont; | ||||
|  |  | |||
|  | @ -73,7 +73,7 @@ The following options are available: | |||
| | Property | Description | Type | Default | | ||||
| | --- | --- | --- | --- | | ||||
| | scriptUrl | The URL generated by [iconfont.cn](http://iconfont.cn/) project. | string | - | | ||||
| | extraCommonProps | Define extra properties to the component | `{ [key: string]: any }` | {} | | ||||
| | extraCommonProps | Define extra properties to the component | `{ class, attrs, props, on, style }` | {} | | ||||
| 
 | ||||
| The property `scriptUrl` should be set to import the SVG sprite symbols. | ||||
| 
 | ||||
|  |  | |||
|  | @ -71,7 +71,7 @@ new Vue({ | |||
| | ๅๆฐ | ่ฏดๆ | ็ฑปๅ | ้ป่ฎคๅผ | | ||||
| | --- | --- | --- | --- | | ||||
| | scriptUrl | [iconfont.cn](http://iconfont.cn/) ้กน็ฎๅจ็บฟ็ๆ็ `js` ๅฐๅ | string | - | | ||||
| | extraCommonProps | ็ปๆๆ็ `svg` ๅพๆ  `<Icon />` ็ปไปถ่ฎพ็ฝฎ้ขๅค็ๅฑๆง | `{ [key: string]: any }` | {} | | ||||
| | extraCommonProps | ็ปๆๆ็ `svg` ๅพๆ  `<Icon />` ็ปไปถ่ฎพ็ฝฎ้ขๅค็ๅฑๆง | `{ class, attrs, props, on, style }` | {} | | ||||
| 
 | ||||
| ๅจ `scriptUrl` ้ฝ่ฎพ็ฝฎๆๆ็ๆ
ๅตไธ๏ผ็ปไปถๅจๆธฒๆๅไผ่ชๅจๅผๅ
ฅ [iconfont.cn](http://iconfont.cn/) ้กน็ฎไธญ็ๅพๆ ็ฌฆๅท้๏ผๆ ้ๆๅจๅผๅ
ฅใ | ||||
| 
 | ||||
|  |  | |||
|  | @ -10,6 +10,7 @@ import { ConfigConsumerProps } from '../config-provider'; | |||
| 
 | ||||
| export default { | ||||
|   name: 'AInputSearch', | ||||
|   inheritAttrs: false, | ||||
|   model: { | ||||
|     prop: 'value', | ||||
|     event: 'change.value', | ||||
|  |  | |||
|  | @ -128,6 +128,7 @@ export const TableProps = { | |||
|   childrenColumnName: PropTypes.oneOfType([PropTypes.array, PropTypes.string]), | ||||
|   bodyStyle: PropTypes.any, | ||||
|   sortDirections: PropTypes.array, | ||||
|   expandIcon: PropTypes.func, | ||||
|   // className?: PropTypes.string,
 | ||||
|   // style?: React.CSSProperties;
 | ||||
|   // children?: React.ReactNode;
 | ||||
|  |  | |||
|  | @ -97,7 +97,7 @@ describe('Upload List', () => { | |||
|   it('should be uploading when upload a file', done => { | ||||
|     const props = { | ||||
|       propsData: { | ||||
|         action: 'http://jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         customRequest: successRequest, | ||||
|       }, | ||||
|       listeners: { | ||||
|  | @ -133,7 +133,7 @@ describe('Upload List', () => { | |||
|   it('handle error', done => { | ||||
|     const props = { | ||||
|       propsData: { | ||||
|         action: 'http://jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         customRequest: errorRequest, | ||||
|       }, | ||||
|       listeners: { | ||||
|  | @ -166,7 +166,7 @@ describe('Upload List', () => { | |||
|     const handleChange = jest.fn(); | ||||
|     const props = { | ||||
|       propsData: { | ||||
|         action: 'http://jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         listType: 'picture', | ||||
|         defaultFileList: fileList, | ||||
|         beforeUpload: () => false, | ||||
|  |  | |||
|  | @ -17,7 +17,7 @@ The return value of function `beforeUpload` can be a Promise to check asynchrono | |||
|     listType="picture-card" | ||||
|     class="avatar-uploader" | ||||
|     :showUploadList="false" | ||||
|     action="//jsonplaceholder.typicode.com/posts/" | ||||
|     action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||||
|     :beforeUpload="beforeUpload" | ||||
|     @change="handleChange" | ||||
|   > | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ Classic mode. File selection dialog pops up when upload button is clicked. | |||
| 
 | ||||
| ```html | ||||
| <template> | ||||
|   <a-upload name="file" :multiple="true" action="//jsonplaceholder.typicode.com/posts/" :headers="headers" @change="handleChange"> | ||||
|   <a-upload name="file" :multiple="true" action="https://www.mocky.io/v2/5cc8019d300000980a055e76" :headers="headers" @change="handleChange"> | ||||
|     <a-button> | ||||
|       <a-icon type="upload" /> Click to Upload | ||||
|     </a-button> | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ Use `defaultFileList` for uploaded files when page init. | |||
| 
 | ||||
| ```html | ||||
| <template> | ||||
|   <a-upload action="//jsonplaceholder.typicode.com/posts/" :defaultFileList="defaultFileList"> | ||||
|   <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" :defaultFileList="defaultFileList"> | ||||
|     <a-button> | ||||
|       <a-icon type="upload" /> Upload | ||||
|     </a-button> | ||||
|  |  | |||
|  | @ -10,7 +10,7 @@ You can select and upload a whole directory. | |||
| 
 | ||||
| ```html | ||||
| <template> | ||||
|   <a-upload action="//jsonplaceholder.typicode.com/posts/" directory> | ||||
|   <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" directory> | ||||
|     <a-button> | ||||
|       <a-icon type="upload" /> Upload Directory | ||||
|     </a-button> | ||||
|  |  | |||
|  | @ -11,7 +11,7 @@ Classic mode. File selection dialog pops up when upload button is clicked. | |||
| 
 | ||||
| ```html | ||||
| <template> | ||||
|   <a-upload-dragger name="file" :multiple="true" action="//jsonplaceholder.typicode.com/posts/" @change="handleChange"> | ||||
|   <a-upload-dragger name="file" :multiple="true" action="https://www.mocky.io/v2/5cc8019d300000980a055e76" @change="handleChange"> | ||||
|     <p class="ant-upload-drag-icon"> | ||||
|       <a-icon type="inbox" /> | ||||
|     </p> | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ You can gain full control over filelist by configuring `fileList`. You can accom | |||
| 
 | ||||
| ```html | ||||
| <template> | ||||
|   <a-upload action="//jsonplaceholder.typicode.com/posts/" :multiple="true" :fileList="fileList" @change="handleChange"> | ||||
|   <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" :multiple="true" :fileList="fileList" @change="handleChange"> | ||||
|     <a-button> | ||||
|       <a-icon type="upload" /> Upload | ||||
|     </a-button> | ||||
|  | @ -36,7 +36,7 @@ export default { | |||
|   }, | ||||
|   methods: { | ||||
|     handleChange(info) { | ||||
|       let fileList = info.fileList; | ||||
|       let fileList = [...info.fileList]; | ||||
| 
 | ||||
|       // 1. Limit the number of uploaded files | ||||
|       //    Only to show two recent uploaded files, and old ones will be replaced by the new | ||||
|  | @ -51,14 +51,6 @@ export default { | |||
|         return file; | ||||
|       }); | ||||
| 
 | ||||
|       // 3. filter successfully uploaded files according to response from server | ||||
|       fileList = fileList.filter((file) => { | ||||
|         if (file.response) { | ||||
|           return file.response.status === 'success'; | ||||
|         } | ||||
|         return false; | ||||
|       }); | ||||
| 
 | ||||
|       this.fileList = fileList | ||||
|     }, | ||||
|   }, | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ After users upload picture, the thumbnail will be shown in list. The upload butt | |||
| <template> | ||||
|   <div class="clearfix"> | ||||
|     <a-upload | ||||
|       action="//jsonplaceholder.typicode.com/posts/" | ||||
|       action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||||
|       listType="picture-card" | ||||
|       :fileList="fileList" | ||||
|       @preview="handlePreview" | ||||
|  |  | |||
|  | @ -12,7 +12,7 @@ If uploaded file is a picture, the thumbnail can be shown. `IE8/9` do not suppor | |||
| <template> | ||||
|   <div> | ||||
|     <a-upload | ||||
|       action="//jsonplaceholder.typicode.com/posts/" | ||||
|       action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||||
|       listType="picture" | ||||
|       :defaultFileList="fileList" | ||||
|     > | ||||
|  | @ -23,7 +23,7 @@ If uploaded file is a picture, the thumbnail can be shown. `IE8/9` do not suppor | |||
|     <br /> | ||||
|     <br /> | ||||
|     <a-upload | ||||
|       action="//jsonplaceholder.typicode.com/posts/" | ||||
|       action="https://www.mocky.io/v2/5cc8019d300000980a055e76" | ||||
|       listType="picture" | ||||
|       :defaultFileList="fileList" | ||||
|       class="upload-list-inline" | ||||
|  |  | |||
|  | @ -61,7 +61,7 @@ export default { | |||
| 
 | ||||
|       // You can use any AJAX library you like | ||||
|       reqwest({ | ||||
|         url: '//jsonplaceholder.typicode.com/posts/', | ||||
|         url: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         method: 'post', | ||||
|         processData: false, | ||||
|         data: formData, | ||||
|  |  | |||
|  | @ -1486,9 +1486,7 @@ const Select = { | |||
|       this.$emit('focus'); | ||||
|     }, | ||||
|     selectionRefBlur() { | ||||
|       this._focused = false; | ||||
|       this.updateFocusClassName(); | ||||
|       this.$emit('blur'); | ||||
|       this.inputBlur(); | ||||
|     }, | ||||
|   }, | ||||
| 
 | ||||
|  |  | |||
|  | @ -435,7 +435,7 @@ const TreeNode = { | |||
|           onMouseleave={this.onMouseLeave} | ||||
|           onContextmenu={this.onContextMenu} | ||||
|           onClick={this.onSelectorClick} | ||||
|           onDoubleclick={this.onSelectorDoubleClick} | ||||
|           onDblclick={this.onSelectorDoubleClick} | ||||
|           onDragstart={draggable ? this.onDragStart : noop} | ||||
|         > | ||||
|           {$icon} | ||||
|  |  | |||
|  | @ -49,7 +49,11 @@ export default { | |||
|     }); | ||||
|   }, | ||||
|   beforeDestroy() { | ||||
|     this.$el.remove(); | ||||
|     if (this.$el.parentNode) { | ||||
|       this.$el.parentNode.removeChild(this.$el); | ||||
|     } else if (this.$el.remove) { | ||||
|       this.$el.remove(); | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     onAlign(popupDomNode, align) { | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ export default { | |||
|         action: () => { | ||||
|           return new Promise(resolve => { | ||||
|             setTimeout(() => { | ||||
|               resolve('//jsonplaceholder.typicode.com/posts/'); | ||||
|               resolve('https://www.mocky.io/v2/5cc8019d300000980a055e76'); | ||||
|             }, 2000); | ||||
|           }); | ||||
|         }, | ||||
|  | @ -23,7 +23,9 @@ export default { | |||
|           console.log('error', err); | ||||
|         }, | ||||
|       }, | ||||
|       style: { margin: '100px' }, | ||||
|       style: { | ||||
|         margin: '100px', | ||||
|       }, | ||||
|     }; | ||||
|     return ( | ||||
|       <Upload {...uploaderProps}> | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ export default { | |||
|   render() { | ||||
|     const uploaderProps = { | ||||
|       props: { | ||||
|         action: '//jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         multiple: true, | ||||
|         beforeUpload(file, fileList) { | ||||
|           console.log(file, fileList); | ||||
|  |  | |||
|  | @ -5,9 +5,12 @@ export default { | |||
|   render() { | ||||
|     const uploaderProps = { | ||||
|       props: { | ||||
|         action: '//jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         multiple: false, | ||||
|         data: { a: 1, b: 2 }, | ||||
|         data: { | ||||
|           a: 1, | ||||
|           b: 2, | ||||
|         }, | ||||
|         headers: { | ||||
|           Authorization: '$prefix $token', | ||||
|         }, | ||||
|  | @ -36,7 +39,12 @@ export default { | |||
|               withCredentials, | ||||
|               headers, | ||||
|               onUploadProgress: ({ total, loaded }) => { | ||||
|                 onProgress({ percent: Math.round((loaded / total) * 100).toFixed(2) }, file); | ||||
|                 onProgress( | ||||
|                   { | ||||
|                     percent: Math.round((loaded / total) * 100).toFixed(2), | ||||
|                   }, | ||||
|                   file, | ||||
|                 ); | ||||
|               }, | ||||
|             }) | ||||
|             .then(({ data: response }) => { | ||||
|  |  | |||
|  | @ -4,8 +4,11 @@ export default { | |||
|   render() { | ||||
|     const uploaderProps = { | ||||
|       props: { | ||||
|         action: '//jsonplaceholder.typicode.com/posts/', | ||||
|         data: { a: 1, b: 2 }, | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         data: { | ||||
|           a: 1, | ||||
|           b: 2, | ||||
|         }, | ||||
|         headers: { | ||||
|           Authorization: 'xxxxxxx', | ||||
|         }, | ||||
|  | @ -28,7 +31,9 @@ export default { | |||
|           console.log('error', err); | ||||
|         }, | ||||
|       }, | ||||
|       style: { margin: '100px' }, | ||||
|       style: { | ||||
|         margin: '100px', | ||||
|       }, | ||||
|     }; | ||||
|     return ( | ||||
|       <Upload {...uploaderProps}> | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ export default { | |||
|   render() { | ||||
|     const uploaderProps = { | ||||
|       props: { | ||||
|         action: '//jsonplaceholder.typicode.com/posts/', | ||||
|         action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|         type: 'drag', | ||||
|         accept: '.png', | ||||
|         beforeUpload(file) { | ||||
|  | @ -29,7 +29,12 @@ export default { | |||
|           alert('click'); | ||||
|         }, | ||||
|       }, | ||||
|       style: { display: 'inline-block', width: '200px', height: '200px', background: '#eee' }, | ||||
|       style: { | ||||
|         display: 'inline-block', | ||||
|         width: '200px', | ||||
|         height: '200px', | ||||
|         background: '#eee', | ||||
|       }, | ||||
|     }; | ||||
|     return <Upload {...uploaderProps} />; | ||||
|   }, | ||||
|  |  | |||
|  | @ -2,9 +2,7 @@ import Upload from '../index'; | |||
| 
 | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       destroyed: false, | ||||
|     }; | ||||
|     return { destroyed: false }; | ||||
|   }, | ||||
|   methods: { | ||||
|     destroy() { | ||||
|  | @ -16,8 +14,11 @@ export default { | |||
|       return null; | ||||
|     } | ||||
|     const propsObj = { | ||||
|       action: '//jsonplaceholder.typicode.com/posts/', | ||||
|       data: { a: 1, b: 2 }, | ||||
|       action: 'https://www.mocky.io/v2/5cc8019d300000980a055e76', | ||||
|       data: { | ||||
|         a: 1, | ||||
|         b: 2, | ||||
|       }, | ||||
|       headers: { | ||||
|         Authorization: 'xxxxxxx', | ||||
|       }, | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|   "name": "ant-design-vue", | ||||
|   "version": "1.3.8", | ||||
|   "version": "1.3.10", | ||||
|   "title": "Ant Design Vue", | ||||
|   "description": "An enterprise-class UI design language and Vue-based implementation", | ||||
|   "keywords": [ | ||||
|  | @ -67,7 +67,7 @@ | |||
|     "@vue/server-test-utils": "1.0.0-beta.16", | ||||
|     "@vue/test-utils": "1.0.0-beta.16", | ||||
|     "acorn": "^6.0.5", | ||||
|     "autoprefixer": "^8.1.0", | ||||
|     "autoprefixer": "^9.6.0", | ||||
|     "axios": "^0.18.0", | ||||
|     "babel-cli": "^6.26.0", | ||||
|     "babel-core": "^6.26.0", | ||||
|  | @ -75,7 +75,6 @@ | |||
|     "babel-helper-vue-jsx-merge-props": "^2.0.3", | ||||
|     "babel-jest": "^23.6.0", | ||||
|     "babel-loader": "^7.1.2", | ||||
|     "babel-plugin-add-module-exports": "^1.0.0", | ||||
|     "babel-plugin-import": "^1.1.1", | ||||
|     "babel-plugin-inline-import-data-uri": "^1.0.1", | ||||
|     "babel-plugin-istanbul": "^4.1.1", | ||||
|  |  | |||
|  | @ -38,6 +38,23 @@ | |||
|     <div id="app"> | ||||
|         <router-view></router-view> | ||||
|     </div> | ||||
|     <!-- Hotjar Tracking Code for http://vue.ant.design --> | ||||
|     <script> | ||||
|         (function(h, o, t, j, a, r) { | ||||
|             h.hj = h.hj || function() { | ||||
|                 (h.hj.q = h.hj.q || []).push(arguments) | ||||
|             }; | ||||
|             h._hjSettings = { | ||||
|                 hjid: 1359441, | ||||
|                 hjsv: 6 | ||||
|             }; | ||||
|             a = o.getElementsByTagName('head')[0]; | ||||
|             r = o.createElement('script'); | ||||
|             r.async = 1; | ||||
|             r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv; | ||||
|             a.appendChild(r); | ||||
|         })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv='); | ||||
|     </script> | ||||
| </body> | ||||
| 
 | ||||
| </html> | ||||
|  | @ -95,6 +95,13 @@ export declare class TooltipCommon extends AntdComponent { | |||
|    */ | ||||
|   visible: boolean; | ||||
| 
 | ||||
|   /** | ||||
|    * Whether to destroy tooltip on hide | ||||
|    * @default false | ||||
|    * @type boolean | ||||
|    */ | ||||
|   destroyTooltipOnHide: boolean; | ||||
| 
 | ||||
|   /** | ||||
|    * this value will be merged into placement's config, please refer to the settings dom-align | ||||
|    * @type object | ||||
|  |  | |||
		Loadingโฆ
	
		Reference in New Issue
	
	 tangjinzhou
						tangjinzhou