Skip to content

Commit 6222e43

Browse files
committed
release 3.1.0
1 parent 272430b commit 6222e43

File tree

10 files changed

+85
-26
lines changed

10 files changed

+85
-26
lines changed

CHANGELOG.en-US.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

1111
---
1212

13+
## 3.1.0
14+
15+
`2022-04-06`
16+
17+
### 🔥🔥🔥 3.1.0 official version released 🔥🔥🔥
18+
19+
- 🐞 Fix `Select.Option` child element is empty, the error is reported [272430](https://github.com/vueComponent/ant-design-vue/commit/272430ba06e44e06eb07694d6aef4d474fb741cb)
20+
1321
## 3.1.0-rc.6
1422

1523
`2022-04-01`

CHANGELOG.zh-CN.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

1111
---
1212

13+
## 3.1.0
14+
15+
`2022-04-06`
16+
17+
### 🔥🔥🔥 3.1.0 正式版发布 🔥🔥🔥
18+
19+
- 🐞 修复 `Select.Option` 子元素为空的时候,报错问题 [272430](https://github.com/vueComponent/ant-design-vue/commit/272430ba06e44e06eb07694d6aef4d474fb741cb)
20+
1321
## 3.1.0-rc.6
1422

1523
`2022-04-01`

site/404.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
}
5151
</style>
5252
<script>
53+
if (
54+
location.host === 'ant-design-vue.gitee.io' ||
55+
location.host === 'vue.ant.design' ||
56+
location.host === 'next.antdv.com'
57+
) {
58+
location.replace(location.href.replace(location.host, 'www.antdv.com'));
59+
}
5360
var _hmt = _hmt || [];
5461
var srcMap = {
5562
'ant-design-vue.gitee.io': 'https://hm.baidu.com/hm.js?1e30265f06f76fabfcdb7ed272017441',

site/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
}
2424
</style>
2525
<script>
26-
if (location.host === 'ant-design-vue.gitee.io' || location.host === 'vue.ant.design') {
26+
if (
27+
location.host === 'ant-design-vue.gitee.io' ||
28+
location.host === 'vue.ant.design' ||
29+
location.host === 'next.antdv.com'
30+
) {
2731
location.replace(location.href.replace(location.host, 'www.antdv.com'));
2832
}
2933
var _hmt = _hmt || [];

site/src/layouts/header/Menu.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
key="version"
99
class="version"
1010
size="small"
11+
:dropdown-match-select-width="false"
1112
:default-value="antdVersion"
12-
:get-popup-container="trigger => trigger.parentNode"
1313
>
1414
<a-select-option :value="antdVersion">{{ antdVersion }}</a-select-option>
15-
<a-select-option value="1.x" @click="changeVersion">1.x</a-select-option>
15+
<a-select-option value="2.x" @click="changeVersion('2x')">
16+
2.x (Not Recommended)
17+
</a-select-option>
18+
<a-select-option value="1.x" @click="changeVersion('1x')">1.x (For Vue 2)</a-select-option>
1619
</a-select>
1720
<a-button
1821
key="lang-button"
@@ -66,8 +69,8 @@ export default defineComponent({
6669
);
6770
};
6871
69-
const changeVersion = () => {
70-
location.href = `https://1x.antdv.com${route.fullPath}`;
72+
const changeVersion = v => {
73+
location.href = `https://${v}.antdv.com${route.fullPath}`;
7174
};
7275
return {
7376
onLangChange,

site/src/layouts/header/index.vue

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616

1717
<CloseOutlined class="close-icon" @click="visibleAdblockBanner = false" />
1818
</div>
19+
<div v-if="visibleAlertBanner" class="alert-banner">
20+
<template v-if="isZhCN">
21+
Ant Design Vue 3 已正式发布,并成为默认文档。
22+
<a href="https://www.antdv.com/docs/vue/migration-v3-cn">升级文档</a>
23+
</template>
24+
<template v-else>
25+
Ant Design Vue 3 is now the new default version!
26+
<a href="https://www.antdv.com/docs/vue/migration-v3">Update Doc</a>
27+
</template>
28+
29+
<CloseOutlined class="close-icon" @click="visibleAlertBanner = false" />
30+
</div>
1931
<a-popover
2032
v-model:visible="menuVisible"
2133
overlay-class-name="popover-menu"
@@ -54,6 +66,7 @@ import Logo from './Logo.vue';
5466
import Menu from './Menu.vue';
5567
import { UnorderedListOutlined, CloseOutlined } from '@ant-design/icons-vue';
5668
import SearchBox from './SearchBox.vue';
69+
import { version } from 'ant-design-vue';
5770
export default defineComponent({
5871
components: {
5972
Logo,
@@ -121,6 +134,12 @@ export default defineComponent({
121134
watch(globalConfig?.blocked, val => {
122135
visibleAdblockBanner.value = val;
123136
});
137+
const visibleAlertBanner = ref(!localStorage.getItem('v3'));
138+
watch(visibleAlertBanner, () => {
139+
if (!visibleAlertBanner.value) {
140+
localStorage.setItem('v3', version);
141+
}
142+
});
124143
return {
125144
isZhCN: globalConfig.isZhCN,
126145
isMobile: globalConfig.isMobile,
@@ -134,13 +153,15 @@ export default defineComponent({
134153
colProps,
135154
menuVisible,
136155
onTriggerSearching,
156+
visibleAlertBanner,
137157
};
138158
},
139159
});
140160
</script>
141161
<style lang="less" src="./index.less"></style>
142162
<style scope>
143-
.adblock-banner {
163+
.adblock-banner,
164+
.alert-banner {
144165
position: relative;
145166
z-index: 100;
146167
min-width: 1000px;
@@ -150,6 +171,18 @@ export default defineComponent({
150171
text-align: center;
151172
background-color: #ebebeb;
152173
}
174+
.alert-banner {
175+
background-color: var(--ant-primary-color);
176+
color: #fff;
177+
padding: 5px;
178+
}
179+
.alert-banner a {
180+
color: #fff;
181+
text-decoration: underline;
182+
}
183+
.alert-banner .close-icon {
184+
top: 12px;
185+
}
153186
.close-icon {
154187
position: absolute;
155188
top: 15px;

site/src/vueDocs/getting-started.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ And, setup your vue project configuration.
3737
#### Install
3838

3939
```bash
40-
$ npm i --save ant-design-vue@next
40+
$ npm i --save ant-design-vue
4141
```
4242

4343
#### Component Registration

site/src/vueDocs/getting-started.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ $ vue create antd-demo
3939
#### 安装
4040

4141
```bash
42-
$ npm i --save ant-design-vue@next
42+
$ npm i --save ant-design-vue
4343
```
4444

4545
#### 注册

site/src/vueDocs/introduce.en-US.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Following the Ant Design specification, we developed a Vue UI library `antd` tha
3838

3939
## Version
4040

41-
- Stable: [![npm package](https://img.shields.io/npm/v/ant-design-vue/next.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue)
41+
- Stable: [![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue)
4242

4343
You can subscribe to this feed for new version notifications: https://github.com/vueComponent/ant-design-vue/releases.atom
4444

@@ -49,11 +49,11 @@ You can subscribe to this feed for new version notifications: https://github.com
4949
**We recommend using npm or yarn to install**,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
5050

5151
```bash
52-
$ npm install ant-design-vue@next --save
52+
$ npm install ant-design-vue --save
5353
```
5454

5555
```bash
56-
$ yarn add ant-design-vue@next
56+
$ yarn add ant-design-vue
5757
```
5858

5959
If you are in a bad network environment,you can try other registries and tools like [cnpm](https://github.com/cnpm/cnpm).
@@ -115,16 +115,14 @@ import 'ant-design-vue/dist/antd.css'; // or 'ant-design-vue/dist/antd.less'
115115

116116
```js
117117
// vite.config.js
118-
import Components from 'unplugin-vue-components/vite'
119-
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
120-
118+
import Components from 'unplugin-vue-components/vite';
119+
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
120+
121121
export default {
122122
plugins: [
123123
/* ... */
124124
Components({
125-
resolvers: [
126-
AntDesignVueResolver(),
127-
],
125+
resolvers: [AntDesignVueResolver()],
128126
}),
129127
],
130128
};

site/src/vueDocs/introduce.zh-CN.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
## 版本
4040

41-
- 稳定版:[![npm package](https://img.shields.io/npm/v/ant-design-vue/next.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue)
41+
- 稳定版:[![npm package](https://img.shields.io/npm/v/ant-design-vue.svg?style=flat-square)](https://www.npmjs.org/package/ant-design-vue)
4242

4343
你可以订阅:https://github.com/vueComponent/ant-design-vue/releases.atom 来获得稳定版发布的通知。
4444

@@ -49,11 +49,11 @@
4949
**我们推荐使用 npm 或 yarn 的方式进行开发**,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。
5050

5151
```bash
52-
$ npm install ant-design-vue@next --save
52+
$ npm install ant-design-vue --save
5353
```
5454

5555
```bash
56-
$ yarn add ant-design-vue@next
56+
$ yarn add ant-design-vue
5757
```
5858

5959
如果你的网络环境不佳,推荐使用 [cnpm](https://github.com/cnpm/cnpm)
@@ -117,16 +117,14 @@ import 'ant-design-vue/dist/antd.css'; // or 'ant-design-vue/dist/antd.less'
117117

118118
```js
119119
// vite.config.js
120-
import Components from 'unplugin-vue-components/vite'
121-
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers'
122-
120+
import Components from 'unplugin-vue-components/vite';
121+
import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
122+
123123
export default {
124124
plugins: [
125125
/* ... */
126126
Components({
127-
resolvers: [
128-
AntDesignVueResolver(),
129-
],
127+
resolvers: [AntDesignVueResolver()],
130128
}),
131129
],
132130
};

0 commit comments

Comments
 (0)