🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
OTHER License
Bot releases are hidden (Show)
Published by tangjinzhou almost 4 years ago
2020-12-10
Published by tangjinzhou almost 4 years ago
2020-11-24
Published by tangjinzhou almost 4 years ago
2020-11-14
Published by tangjinzhou almost 4 years ago
2020-11-08
Published by tangjinzhou almost 4 years ago
Published by tangjinzhou almost 4 years ago
Published by tangjinzhou almost 4 years ago
Published by tangjinzhou almost 4 years ago
2020-10-30
Published by tangjinzhou almost 4 years ago
2020-10-28
Published by tangjinzhou about 4 years ago
2020-09-24
Published by tangjinzhou about 4 years ago
Published by tangjinzhou about 4 years ago
2020-8-31
Published by tangjinzhou about 4 years ago
Modal
afterClose twiceModal
afterClose 调用两次的问题Published by tangjinzhou about 4 years ago
Space
component.List.Meta
registration failure problem 03a42a
Button
is not vertically centered bd71e3
Tabs
multiple departure change
event issue 8ed937
Published by tangjinzhou about 4 years ago
1.5
(21px
) to 1.5715
(22px
).4px
to 2px
.#E8E8E8
to #F0F0F0
.Removed LocaleProvider, please use ConfigProvider
instead.
Removed the afterClose property of Tag.
Merged FormModel and Form, see the Form refactoring part below for details.
tabIndex
, maxLength
, readOnly
, autoComplete
, autoFocus
are changed to all lowercase.
In order to use the slot more friendly in template syntax, all related to xxxRender, renderXxxx are changed to single parameter, involving itemRender
, renderItem
, customRender
, dropdownRender
, dateCellRender
, dateFullCellRender
, monthCellRender
, monthFullCellRender
, renderTabBar
.
All the places where scopedSlots are configured are changed to slots.
{ on, props, attrs, ... }
configuration is flattened, such as { props: {type:'xxx'}, on: {click: this.handleClick}}
changed to { type: 'xxx', onClick: this.handleClick }
, related fields: okButtonProps
, cancelButtonProps
.
Change xxx.sync to v-model:xxx
v-model is changed to v-model:xxx, which specifically involves components:
In [email protected]
, we introduced the svg icon (Why use the svg icon?). The icon API that uses string naming cannot be loaded on demand, so the svg icon file is fully introduced, which greatly increases the size of the packaged product. In 2.0, we adjusted the icon usage API to support tree shaking, reducing the default package size by approximately 150 KB (Gzipped).
The old way of using Icon will be obsolete:
<a-icon type="smile" /> <a-button icon="smile" />
In 2.0, an on-demand introduction method will be adopted:
<template>
<smile-outlined />
<a-button>
<template v-slot:icon><smile-outlined /></template>
</a-buttom>
</template>
<script>
import SmileOutlined from'@ant-design/icons/SmileOutlined';
export default {
components: {
SmileOutlined
}
}
</script>
In 1.x, we provide two form components, Form and FormModel. The original Form component uses v-decorator for data binding. In Vue2, we use context to force update components. However, in Vue3, due to the introduction of patchFlag, etc. Optimization method, forced refresh will destroy the performance advantage brought by patchFlag. So in version 2.0, we merged Form and FormModel, retained the use of FormModel, enriched related functions, and renamed it to Form.
Involving changes:
scrollToFirstError
, name
, validateTrigger
properties for Form, added finish
, finishFailed
events, and added scrollToField
method.validateFirst
, validateTrigger
, and discards the prop
attribute, and replaces it with name
.// v1
validateFields((err, value) => {
if (!err) {
// Do something with value
}
});
Change to
// v2
validateFields().then(values => {
// Do something with value
});
2020-08-14
1.5
(21px
) 调整为 1.5715
(22px
)。4px
改为 2px
。#E8E8E8
改为 #F0F0F0
。移除了 LocaleProvider,请使用 ConfigProvider
替代。
移除了 Tag 的 afterClose 属性。
合并了 FormModel、Form,详见下方的 Form 重构部分。
tabIndex
、maxLength
、readOnly
、autoComplete
、autoFocus
更改为全小写。
为了在 template 语法中更友好的使用插槽,所有涉及到 xxxRender, renderXxxx 的均改成单参数,涉及到 itemRender
、renderItem
、customRender
、dropdownRender
、dateCellRender
、dateFullCellRender
、monthCellRender
、monthFullCellRender
、renderTabBar
。
所有配置 scopedSlots 的地方统一改成 slots。
{ on, props, attrs, ... }
配置进行扁平化处理,如 { props: {type: 'xxx'}, on: {click: this.handleClick}}
改成 { type: 'xxx', onClick: this.handleClick }
, 涉及相关字段:okButtonProps
、cancelButtonProps
。
xxx.sync 改成 v-model:xxx
v-model 更改成 v-model:xxx,具体涉及组件:
在 [email protected]
中,我们引入了 svg 图标(为何使用 svg 图标?)。使用了字符串命名的图标 API 无法做到按需加载,因而全量引入了 svg 图标文件,这大大增加了打包产物的尺寸。在 2.0 中,我们调整了图标的使用 API 从而支持 tree shaking,减少默认包体积约 150 KB(Gzipped)。
旧版 Icon 使用方式将被废弃:
<a-icon type="smile" /> <a-button icon="smile" />
2.0 中会采用按需引入的方式:
<template>
<smile-outlined />
<a-button>
<template v-slot:icon><smile-outlined /></template>
</a-buttom>
</template>
<script>
import SmileOutlined from '@ant-design/icons/SmileOutlined';
export default {
components: {
SmileOutlined
}
}
</script>
在 1.x 中我们提供了 Form、FormModel 两个表单组件,原有的 Form 组件使用 v-decorator 进行数据绑定,在 Vue2 中我们通过上下文进行强制更新组件,但是在 Vue3 中,由于引入 patchFlag 等优化方式,强制刷新会破坏 patchFlag 带来的性能优势。所以在 2.0 版本中我们将 Form、FormModel 进行合并,保留了 FormModel 的使用方式,丰富了相关功能,并改名成 Form。
涉及改动:
scrollToFirstError
,name
,validateTrigger
属性,新增 finish
、finishFailed
事件,新增 scrollToField
方法。validateFirst
, validateTrigger
, 废弃 prop
属性,使用 name
替换。// v1
validateFields((err, value) => {
if (!err) {
// Do something with value
}
});
改成
// v2
validateFields().then(values => {
// Do something with value
});
Published by tangjinzhou about 4 years ago
2020-08-25
Breadcrumb
repeated key problem #2505
2020-08-25
Published by tangjinzhou over 4 years ago
2020-7-21
Breadcrumb
duplicate key problem #2505
Published by tangjinzhou over 4 years ago
2020-07-05
Breadcrumb
has the same name #2505
Published by tangjinzhou over 4 years ago
2020-5-25