Skip to content

Commit 76066d3

Browse files
author
范文杰
committed
Fix conflict from ElemeFE#15452
# Conflicts: # packages/image/src/main.vue
2 parents aa6c651 + 107b831 commit 76066d3

File tree

13 files changed

+50
-22
lines changed

13 files changed

+50
-22
lines changed

build/bin/new.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if (!process.argv[2]) {
1111
}
1212

1313
const path = require('path');
14+
const fs = require('fs');
1415
const fileSave = require('file-save');
1516
const uppercamelcase = require('uppercamelcase');
1617
const componentname = process.argv[2];
@@ -104,6 +105,29 @@ fileSave(path.join(__dirname, '../../components.json'))
104105
.write(JSON.stringify(componentsFile, null, ' '), 'utf8')
105106
.end('\n');
106107

108+
// 添加到 index.scss
109+
const sassPath = path.join(__dirname, '../../packages/theme-chalk/src/index.scss');
110+
const sassImportText = `${fs.readFileSync(sassPath)}@import "./${componentname}.scss";`;
111+
fileSave(sassPath)
112+
.write(sassImportText, 'utf8')
113+
.end('\n');
114+
115+
// 添加到 element-ui.d.ts
116+
const elementTsPath = path.join(__dirname, '../../types/element-ui.d.ts');
117+
118+
let elementTsText = `${fs.readFileSync(elementTsPath)}
119+
/** ${ComponentName} Component */
120+
export class ${ComponentName} extends El${ComponentName} {}`;
121+
122+
const index = elementTsText.indexOf('export') - 1;
123+
const importString = `import { El${ComponentName} } from './${componentname}'`;
124+
125+
elementTsText = elementTsText.slice(0, index) + importString + '\n' + elementTsText.slice(index);
126+
127+
fileSave(elementTsPath)
128+
.write(elementTsText, 'utf8')
129+
.end('\n');
130+
107131
// 创建 package
108132
Files.forEach(file => {
109133
fileSave(path.join(PackagePath, file.filename))

examples/docs/en-US/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ Besides the native features of img, support lazy load, custom placeholder and lo
114114
| src | Image source, same as native | string || - |
115115
| fit | Indicate how the image should be resized to fit its container, same as [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - |
116116
| alt | Native alt | string | - | - |
117+
| referrer-policy | Native referrerPolicy | string | - | - |
117118
| lazy | Whether to use lazy load | boolean || false |
118119
| scroll-container | The container to add scroll listener when using lazy load | string / HTMLElement || The nearest parent container whose overflow property is auto or scroll |
119120

examples/docs/en-US/progress.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ In this case the percentage takes no additional space.
3737
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
3838
<el-progress type="circle" :percentage="100" status="success"></el-progress>
3939
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
40-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
41-
```
40+
```
4241
:::
4342

4443
### Attributes
@@ -48,7 +47,7 @@ In this case the percentage takes no additional space.
4847
| type | the type of progress bar | string | line/circle | line |
4948
| stroke-width | the width of progress bar | number || 6 |
5049
| text-inside | whether to place the percentage inside progress bar, only works when `type` is 'line' | boolean || false |
51-
| status | the current status of progress bar | string | success/exception/text ||
50+
| status | the current status of progress bar | string | success/exception ||
5251
| color | background color of progress bar. Overrides `status` prop | string |||
5352
| width | the canvas width of circle progress bar | number || 126 |
5453
| show-text | whether to show percentage | boolean || true |

examples/docs/es/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ Además de las características nativas de img, soporte de carga perezosa, marca
116116
| src | origen de la imagen, igual que en nativo | string || - |
117117
| fit | Indica como la imagen debe adaptarse al contenendor, lo mismo que [object-fit](https://developer.mozilla.org/es/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - |
118118
| alt | alt nativo | string | - | - |
119+
| referrer-policy | referrerPolicy nativo | string | - | - |
119120
| lazy | si se usara lazy load | boolean || false |
120121
| scroll-container | El contenedor para añadir el scroll listener cuando se utiliza lazy load | string / HTMLElement || El contenedor padre más cercano cuya propiedad de desbordamiento es auto o scroll |
121122

examples/docs/es/progress.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ En este caso el porcentage no toma espacio adicional.
3535
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
3636
<el-progress type="circle" :percentage="100" status="success"></el-progress>
3737
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
38-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
3938
```
4039
:::
4140

@@ -46,7 +45,7 @@ En este caso el porcentage no toma espacio adicional.
4645
| type | tipo de barra de progreso | string | line/circle | line |
4746
| stroke-width | ancho de la barra de progreso | number || 6 |
4847
| text-inside | mostrar el porcentaje dentro de la barra de progreso, solo funciona cuando `type` es 'line' | boolean || false |
49-
| status | estado actual de la barra de progreso | string | success/exception/text ||
48+
| status | estado actual de la barra de progreso | string | success/exception ||
5049
| color | color de fondo de la barra de progreso. Sobreescribe la propiedad `status` | string |||
5150
| width | ancho del canvas que contiene la barra de progreso circula | number || 126 |
5251
| show-text | mostrar porcentaje | boolean || true |

examples/docs/fr-FR/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ En plus des propriétés natives de img, ce composant supporte le lazy loading,
115115
| src | Source de l'image, identique au natif. | string || - |
116116
| fit | Indique comment l'image devrait être redimmensionnée pour s'adapter à son conteneur, identique à [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - |
117117
| alt | Attribut alt natif.| string | - | - |
118+
| referrer-policy | Attribut referrerPolicy natif.| string | - | - |
118119
| lazy | Si le lazy loading doit être utilisé. | boolean || false |
119120
| scroll-container | Le conteneur auquel ajouter le listener du scroll en mode lazy loading. | string / HTMLElement || Le conteneur parent le plus proche avec la propriété overflow à auto ou scroll. |
120121

examples/docs/zh-CN/image.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
| src | 图片源,同原生 | string || - |
115115
| fit | 确定图片如何适应容器框,同原生 [object-fit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) | string | fill / contain / cover / none / scale-down | - |
116116
| alt | 原生 alt | string | - | - |
117+
| referrer-policy | 原生 referrerPolicy | string | - | - |
117118
| lazy | 是否开启懒加载 | boolean || false |
118119
| scroll-container | 开启懒加载后,监听 scroll 事件的容器 | string / HTMLElement || 最近一个 overflow 值为 auto 或 scroll 的父元素 |
119120

examples/docs/zh-CN/progress.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<el-progress type="circle" :percentage="80" color="#8e71c7"></el-progress>
4141
<el-progress type="circle" :percentage="100" status="success"></el-progress>
4242
<el-progress type="circle" :percentage="50" status="exception"></el-progress>
43-
<el-progress type="circle" :percentage="100" status="text">Done</el-progress>
4443
```
4544
:::
4645

@@ -51,7 +50,7 @@
5150
| type | 进度条类型 | string | line/circle | line |
5251
| stroke-width | 进度条的宽度,单位 px | number || 6 |
5352
| text-inside | 进度条显示文字内置在进度条内(只在 type=line 时可用) | boolean || false |
54-
| status | 进度条当前状态 | string | success/exception/text ||
53+
| status | 进度条当前状态 | string | success/exception ||
5554
| color | 进度条背景色(会覆盖 status 状态颜色) | string |||
5655
| width | 环形进度条画布宽度(只在 type=circle 时可用) | number | | 126 |
5756
| show-text | 是否显示进度条文字内容 | boolean || true |

packages/progress/src/progress.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
<path class="el-progress-circle__path" :d="trackPath" stroke-linecap="round" :stroke="stroke" :stroke-width="relativeStrokeWidth" fill="none" :style="circlePathStyle"></path>
2828
</svg>
2929
</div>
30-
<div class="el-progress__text" v-if="showText && !textInside" :style="{fontSize: progressTextSize + 'px'}">
30+
<div
31+
class="el-progress__text"
32+
v-if="showText && !textInside"
33+
:style="{fontSize: progressTextSize + 'px'}"
34+
>
3135
<template v-if="!status">{{percentage}}%</template>
32-
<template v-else>
33-
<slot v-if="status === 'text'"></slot>
34-
<i v-else :class="iconClass"></i>
35-
</template>
36+
<i v-else :class="iconClass"></i>
3637
</div>
3738
</div>
3839
</template>
@@ -52,8 +53,7 @@
5253
validator: val => val >= 0 && val <= 100
5354
},
5455
status: {
55-
type: String,
56-
validator: val => ['text', 'success', 'exception'].indexOf(val) > -1
56+
type: String
5757
},
5858
strokeWidth: {
5959
type: Number,

packages/theme-chalk/src/tabs.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,13 @@
266266

267267
&.el-tabs--border-card, &.el-tabs--card,
268268
.el-tabs--left, .el-tabs--right {
269-
.el-tabs__item:nth-child(2) {
270-
padding-left: 20px;
271-
}
272-
.el-tabs__item:last-child {
273-
padding-right: 20px;
269+
> .el-tabs__header {
270+
.el-tabs__item:nth-child(2) {
271+
padding-left: 20px;
272+
}
273+
.el-tabs__item:last-child {
274+
padding-right: 20px;
275+
}
274276
}
275277
}
276278
}

0 commit comments

Comments
 (0)