diff --git a/.babelrc b/.babelrc index 3cdf83c0b..1321e4c34 100644 --- a/.babelrc +++ b/.babelrc @@ -1,16 +1,14 @@ { - "env": { - "test": { - "presets": [ - ["env", { "targets": { "node": "current" } }] - ], - "plugins": [ - "transform-vue-jsx", - "transform-object-assign", - "transform-object-rest-spread", - "transform-class-properties", - "transform-runtime" - ] - } + "env": { + "test": { + "presets": [["env", { "targets": { "node": "current" } }]], + "plugins": [ + "transform-vue-jsx", + "transform-object-assign", + "transform-object-rest-spread", + "transform-class-properties", + "transform-runtime" + ] } + } } diff --git a/.eslintrc b/.eslintrc index 6f7cb0cd3..ec87f0692 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,25 +1,36 @@ { - "root": true, - "env": { - "browser": true, - "node": true, - "jasmine": true, - "jest": true, - "es6": true - }, - "parserOptions": { - "parser": "babel-eslint" - }, - "extends": ["plugin:vue/recommended", "prettier"], - "rules": { - "comma-dangle": [2, "always-multiline"], - "no-var": "error", - "camelcase": "off", - "no-extra-boolean-cast": "off", - "semi": ["error", "always"], - "vue/require-prop-types": "off", - "vue/require-default-prop": "off", - "vue/no-reserved-keys": "off", - "vue/prop-name-casing": "off" - } -} \ No newline at end of file + "root": true, + "env": { + "browser": true, + "node": true, + "jasmine": true, + "jest": true, + "es6": true + }, + "parserOptions": { + "parser": "babel-eslint" + }, + "extends": ["plugin:vue/recommended", "prettier"], + "plugins": ["markdown"], + "rules": { + "comma-dangle": [2, "always-multiline"], + "no-var": "error", + "camelcase": "off", + "no-extra-boolean-cast": "off", + "semi": ["error", "always"], + "vue/require-prop-types": "off", + "vue/require-default-prop": "off", + "vue/no-reserved-keys": "off", + "vue/prop-name-casing": "off", + "vue/max-attributes-per-line": [ + 2, + { + "singleline": 20, + "multiline": { + "max": 1, + "allowFirstLine": false + } + } + ] + } +} diff --git a/.github/ISSUE_TEMPLATE/----please-use-new-issue-ant-design-vue---.md b/.github/ISSUE_TEMPLATE/----please-use-new-issue-ant-design-vue---.md index 41306aa0d..235cefe3d 100644 --- a/.github/ISSUE_TEMPLATE/----please-use-new-issue-ant-design-vue---.md +++ b/.github/ISSUE_TEMPLATE/----please-use-new-issue-ant-design-vue---.md @@ -1,9 +1,7 @@ --- -name: "⚠️ Please use issue-helper ⚠️" -about: The issue which is not created via https://vuecomponent.github.io/issue-helper/ will be closed - immediately. +name: '⚠️ Please use issue-helper ⚠️' +about: The issue which is not created via https://vuecomponent.github.io/issue-helper/ will be closed immediately. labels: - --- The issue which is not created via https://vuecomponent.github.io/issue-helper/ will be closed immediately. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f55848bb1..dc955618f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,6 @@ First of all, thank you for your contribution! 😄 -New feature please send pull request to feature branch, and rest to master branch. -Pull request will be merged after one of collaborators approve. -Please makes sure that these form are filled before submitting your pull request, thank you! +New feature please send pull request to feature branch, and rest to master branch. Pull request will be merged after one of collaborators approve. Please makes sure that these form are filled before submitting your pull request, thank you! [[中文版模板 / Chinese template](https://github.com/vueComponent/ant-design-vue/blob/master/.github/PULL_REQUEST_TEMPLATE/pr_cn.md)] @@ -50,4 +48,4 @@ Please makes sure that these form are filled before submitting your pull request ### Additional Plan? (Optional if not new feature) -> If this PR related with other PR or following info. You can type here. \ No newline at end of file +> If this PR related with other PR or following info. You can type here. diff --git a/.github/PULL_REQUEST_TEMPLATE/pr_cn.md b/.github/PULL_REQUEST_TEMPLATE/pr_cn.md index 60bcdb279..02f20810b 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pr_cn.md +++ b/.github/PULL_REQUEST_TEMPLATE/pr_cn.md @@ -1,8 +1,6 @@ 首先,感谢你的贡献! 😄 -新特性请提交至 feature 分支,其余可提交至 master 分支。 -在一个维护者审核通过后合并。 -请确保填写以下 pull request 的信息,谢谢!~ +新特性请提交至 feature 分支,其余可提交至 master 分支。在一个维护者审核通过后合并。请确保填写以下 pull request 的信息,谢谢!~ [[English Template / 英文模板](?expand=1)] @@ -28,7 +26,7 @@ > 1. 基本的解决思路和其他可选方案。 > 2. 列出最终的 API 实现和用法。 -> 3. 涉及UI/交互变动需要有截图或 GIF。 +> 3. 涉及 UI/交互变动需要有截图或 GIF。 ### 对用户的影响和可能的风险(非新功能可选) @@ -49,4 +47,4 @@ ### 后续计划(非新功能可选) -> 如果这个提交后面还有相关的其他提交和跟进信息,可以写在这里。 \ No newline at end of file +> 如果这个提交后面还有相关的其他提交和跟进信息,可以写在这里。 diff --git a/.gitignore b/.gitignore index a19e6084c..f4e73280e 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ package-lock.json # 备份文件 /components/test/* +list.txt diff --git a/.jest.js b/.jest.js index f49e23973..b0b49069f 100644 --- a/.jest.js +++ b/.jest.js @@ -1,40 +1,31 @@ const libDir = process.env.LIB_DIR; const transformIgnorePatterns = [ - '/dist/', 'node_modules\/[^/]+?\/(?!(es|node_modules)\/)', // Ignore modules without es dir + '/dist/', + 'node_modules/[^/]+?/(?!(es|node_modules)/)', // Ignore modules without es dir ]; module.exports = { testURL: 'http://localhost/', setupFiles: ['./tests/setup.js'], - moduleFileExtensions: [ - "js", - "jsx", - "json", - "vue", - "md", - "jpg" - ], + moduleFileExtensions: ['js', 'jsx', 'json', 'vue', 'md', 'jpg'], modulePathIgnorePatterns: ['/_site/'], - testPathIgnorePatterns: [ - '/node_modules/', 'node' - ], + testPathIgnorePatterns: ['/node_modules/', 'node'], transform: { - ".*\\.(vue|md)$": "/node_modules/vue-jest", - "^.+\\.(js|jsx)$": "/node_modules/babel-jest" + '.*\\.(vue|md)$': '/node_modules/vue-jest', + '^.+\\.(js|jsx)$': '/node_modules/babel-jest', + '^.+\\.svg$': '/node_modules/jest-transform-stub', }, - testRegex: libDir === 'dist' - ? 'demo\\.test\\.js$' - : '.*\\.test\\.js$', + testRegex: libDir === 'dist' ? 'demo\\.test\\.js$' : '.*\\.test\\.js$', moduleNameMapper: { - "^@/(.*)$": "/$1", - "ant-design-vue": "/components/index.js", - "^vue$": "vue/dist/vue.common.js" + '^@/(.*)$': '/$1', + 'ant-design-vue': '/components/index.js', + '^vue$': 'vue/dist/vue.common.js', }, - snapshotSerializers: ["/node_modules/jest-serializer-vue"], + snapshotSerializers: ['/node_modules/jest-serializer-vue'], collectCoverage: process.env.COVERAGE === 'true', collectCoverageFrom: [ - "components/**/*.{js,jsx,vue}", + 'components/**/*.{js,jsx,vue}', '!components/*/style/index.{js,jsx}', '!components/style/*.{js,jsx}', '!components/*/locale/*.{js,jsx}', @@ -45,7 +36,7 @@ module.exports = { '!components/align/**/*', '!components/trigger/**/*', '!components/style.js', - "!**/node_modules/**" + '!**/node_modules/**', ], - transformIgnorePatterns + transformIgnorePatterns, }; diff --git a/.prettierignore b/.prettierignore index 70cf1bc89..c77005801 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,9 +1,26 @@ -**/*.md **/*.svg -**/*.ejs -**/*.html package.json -es/** -lib/** -_site/** -dist/** \ No newline at end of file +lib/ +es/ +dist/ +_site/ +coverage/ +CNAME +LICENSE +yarn.lock +netlify.toml +yarn-error.log +*.sh +*.snap +.gitignore +.npmignore +.prettierignore +.DS_Store +.editorconfig +.eslintignore +**/*.yml +components/style/color/*.less +**/assets +.gitattributes +.stylelintrc +.vcmrc diff --git a/.prettierrc b/.prettierrc index 3dc446bfa..84d393d19 100644 --- a/.prettierrc +++ b/.prettierrc @@ -11,4 +11,4 @@ } } ] -} \ No newline at end of file +} diff --git a/BACKERS.md b/BACKERS.md index 03b43ea6d..4990f389e 100644 --- a/BACKERS.md +++ b/BACKERS.md @@ -35,9 +35,8 @@

