docs: add changelog

This commit is contained in:
tangjinzhou 2018-12-13 22:47:23 +08:00
parent 0d3821910f
commit 42510d6efc
8 changed files with 93 additions and 33 deletions

View File

@ -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`

View File

@ -1,6 +1,7 @@
# 更新日志
---
## 1.2.0
`2018-12-16`
### 与antd 3.10.x同步

View File

@ -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)
},
}

View File

@ -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)
},
}

View File

@ -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)
},
}

View File

@ -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)
},
}

View File

@ -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'

View File

@ -13,7 +13,9 @@
<section class="code-box-meta markdown">
<slot v-if="isZhCN" name="description"></slot>
<slot v-else name="us-description"></slot>
<span class="btn-toggle" :class="{open: isOpen}" @click="toggle"><i class="anticon anticon-down-circle-o"></i></span>
<span class="btn-toggle" :class="{open: isOpen}" @click="toggle">
<a-icon type="down" />
</span>
</section>
<transition appear :css="false" @enter="enter" @leave="leave">
<section class="highlight-wrapper" style="position: relative;" v-show="isOpen">