Skip to content

Commit b19c8dd

Browse files
committed
style: prettier format
1 parent 9ed7352 commit b19c8dd

File tree

87 files changed

+449
-510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+449
-510
lines changed

antd-tools/getTSCommonConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const assign = require('object-assign');
55
const { getProjectPath } = require('./utils/projectHelper');
66

7-
module.exports = function() {
7+
module.exports = function () {
88
let my = {};
99
if (fs.existsSync(getProjectPath('tsconfig.json'))) {
1010
my = require(getProjectPath('tsconfig.json'));

antd-tools/utils/getChangelog.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
const fs = require('fs');
22

33
module.exports = function getChangelog(file, version) {
4-
const lines = fs
5-
.readFileSync(file)
6-
.toString()
7-
.split('\n');
4+
const lines = fs.readFileSync(file).toString().split('\n');
85
const changeLog = [];
96
const startPattern = new RegExp(`^## ${version}`);
107
const stopPattern = /^## /; // 前一个版本

antd-tools/utils/getRunCmdEnv.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,7 @@ module.exports = function getRunCmdEnv() {
1111
const nodeModulesBinDir = path.join(__dirname, '../../node_modules/.bin');
1212

1313
Object.entries(env)
14-
.filter(
15-
v =>
16-
v
17-
.slice(0, 1)
18-
.pop()
19-
.toLowerCase() === 'path',
20-
)
14+
.filter(v => v.slice(0, 1).pop().toLowerCase() === 'path')
2115
.forEach(v => {
2216
const key = v.slice(0, 1).pop();
2317
env[key] = env[key] ? `${nodeModulesBinDir}:${env[key]}` : nodeModulesBinDir;

antd-tools/utils/projectHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function injectRequire() {
2020
const Module = require('module');
2121

2222
const oriRequire = Module.prototype.require;
23-
Module.prototype.require = function(...args) {
23+
Module.prototype.require = function (...args) {
2424
const moduleName = args[0];
2525
try {
2626
return oriRequire.apply(this, args);

components/affix/index.en-US.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ Please note that Affix should not cover other content on the page, especially wh
3030
**Note:** Children of `Affix` must not have the property `position: absolute`, but you can set `position: absolute` on `Affix` itself:
3131

3232
```html
33-
<a-affix :style="{ position: 'absolute', top: y, left: x}">
34-
...
35-
</a-affix>
33+
<a-affix :style="{ position: 'absolute', top: y, left: x}">...</a-affix>
3634
```
3735

3836
## FAQ

components/affix/index.zh-CN.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ cover: https://gw.alipayobjects.com/zos/alicdn/tX6-md4H6/Affix.svg
2525
### 事件
2626

2727
| 事件名称 | 说明 | 回调参数 | 版本 |
28-
| -------- | ---------------------------- | ----------------- | ---- |
29-
| change | 固定状态改变时触发的回调函数 | Function(affixed) || |
28+
| -------- | ---------------------------- | ----------------- | ---- | --- |
29+
| change | 固定状态改变时触发的回调函数 | Function(affixed) || |
3030

3131
**注意:**`Affix` 内的元素不要使用绝对定位,如需要绝对定位的效果,可以直接设置 `Affix` 为绝对定位:
3232

3333
```html
34-
<a-affix :style="{ position: 'absolute', top: y, left: x}">
35-
...
36-
</a-affix>
34+
<a-affix :style="{ position: 'absolute', top: y, left: x}">...</a-affix>
3735
```
3836

3937
## FAQ

components/anchor/index.en-US.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For displaying anchor hyperlinks on page and jumping between them.
3232
### Events
3333

3434
| Events Name | Description | Arguments | Version |
35-
| --- | --- | --- | --- |
35+
| --- | --- | --- | --- | --- |
3636
| click | set the handler to handle `click` event | Function(e: Event, link: Object) | |
3737
| change | Listening for anchor link change | (currentActiveLink: string) => void | | 1.5.0 |
3838

components/anchor/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/_1-C1JwsC/Anchor.svg
3333
### 事件
3434

3535
| 事件名称 | 说明 | 回调参数 | 版本 |
36-
| -------- | ---------------------- | ----------------------------------- | ---- |
36+
| -------- | ---------------------- | ----------------------------------- | ---- | ----- |
3737
| click | `click` 事件的 handler | Function(e: Event, link: Object) | |
3838
| change | 监听锚点链接改变 | (currentActiveLink: string) => void | | 1.5.0 |
3939

components/badge/index.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ cover: https://gw.alipayobjects.com/zos/antfincdn/6%26GF9WHwvY/Badge.svg
4545
| --- | --- | --- | --- | --- |
4646
| color | 自定义缎带的颜色 | string | - | |
4747
| placement | 缎带的位置,`start``end` 随文字方向(RTL 或 LTR)变动 | `start` \| `end` | `end` | |
48-
| text | 缎带中填入的内容 | string \| VNode \| slot | - | |
48+
| text | 缎带中填入的内容 | string \| VNode \| slot | - | |

components/breadcrumb/index.en-US.md

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ A breadcrumb displays the current location within a hierarchy. It allows going b
2424

2525
### Breadcrumb.Item
2626

27-
| Property | Description | Type | Default | Version |
28-
| --- | --- | --- | --- | --- |
29-
| href | Target of hyperlink | string | - | |
30-
| overlay | The dropdown menu | [Menu](/components/menu) \| () => Menu | - | |
27+
| Property | Description | Type | Default | Version |
28+
| -------- | ------------------- | -------------------------------------- | ------- | ------- |
29+
| href | Target of hyperlink | string | - | |
30+
| overlay | The dropdown menu | [Menu](/components/menu) \| () => Menu | - | |
3131

3232
#### Events
3333

34-
| Events Name | Description | Arguments | Version |
35-
| -------- | -------- | -------------------- | ---- |
36-
| click | handler to handle click event | (e:MouseEvent)=>void | - | 1.5.0 |
34+
| Events Name | Description | Arguments | Version |
35+
| ----------- | ----------------------------- | -------------------- | ------- | ----- |
36+
| click | handler to handle click event | (e:MouseEvent)=>void | - | 1.5.0 |
3737

3838
### Breadcrumb.Separator `1.5.0`
3939

40-
| Property | Description | Type | Default | Version |
41-
| -------- | ---------------- | --------- | ------- | ------- |
42-
| - | - | - | - | - |
40+
| Property | Description | Type | Default | Version |
41+
| -------- | ----------- | ---- | ------- | ------- |
42+
| - | - | - | - | - |
4343

4444
> When using `Breadcrumb.Separator`,its parent component must be set to `separator=""`, otherwise the default separator of the parent component will appear.
4545
@@ -64,59 +64,55 @@ The link of Breadcrumb item targets `#` by default, you can use `itemRender` to
6464
<template>
6565
<a-breadcrumb :routes="routes">
6666
<template #itemRender="{ route, params, routes, paths }">
67-
<span v-if="routes.indexOf(route) === routes.length - 1">
68-
{{route.breadcrumbName}}
69-
</span>
70-
<router-link v-else :to="paths.join('/')">
71-
{{route.breadcrumbName}}
72-
</router-link>
67+
<span v-if="routes.indexOf(route) === routes.length - 1">{{route.breadcrumbName}}</span>
68+
<router-link v-else :to="paths.join('/')">{{route.breadcrumbName}}</router-link>
7369
</template>
7470
</a-breadcrumb>
7571
</template>
7672
<script lang="ts">
77-
import { defineComponent, ref } from 'vue';
78-
interface Route {
79-
path: string;
80-
breadcrumbName: string;
81-
children?: Array<{
73+
import { defineComponent, ref } from 'vue';
74+
interface Route {
8275
path: string;
8376
breadcrumbName: string;
84-
}>;
85-
}
86-
export default defineComponent({
87-
setup () {
88-
const routes = ref<Route[]>([
89-
{
90-
path: 'index',
91-
breadcrumbName: 'home',
92-
},
93-
{
94-
path: 'first',
95-
breadcrumbName: 'first',
96-
children: [
97-
{
98-
path: '/general',
99-
breadcrumbName: 'General',
100-
},
101-
{
102-
path: '/layout',
103-
breadcrumbName: 'Layout',
104-
},
105-
{
106-
path: '/navigation',
107-
breadcrumbName: 'Navigation',
108-
},
109-
],
110-
},
111-
{
112-
path: 'second',
113-
breadcrumbName: 'second',
114-
},
115-
]);
116-
return {
117-
routes,
118-
}
77+
children?: Array<{
78+
path: string;
79+
breadcrumbName: string;
80+
}>;
11981
}
120-
});
82+
export default defineComponent({
83+
setup() {
84+
const routes = ref<Route[]>([
85+
{
86+
path: 'index',
87+
breadcrumbName: 'home',
88+
},
89+
{
90+
path: 'first',
91+
breadcrumbName: 'first',
92+
children: [
93+
{
94+
path: '/general',
95+
breadcrumbName: 'General',
96+
},
97+
{
98+
path: '/layout',
99+
breadcrumbName: 'Layout',
100+
},
101+
{
102+
path: '/navigation',
103+
breadcrumbName: 'Navigation',
104+
},
105+
],
106+
},
107+
{
108+
path: 'second',
109+
breadcrumbName: 'second',
110+
},
111+
]);
112+
return {
113+
routes,
114+
};
115+
},
116+
});
121117
</script>
122118
```

0 commit comments

Comments
 (0)