支付宝/微信

-### 使用支付宝/微信的赞助的用户,如需要添加名单,赞助后可发github账号到邮箱(415800467@qq.com) +### 使用支付宝/微信的赞助的用户,如需要添加名单,赞助后可发 github 账号到邮箱(415800467@qq.com) - [fastgoo](https://github.com/fastgoo) - [sendya](https://github.com/sendya) - [limichange](https://github.com/limichange) - diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 64d9868bc..4840ad841 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -4,9 +4,9 @@ #### Release Schedule -* Weekly release: patch version at the end of every week for routine bugfix (anytime for urgent bugfix). -* Monthly release: minor version for new features. -* Major version release is not included in this schedule for breaking change and new features. +- Weekly release: patch version at the end of every week for routine bugfix (anytime for urgent bugfix). +- Monthly release: minor version for new features. +- Major version release is not included in this schedule for breaking change and new features. --- @@ -23,23 +23,29 @@ - 🐞 Fix `Comment` `ConfigProvider` TypeScript type definition problem. ## 1.3.16 + `2019-08-25` + - 🐞 Fix `Select` component to uninstall component error when there is no input [#1091](https://github.com/vueComponent/ant-design-vue/pull/1091) - 🐞 Fix `Collapse` error when no child element [#1116](https://github.com/vueComponent/ant-design-vue/pull/1116) - 🐞 Fix TypeScript type definitions. ## 1.3.15 + `2019-08-17` + - 🐞 Fix `Select` component cannot scroll under IE [#999](https://github.com/vueComponent/ant-design-vue/issues/999) -- 🐞 Fix `Form` `initialValue` warning [#1076](https://github.com/vueComponent/ant-design-vue/issues/1076) +- 🐞 Fix `Form` `initialValue` warning [#1076](https://github.com/vueComponent/ant-design-vue/issues/1076) - 🐞 Fix `Form` error when verifying `Number` type [#1090](https://github.com/vueComponent/ant-design-vue/issues/1090) ## 1.3.14 + `2019-08-12` + - 🐞 Fix `MenuItem` parsing array `class` incorrect question [#1009](https://github.com/vueComponent/ant-design-vue/issues/1009) - 🐞 Fix an error when npm install [#997](https://github.com/vueComponent/ant-design-vue/issues/997) -- 🐞 Fix `Select` component cannot scroll under IE [#999] (https://github.com/vueComponent/ant-design-vue/issues/999) -- 🐞 Fix `Select` component does not trigger focus event problem [#999] (https://github.com/vueComponent/ant-design-vue/issues/999) +- 🐞 Fix `Select` component cannot scroll under IE [#999](https://github.com/vueComponent/ant-design-vue/issues/999) +- 🐞 Fix `Select` component does not trigger focus event problem [#999](https://github.com/vueComponent/ant-design-vue/issues/999) - 🐞 Fix `DropdownButton` `size` attribute does not work [#71b7c9](https://github.com/vueComponent/ant-design-vue/commit/71b7c9d33895f55694e28aaba4b2cfca7228771b) - 🐞 Fix `Table` component does not support vue 2.6 v-slot syntax problem [#1058](https://github.com/vueComponent/ant-design-vue/issues/1058) - 🌟 `Popover` add `builtinPlacements` attribute [#1073](https://github.com/vueComponent/ant-design-vue/issues/1073) @@ -47,20 +53,25 @@ - 🌟 `Modal.confirm` `title` and `content` support function [#824](https://github.com/vueComponent/ant-design-vue/issues/824) ## 1.3.13 + `2019-07-22` + - 🐞 Fix `dist` missing `antd.less` file problem [#995](https://github.com/vueComponent/ant-design-vue/issues/995) ## 1.3.12 + `2019-07-22` + - 🐞 `package.json` `files` add `scripts` ## 1.3.11 + `2019-07-22` - Dropdown - 🐞 Uodate disable style [#912](https://github.com/vueComponent/ant-design-vue/pull/912) [#921](https://github.com/vueComponent/ant-design-vue/pull/921) - 🐞 Fix `SubMenu` flashing problem [#975](https://github.com/vueComponent/ant-design-vue/issues/970) -- 🌟 `AutoComplete` `Cascader` `DatePicker` `DropDown` `Select` `TimePicker` add an instance of the popup reference `popupRef` [f9373e](https://github.com/vueComponent/ant-design-vue/commit/f9373e44ce229ab0ba94ababbd686e6ad6e9f10f) +- 🌟 `AutoComplete` `Cascader` `DatePicker` `DropDown` `Select` `TimePicker` add an instance of the popup reference `popupRef` [f9373e](https://github.com/vueComponent/ant-design-vue/commit/f9373e44ce229ab0ba94ababbd686e6ad6e9f10f) - 🐞 Fix `DatePicker` can not open when placeholder is chinese at ie 10 and 11 [#865](https://github.com/vueComponent/ant-design-vue/issues/865) - 🌟 `DatePicker` add custom render trigger [#957](https://github.com/vueComponent/ant-design-vue/pull/957) - 🌟 `@ant-design/icons-vue` update to `^2.0.0` @@ -72,11 +83,15 @@ - 🐞 Fix TypeScript type definitions. ## 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) @@ -90,18 +105,24 @@ - 🐞 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) - 🐞 Fix `Table` Header is not aligned under Firefox [#579](https://github.com/vueComponent/ant-design-vue/issues/579) - 🌟 Drawer `Drawer` add custom `handel` - 🐞 Fix TypeScript type definitions. ## 1.3.7 + `2019-03-18` + - 🐞 Fix `Select` `selectedKeys` type validation error [#597](https://github.com/vueComponent/ant-design-vue/issues/597) ## 1.3.6 + `2019-03-17` + - 🐞 Fix `Select` title attribute to display confusion [#588](https://github.com/vueComponent/ant-design-vue/issues/588) - 🐞 Fix `InputSearch` does not support slot mode customization addonAfter and addonBefore issues [#581](https://github.com/vueComponent/ant-design-vue/issues/581) - 🐞 Fix `Input` repeat class question [#faf9ba](https://github.com/vueComponent/ant-design-vue/commit/faf9ba0033eed9ae6ac17879f2e39dd341db847f) @@ -110,6 +131,7 @@ - 🐞 Fix some TypeScript definitions. ## 1.3.5 + `2019-02-23` - 🌟 Optimize the `Popover` `Popconfirm` component arrow style. @@ -122,15 +144,18 @@ - 🐞 Fix some TypeScript definitions. ## 1.3.4 + `2019-01-31` 🎉 🎉 🎉 Happy New Year! + - 🐞 fix: AutoComplete placeholder not display when disabled. [#402](https://github.com/vueComponent/ant-design-vue/issues/402)。 - 🐞 Add the `BreadcrmbItem` ts type file.[#452](https://github.com/vueComponent/ant-design-vue/issues/452)。 - 🐞 Fixed an issue where the FormItem was not updated when it was in a subcomponent. [#446](https://github.com/vueComponent/ant-design-vue/issues/446)。 - 🐞 Fix some component TypeScript definitions. ## 1.3.3 + `2019-01-26` - 🐞 Fix `message` not close When you configure maxcount.[#428](https://github.com/vueComponent/ant-design-vue/pull/428)。 @@ -139,24 +164,28 @@ - 📝 Update the document: form adds the `preserve` description, and the `icon` modifies the custom component reference document description. ## 1.3.2 + `2019-01-17` - 🐞 Fix Form reports an error when using the obsolete API `autoCreateForm`.[#413](https://github.com/vueComponent/ant-design-vue/issues/413)。 - 🐞 Fix Slider error when clicking mark. [#407](https://github.com/vueComponent/ant-design-vue/issues/407)。 ## 1.3.1 + `2019-01-15` - 🐞 Fixed the `Table` component could not be scrolled under ie.。[#390](https://github.com/vueComponent/ant-design-vue/issues/390)。 - 🐞 Fix `Form` does not clear that does not need to check the field.[#367](https://github.com/vueComponent/ant-design-vue/issues/367)。 ## 1.3.0 + `2019-01-12` - 🎉 🎉 🎉 Publish the vscode plugin [ant-design-vue-helper](https://marketplace.visualstudio.com/items?itemName=ant-design-vue.vscode-ant-design-vue-helper) - 🎉 🎉 🎉 Optimize official website document interaction ### Component features and styles are synchronized to antd version 3.11.6. + 1.3.0 brings two new Components, a lot of exciting changes and new features. - 🔥 Added a new component [Comment](https://vue.ant.design/components/comment/)。 @@ -194,14 +223,15 @@ Component Fixes / Enhancements: - 🐞 Fix Tooltip in the disabled state, the style error problem.[#389](https://github.com/vueComponent/ant-design-vue/issues/389) - 🐞 Fix some component TypeScript definitions. - ## 1.2.5 + `2019-01-06` - 🌟 Add `Typescript` type file[#250](https://github.com/vueComponent/ant-design-vue/issues/250) - 🐞 Fix `Icon` component can't support static class and dynamic class problems at the same time[#371](https://github.com/vueComponent/ant-design-vue/issues/371) ## 1.2.4 + `2018-12-29` - 🐞 Fix `Select` component does not trigger `popupScroll` event[#350](https://github.com/vueComponent/ant-design-vue/issues/350) @@ -214,6 +244,7 @@ Component Fixes / Enhancements: - 🐞 Remove the expansion animation when the `Menu` component is initialized.[#338](https://github.com/vueComponent/ant-design-vue/issues/338) ## 1.2.3 + `2018-12-25` - 📝 Remove Christmas egg. @@ -222,6 +253,7 @@ Component Fixes / Enhancements: - 🐞 Fix the `Tree` component warning duplicate `key` question when using `TreeNode`。 ## 1.2.2 + `2018-12-19` - 🐞 `Datepicker` render footer twice question. [#315](https://github.com/vueComponent/ant-design-vue/issues/315) @@ -234,13 +266,16 @@ Component Fixes / Enhancements: - 🐞 `Icon` support native event [cffef3](https://github.com/vueComponent/ant-design-vue/commit/cffef392e5605de8d342787d7562e81ca8588800) ## 1.2.1 + `2018-12-17` - 🐞 Fix `Menu` flashing problem when scaling under `Layout` - 🐞 Fix `Icon` report Warning problem ## 1.2.0 + `2018-12-16` + ### Synchronize with antd 3.10.x - 🔥🔥🔥 replaced font icons with svg icons which bring benefits below:: @@ -277,9 +312,10 @@ Component Fixes / Enhancements: ## 1.1.10 `2018-12-7` -- 🔥🔥🔥 In the 1.1.10 version, the `Form` component better supports the single-file tempalte syntax. In previous versions, complex component requirements were required to be implemented using JSX. In order to better use the automatic collection and validation of Form forms in the template, we have optimized the way components are used. All Demo files are refactored using the latest syntax. -However, for the previous API, continue to support, you can not worry about the API changes, resulting in problems in the existing system. -````html + +- 🔥🔥🔥 In the 1.1.10 version, the `Form` component better supports the single-file tempalte syntax. In previous versions, complex component requirements were required to be implemented using JSX. In order to better use the automatic collection and validation of Form forms in the template, we have optimized the way components are used. All Demo files are refactored using the latest syntax. However, for the previous API, continue to support, you can not worry about the API changes, resulting in problems in the existing system. + +```html