diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md
index fc095d189..9491b0bfb 100644
--- a/CHANGELOG.en-US.md
+++ b/CHANGELOG.en-US.md
@@ -2,6 +2,40 @@
---
+## 1.2.0
+`2018-12-16`
+### Synchronize with antd 3.10.x
+
+- π₯π₯π₯ replaced font icons with svg icons which bring benefits below:οΌ
+ - Complete offline usage of icon, no dependency of alipay cdn font icon file and no more empty square during downloading than no need to deploy icon font files locally either.
+ - Much more display accuracy in lower-level screens.
+ - Support multiple colors for icon.
+ - No need to change built-in icons with overriding styles by providing more props in component.
+ - π Add the `theme` attribute to set the theme style of the icon.
+ - π Added `component` attribute, you can externally pass a component to customize the control rendering result.
+ - π The `twoToneColor` property is added to control the theme color of the two-color icon.
+ - π Added static methods `Icon.getTowToneColor()` and `Icon.setTwoToneColor(...)` to globally get and set the theme color of all two-color icons.
+ - π The new static method `Icon.createFromIconfontCN({...})` is added to make it easier to use icons hosted on [`iconfont.cn`](http://iconfont.cn/).
+- π₯ Added a new component `Skeleton`.
+- π₯ Menu will automatically close up to fit width in `horizontal` mode.
+- π₯ The `placement` of the drawer supports `top` and `bottom` to accommodate more scenes.
+- π The following components add a `suffixIcon` prop, which is used to set the icon behind the input box. For details, please refer to the documentation.
+ - Cascader
+ - DatePicker
+ - Select
+ - TreeSelect
+ - TimePicker
+- π Added Modal.open for optional icon dialog.
+- π Modal.info adds the configuration of `getContainer`.
+- π Improve RangePicker footer UI by merging them.
+- π The Anchor component adds `onClick` property.
+- π The Tab component adds the `renderTabBar` property.
+- π The Input component adds the `select` method.
+- π Steps adds the `initial` attribute.
+- π Upload adds `openFileDialogOnClick` prop to allow setting whether to open the upload dialog when the component is clicked.
+- π InputNumber adds `decimalSeparator` prop to allow setting a custom decimal.
+- π Fix a lot of hidden bugs that have not yet been issued, and then not list them one by one.
+
## 1.1.10
`2018-12-7`
diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md
index b1536be86..e1639ced3 100644
--- a/CHANGELOG.zh-CN.md
+++ b/CHANGELOG.zh-CN.md
@@ -1,6 +1,7 @@
# ζ΄ζ°ζ₯εΏ
---
+
## 1.2.0
`2018-12-16`
### δΈantd 3.10.xεζ₯
diff --git a/components/_util/FormDecoratorDirective.js b/components/_util/FormDecoratorDirective.js
index 1fc7ecf23..746f9dc4c 100644
--- a/components/_util/FormDecoratorDirective.js
+++ b/components/_util/FormDecoratorDirective.js
@@ -1,7 +1,11 @@
+export function antDecorator (Vue) {
+ return Vue.directive('decorator', {
+ })
+}
+
export default {
// just for tag
install: (Vue, options) => {
- Vue.directive('decorator', {
- })
+ antDecorator(Vue)
},
}
diff --git a/components/_util/antDirective.js b/components/_util/antDirective.js
new file mode 100644
index 000000000..ebfcbdcab
--- /dev/null
+++ b/components/_util/antDirective.js
@@ -0,0 +1,11 @@
+import { antInput } from './antInputDirective'
+import { antRef } from './antRefDirective'
+import { antDecorator } from './FormDecoratorDirective'
+
+export default {
+ install: (Vue, options) => {
+ antInput(Vue)
+ antRef(Vue)
+ antDecorator(Vue)
+ },
+}
diff --git a/components/_util/antInputDirective.js b/components/_util/antInputDirective.js
index c6812322e..aeba9f943 100644
--- a/components/_util/antInputDirective.js
+++ b/components/_util/antInputDirective.js
@@ -49,26 +49,30 @@ if (isIE9) {
})
}
-export default {
- install: (Vue, options) => {
- Vue.directive('ant-input', {
- inserted (el, binding, vnode, oldVnode) {
- if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
- if (!binding.modifiers || !binding.modifiers.lazy) {
- el.addEventListener('compositionstart', onCompositionStart)
- el.addEventListener('compositionend', onCompositionEnd)
- // Safari < 10.2 & UIWebView doesn't fire compositionend when
- // switching focus before confirming composition choice
- // this also fixes the issue where some browsers e.g. iOS Chrome
- // fires "change" instead of "input" on autocomplete.
- el.addEventListener('change', onCompositionEnd)
- /* istanbul ignore if */
- if (isIE9) {
- el.vmodel = true
- }
+export function antInput (Vue) {
+ return Vue.directive('ant-input', {
+ inserted (el, binding, vnode, oldVnode) {
+ if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
+ if (!binding.modifiers || !binding.modifiers.lazy) {
+ el.addEventListener('compositionstart', onCompositionStart)
+ el.addEventListener('compositionend', onCompositionEnd)
+ // Safari < 10.2 & UIWebView doesn't fire compositionend when
+ // switching focus before confirming composition choice
+ // this also fixes the issue where some browsers e.g. iOS Chrome
+ // fires "change" instead of "input" on autocomplete.
+ el.addEventListener('change', onCompositionEnd)
+ /* istanbul ignore if */
+ if (isIE9) {
+ el.vmodel = true
}
}
- },
- })
+ }
+ },
+ })
+}
+
+export default {
+ install: (Vue, options) => {
+ antInput(Vue)
},
}
diff --git a/components/_util/antRefDirective.js b/components/_util/antRefDirective.js
index c7e3b7425..318e9655f 100644
--- a/components/_util/antRefDirective.js
+++ b/components/_util/antRefDirective.js
@@ -1,15 +1,18 @@
+export function antRef (Vue) {
+ return Vue.directive('ant-ref', {
+ bind: function (el, binding, vnode) {
+ binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
+ },
+ update: function (el, binding, vnode) {
+ binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
+ },
+ unbind: function (el, binding, vnode) {
+ binding.value(null)
+ },
+ })
+}
export default {
install: (Vue, options) => {
- Vue.directive('ant-ref', {
- bind: function (el, binding, vnode) {
- binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
- },
- update: function (el, binding, vnode) {
- binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
- },
- unbind: function (el, binding, vnode) {
- binding.value(null)
- },
- })
+ antRef(Vue)
},
}
diff --git a/components/form/index.jsx b/components/form/index.jsx
index b054ae72b..1146d963b 100644
--- a/components/form/index.jsx
+++ b/components/form/index.jsx
@@ -5,6 +5,7 @@ import FormDecoratorDirective from '../_util/FormDecoratorDirective'
Vue.use(ref, { name: 'ant-ref' })
Vue.use(FormDecoratorDirective)
+Vue.prototype.$form = Form
export { FormProps, FormCreateOption, ValidationRule } from './Form'
export { FormItemProps } from './FormItem'
diff --git a/site/components/demoBox.vue b/site/components/demoBox.vue
index cdafe1084..82398a6f3 100644
--- a/site/components/demoBox.vue
+++ b/site/components/demoBox.vue
@@ -13,7 +13,9 @@