diff --git a/.eslintrc b/.eslintrc
index 85a29000c..b5c73721e 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,4 +1,5 @@
{
+ "root": true,
"env": {
"browser": true,
"node": true,
@@ -6,14 +7,18 @@
"jest": true,
"es6": true
},
- "parser": "babel-eslint",
- "extends": ["plugin:vue-libs/recommended", "prettier"],
+ "parserOptions": {
+ "parser": "babel-eslint"
+ },
+ "extends": ["plugin:vue/recommended", "prettier"],
"rules": {
"comma-dangle": [2, "always-multiline"],
"no-var": "error",
- "no-unused-vars": "warn",
"camelcase": "off",
"no-extra-boolean-cast": "off",
- "semi": ["error", "always"]
+ "semi": ["error", "always"],
+ "vue/require-prop-types": "off",
+ "vue/require-default-prop": "off",
+ "vue/no-reserved-keys": "off"
}
-}
\ No newline at end of file
+}
diff --git a/.jest.js b/.jest.js
index 37fd6d5e8..f49e23973 100644
--- a/.jest.js
+++ b/.jest.js
@@ -28,7 +28,8 @@ module.exports = {
: '.*\\.test\\.js$',
moduleNameMapper: {
"^@/(.*)$": "/$1",
- "ant-design-vue": "/components/index.js"
+ "ant-design-vue": "/components/index.js",
+ "^vue$": "vue/dist/vue.common.js"
},
snapshotSerializers: ["/node_modules/jest-serializer-vue"],
collectCoverage: process.env.COVERAGE === 'true',
diff --git a/.travis.yml b/.travis.yml
index 77ddefdeb..79908f46c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: node_js
sudo: required
node_js:
- - 8.2.1
+ - 10.10.0
before_script:
- npm install vue vue-template-compiler
script:
diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md
index c74e462b1..34a053d4c 100644
--- a/CHANGELOG.en-US.md
+++ b/CHANGELOG.en-US.md
@@ -10,6 +10,23 @@
---
+## 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)。
+- 🐞 Fix some component TypeScript definitions.[#422](https://github.com/vueComponent/ant-design-vue/pull/422)。
+- 🌟 The Anchor component add `warpperClass` `wrapperStyle` property.[1aa42d](https://github.com/vueComponent/ant-design-vue/commit/1aa42dfe18bd7ac7893a765b6ee341844ea02550)
+- 📝 Update the document: form adds the `preserve` description, and the `icon` modifies the custom component reference document description.
+
## 1.3.2
`2019-01-17`
diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md
index 5a9ebcf3f..c50aaa8c5 100644
--- a/CHANGELOG.zh-CN.md
+++ b/CHANGELOG.zh-CN.md
@@ -10,6 +10,23 @@
---
+## 1.3.4
+`2019-01-31`
+
+🎉 🎉 🎉 祝大家新年快乐!
+- 🐞 修复AutoComplete组件disabled时,placeholder不显示的问题。[#402](https://github.com/vueComponent/ant-design-vue/issues/402)。
+- 🐞 添加 `BreadcrmbItem` ts类型文件。[#452](https://github.com/vueComponent/ant-design-vue/issues/452)。
+- 🐞 修复当FormItem在子组件中时不更新问题。[#446](https://github.com/vueComponent/ant-design-vue/issues/446)。
+- 🐞 修复一些组件 TypeScript 定义。
+
+## 1.3.3
+`2019-01-26`
+
+- 🐞 修复message在配置maxcount时,不能关闭提示窗问题。[#428](https://github.com/vueComponent/ant-design-vue/pull/428)。
+- 🐞 修复一些组件 TypeScript 定义。[#422](https://github.com/vueComponent/ant-design-vue/pull/422)。
+- 🌟 Anchor组件新增`warpperClass` `wrapperStyle`属性。[1aa42d](https://github.com/vueComponent/ant-design-vue/commit/1aa42dfe18bd7ac7893a765b6ee341844ea02550)
+- 📝 更新文档:form增加preserve说明,icon修改自定义组件引用文档说明。
+
## 1.3.2
`2019-01-17`
diff --git a/README-zh_CN.md b/README-zh_CN.md
index 32111a6c4..d87059d3b 100644
--- a/README-zh_CN.md
+++ b/README-zh_CN.md
@@ -91,7 +91,7 @@ ant-design-vue是MIT协议的开源项目。为了项目能够更好的持续的
- [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-vue)
- [paypal](https://www.paypal.me/tangjinzhou)
-- [支付宝或微信](https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png)
+- [支付宝或微信](https://cdn.nlark.com/yuque/0/2019/png/87084/1548485701785-assets/web-upload/648ca181-a52f-4382-957c-97c5dbb3e1cc.png)
## Backers
diff --git a/README.md b/README.md
index 5d1bfe174..986a91208 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ ant-design-vue is an MIT-licensed open source project. In order to achieve bette
- [Patreon](https://www.patreon.com/tangjinzhou)
- [opencollective](https://opencollective.com/ant-design-vue)
- [paypal](https://www.paypal.me/tangjinzhou)
-- [支付宝或微信](https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png)
+- [支付宝或微信](https://cdn.nlark.com/yuque/0/2019/png/87084/1548485701785-assets/web-upload/648ca181-a52f-4382-957c-97c5dbb3e1cc.png)
## Backers
diff --git a/antd-tools/utils/CleanUpStatsPlugin.js b/antd-tools/utils/CleanUpStatsPlugin.js
index 300168c4f..5029bba39 100644
--- a/antd-tools/utils/CleanUpStatsPlugin.js
+++ b/antd-tools/utils/CleanUpStatsPlugin.js
@@ -24,13 +24,13 @@ class CleanUpStatsPlugin {
apply(compiler) {
compiler.hooks.done.tap('CleanUpStatsPlugin', stats => {
- const { children, warnings } = stats.compilation;
+ const { children } = stats.compilation;
if (Array.isArray(children)) {
stats.compilation.children = children.filter(child => this.shouldPickStatChild(child));
}
- if (Array.isArray(warnings)) {
- stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message));
- }
+ // if (Array.isArray(warnings)) {
+ // stats.compilation.warnings = warnings.filter(message => this.shouldPickWarning(message));
+ // }
});
}
}
diff --git a/components/_util/ContainerRender.jsx b/components/_util/ContainerRender.jsx
index 958c58a5a..5dd80381c 100644
--- a/components/_util/ContainerRender.jsx
+++ b/components/_util/ContainerRender.jsx
@@ -53,11 +53,11 @@ export default {
if (!this._component) {
this._component = new Vue({
+ el: el,
+ parent: self.parent,
data: {
comProps: props,
},
- parent: self.parent,
- el: el,
mounted() {
this.$nextTick(() => {
if (ready) {
diff --git a/components/_util/FormDecoratorDirective.js b/components/_util/FormDecoratorDirective.js
index bfe9aa857..7abde9954 100644
--- a/components/_util/FormDecoratorDirective.js
+++ b/components/_util/FormDecoratorDirective.js
@@ -4,7 +4,7 @@ export function antDecorator(Vue) {
export default {
// just for tag
- install: (Vue, options) => {
+ install: Vue => {
antDecorator(Vue);
},
};
diff --git a/components/_util/antDirective.js b/components/_util/antDirective.js
index 08c416a14..cda6a3ab8 100644
--- a/components/_util/antDirective.js
+++ b/components/_util/antDirective.js
@@ -2,7 +2,7 @@ import { antInput } from './antInputDirective';
import { antDecorator } from './FormDecoratorDirective';
export default {
- install: (Vue, options) => {
+ install: Vue => {
antInput(Vue);
antDecorator(Vue);
},
diff --git a/components/_util/antInputDirective.js b/components/_util/antInputDirective.js
index d4695057a..abbb4d7fe 100644
--- a/components/_util/antInputDirective.js
+++ b/components/_util/antInputDirective.js
@@ -46,7 +46,7 @@ if (isIE9) {
export function antInput(Vue) {
return Vue.directive('ant-input', {
- inserted(el, binding, vnode, oldVnode) {
+ inserted(el, binding, vnode) {
if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
if (!binding.modifiers || !binding.modifiers.lazy) {
el.addEventListener('compositionstart', onCompositionStart);
@@ -67,7 +67,7 @@ export function antInput(Vue) {
}
export default {
- install: (Vue, options) => {
+ install: Vue => {
antInput(Vue);
},
};
diff --git a/components/_util/openAnimation.js b/components/_util/openAnimation.js
index 05c82c4fc..033582d0a 100644
--- a/components/_util/openAnimation.js
+++ b/components/_util/openAnimation.js
@@ -1,7 +1,7 @@
import cssAnimation from './css-animation';
import raf from 'raf';
-function animate(node, show, done, type) {
+function animate(node, show, done) {
let height;
let requestAnimationFrameId;
let appearRequestAnimationFrameId;
diff --git a/components/_util/props-util.js b/components/_util/props-util.js
index a977c9e19..8e94a5474 100644
--- a/components/_util/props-util.js
+++ b/components/_util/props-util.js
@@ -250,7 +250,7 @@ const initDefaultProps = (propTypes, defaultProps) => {
export function mergeProps() {
const args = [].slice.call(arguments, 0);
const props = {};
- args.forEach((p = {}, i) => {
+ args.forEach((p = {}) => {
for (const [k, v] of Object.entries(p)) {
props[k] = props[k] || {};
if (isPlainObject(v)) {
diff --git a/components/_util/store/connect.jsx b/components/_util/store/connect.jsx
index 418a5af66..bea6b1e64 100644
--- a/components/_util/store/connect.jsx
+++ b/components/_util/store/connect.jsx
@@ -24,7 +24,7 @@ export default function connect(mapStateToProps) {
name: `Connect_${getDisplayName(WrappedComponent)}`,
props,
inject: {
- storeContext: { default: {} },
+ storeContext: { default: () => ({}) },
},
data() {
this.store = this.storeContext.store;
diff --git a/components/_util/vue-types/index.js b/components/_util/vue-types/index.js
index a53d6afc9..c92958ef7 100644
--- a/components/_util/vue-types/index.js
+++ b/components/_util/vue-types/index.js
@@ -111,7 +111,7 @@ const VuePropTypes = {
let hasCustomValidators = false;
- const nativeChecks = arr.reduce((ret, type, i) => {
+ const nativeChecks = arr.reduce((ret, type) => {
if (isPlainObject(type)) {
if (type._vueTypes_name === 'oneOf') {
return ret.concat(type.type || []);
diff --git a/components/_util/warning.js b/components/_util/warning.js
index 7a12dde23..35d813386 100644
--- a/components/_util/warning.js
+++ b/components/_util/warning.js
@@ -1,7 +1,7 @@
import warning from 'warning';
const warned = {};
-export default (valid, message, throwError) => {
+export default (valid, message) => {
if (!valid && !warned[message]) {
warning(false, message);
warned[message] = true;
diff --git a/components/affix/index.jsx b/components/affix/index.jsx
index dcdc9f970..e35990c35 100644
--- a/components/affix/index.jsx
+++ b/components/affix/index.jsx
@@ -81,10 +81,10 @@ const Affix = {
// Mock Event object.
this.updatePosition({});
},
- offsetTop(val) {
+ offsetTop() {
this.updatePosition({});
},
- offsetBottom(val) {
+ offsetBottom() {
this.updatePosition({});
},
},
diff --git a/components/anchor/Anchor.jsx b/components/anchor/Anchor.jsx
index 73d5fb3c9..0c8dad778 100644
--- a/components/anchor/Anchor.jsx
+++ b/components/anchor/Anchor.jsx
@@ -4,7 +4,7 @@ import addEventListener from '../_util/Dom/addEventListener';
import Affix from '../affix';
import getScroll from '../_util/getScroll';
import raf from 'raf';
-import { initDefaultProps, getClass } from '../_util/props-util';
+import { initDefaultProps } from '../_util/props-util';
import BaseMixin from '../_util/BaseMixin';
function getDefaultContainer() {
@@ -82,6 +82,8 @@ export const AnchorProps = {
affix: PropTypes.bool,
showInkInFixed: PropTypes.bool,
getContainer: PropTypes.func,
+ wrapperClass: PropTypes.string,
+ wrapperStyle: PropTypes.object,
};
export default {
@@ -213,7 +215,7 @@ export default {
visible: activeLink,
});
- const wrapperClass = classNames(getClass(this), `${prefixCls}-wrapper`);
+ const wrapperClass = classNames(this.wrapperClass, `${prefixCls}-wrapper`);
const anchorClass = classNames(prefixCls, {
fixed: !affix && !showInkInFixed,
@@ -221,7 +223,7 @@ export default {
const wrapperStyle = {
maxHeight: offsetTop ? `calc(100vh - ${offsetTop}px)` : '100vh',
- // ...getStyle(this, true),
+ ...this.wrapperStyle,
};
const anchorContent = (
diff --git a/components/anchor/AnchorLink.jsx b/components/anchor/AnchorLink.jsx
index cdbd8a2cd..c683e69e5 100644
--- a/components/anchor/AnchorLink.jsx
+++ b/components/anchor/AnchorLink.jsx
@@ -15,8 +15,14 @@ export default {
href: '#',
}),
inject: {
- antAnchor: { default: {} },
- antAnchorContext: { default: {} },
+ antAnchor: { default: () => ({}) },
+ antAnchorContext: { default: () => ({}) },
+ },
+ watch: {
+ href(val, oldVal) {
+ this.antAnchor.unregisterLink(oldVal);
+ this.antAnchor.registerLink(val);
+ },
},
mounted() {
@@ -26,12 +32,6 @@ export default {
beforeDestroy() {
this.antAnchor.unregisterLink(this.href);
},
- watch: {
- href(val, oldVal) {
- this.antAnchor.unregisterLink(oldVal);
- this.antAnchor.registerLink(val);
- },
- },
methods: {
handleClick(e) {
this.antAnchor.scrollTo(this.href);
diff --git a/components/anchor/index.en-US.md b/components/anchor/index.en-US.md
index 017b9d55f..117e710a3 100644
--- a/components/anchor/index.en-US.md
+++ b/components/anchor/index.en-US.md
@@ -11,6 +11,8 @@
| offsetBottom | Pixels to offset from bottom when calculating position of scroll | number | - |
| offsetTop | Pixels to offset from top when calculating position of scroll | number | 0 |
| showInkInFixed | Whether show ink-balls in Fixed mode | boolean | false |
+| wrapperClass | The class name of the container | string | - |
+| wrapperStyle | The style of the container | object | - |
### Events
| Events Name | Description | Arguments |
diff --git a/components/anchor/index.zh-CN.md b/components/anchor/index.zh-CN.md
index 094cd5585..127d1f09d 100644
--- a/components/anchor/index.zh-CN.md
+++ b/components/anchor/index.zh-CN.md
@@ -11,6 +11,8 @@
| offsetBottom | 距离窗口底部达到指定偏移量后触发 | number | |
| offsetTop | 距离窗口顶部达到指定偏移量后触发 | number | |
| showInkInFixed | 固定模式是否显示小圆点 | boolean | false |
+| wrapperClass | 容器的类名 | string | - |
+| wrapperStyle | 容器样式 | object | - |
### 事件
| 事件名称 | 说明 | 回调参数 |
diff --git a/components/auto-complete/__tests__/index.test.js b/components/auto-complete/__tests__/index.test.js
index 8fdad0104..381e1b800 100644
--- a/components/auto-complete/__tests__/index.test.js
+++ b/components/auto-complete/__tests__/index.test.js
@@ -11,7 +11,7 @@ describe('AutoComplete with Custom Input Element Render', () => {
it('AutoComplete with custom Input render perfectly', done => {
const wrapper = mount(
{
- render(h) {
+ render() {
return (
diff --git a/components/auto-complete/style/index.less b/components/auto-complete/style/index.less
index 4c9dc25e3..2399ac5f5 100644
--- a/components/auto-complete/style/index.less
+++ b/components/auto-complete/style/index.less
@@ -54,6 +54,7 @@
}
&[disabled] {
.disabled;
+ background-color: transparent;
}
}
diff --git a/components/button/__tests__/index.test.js b/components/button/__tests__/index.test.js
index c32e78ecc..b359e593a 100644
--- a/components/button/__tests__/index.test.js
+++ b/components/button/__tests__/index.test.js
@@ -16,7 +16,7 @@ describe('Button', () => {
it('create primary button', () => {
const wrapper = mount({
- render(h) {
+ render() {
return ;
},
});
@@ -25,14 +25,14 @@ describe('Button', () => {
it('renders Chinese characters correctly', done => {
const wrapper = mount({
- render(h) {
+ render() {
return ;
},
});
expect(wrapper.text()).toBe('按 钮');
const wrapper1 = mount({
- render(h) {
+ render() {
return ;
},
});
@@ -40,7 +40,7 @@ describe('Button', () => {
expect(wrapper1.html()).toMatchSnapshot();
const wrapper2 = mount({
- render(h) {
+ render() {
return (
+
+ {{ content }}
+
+
+
diff --git a/components/form/demo/dynamic-form-item.vue b/components/form/demo/dynamic-form-item.vue
index 10cce1968..3919d4ae4 100644
--- a/components/form/demo/dynamic-form-item.vue
+++ b/components/form/demo/dynamic-form-item.vue
@@ -10,56 +10,64 @@ Add or remove form items dynamically.
-
-
-
- remove(k)"
- />
-
-
-
- Add field
-
-
-
- Submit
-
-
+
+
+ remove(k)"
+ />
+
+
+
+ Add field
+
+
+
+
+ Submit
+
+
+
diff --git a/components/form/demo/global-state.vue b/components/form/demo/global-state.vue
index 1e17cd3b5..46c73c0b0 100644
--- a/components/form/demo/global-state.vue
+++ b/components/form/demo/global-state.vue
@@ -18,13 +18,13 @@ But if you use `this.$form.createForm`, You can use any data, not just the prope
-