mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4efaa3d87 | ||
|
|
6569ae2738 | ||
|
|
9eb0a3d55a | ||
|
|
188605c383 |
@@ -1,5 +1,26 @@
|
||||
## Changelog
|
||||
|
||||
### 2.15.0
|
||||
|
||||
*2021-01-15*
|
||||
|
||||
#### Bug fixes
|
||||
|
||||
- Select
|
||||
- Fix placeholder i18n bug (#17644 by @nzh63)
|
||||
- Popconfirm
|
||||
- Popconfirm i18n bug by @iamkun)
|
||||
- Drawer
|
||||
- Fix focus bug (#20626 by @cs1707)
|
||||
- Image
|
||||
- Preview optimization (#20652 by @cs1707)
|
||||
|
||||
#### Optimization
|
||||
|
||||
- Doc
|
||||
- Fix typo in french translation of datetime-picker.md (#20543 by @lonk)
|
||||
- Add format attribute description to the progress component (#20641 by @cs1707)
|
||||
|
||||
### 2.14.1
|
||||
|
||||
*2020-11-11*
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
## Changelog
|
||||
### 2.15.0
|
||||
|
||||
*2021-01-15*
|
||||
|
||||
#### Bug fixes
|
||||
|
||||
- Select
|
||||
- Fix placeholder i18n bug (#17644 by @nzh63)
|
||||
- Popconfirm
|
||||
- Popconfirm i18n bug by @iamkun
|
||||
- Drawer
|
||||
- Fix focus bug (#20626 by @cs1707)
|
||||
- Image
|
||||
- Preview optimization (#20652 by @cs1707)
|
||||
|
||||
#### Optimization
|
||||
|
||||
- Doc
|
||||
- Fix typo in french translation of datetime-picker.md (#20543 by @lonk)
|
||||
- Add format attribute description to the progress component (#20641 by @cs1707)
|
||||
|
||||
### 2.14.1
|
||||
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
## Changelog
|
||||
|
||||
### 2.15.0
|
||||
|
||||
*2021-01-15*
|
||||
|
||||
#### Bug fixes
|
||||
|
||||
- Select
|
||||
- Fix placeholder i18n bug (#17644 by @nzh63)
|
||||
- Popconfirm
|
||||
- Popconfirm i18n bug by @iamkun
|
||||
- Drawer
|
||||
- Fix focus bug (#20626 by @cs1707)
|
||||
- Image
|
||||
- Preview optimization (#20652 by @cs1707)
|
||||
|
||||
#### Optimization
|
||||
|
||||
- Doc
|
||||
- Fix typo in french translation of datetime-picker.md (#20543 by @lonk)
|
||||
- Add format attribute description to the progress component (#20641 by @cs1707)
|
||||
|
||||
### 2.14.1
|
||||
|
||||
*2020-11-11*
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
## 更新日志
|
||||
|
||||
### 2.15.0
|
||||
|
||||
*2021-01-15*
|
||||
|
||||
#### Bug 修复
|
||||
|
||||
- Select
|
||||
- 修复 placeholder 国际化 bug (#17644 by @nzh63)
|
||||
- Popconfirm
|
||||
- 修复 Popconfirm 国际化 bug by @iamkun
|
||||
- Drawer
|
||||
- 修复 focus bug (#20626 by @cs1707)
|
||||
- Image
|
||||
- 图片预览优化 (#20652 by @cs1707)
|
||||
|
||||
#### 优化
|
||||
|
||||
- Doc
|
||||
- 更新法语文档 datetime-picker.md (#20543 by @lonk)
|
||||
- 更新 Progress 组件文档 (#20641 by @cs1707)
|
||||
|
||||
### 2.14.1
|
||||
|
||||
*2020-11-11*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var version = process.env.VERSION || require('../../package.json').version;
|
||||
var content = { '1.4.13': '1.4', '2.0.11': '2.0', '2.1.0': '2.1', '2.2.2': '2.2', '2.3.9': '2.3', '2.4.11': '2.4', '2.5.4': '2.5', '2.6.3': '2.6', '2.7.2': '2.7', '2.8.2': '2.8', '2.9.2': '2.9', '2.10.1': '2.10', '2.11.1': '2.11', '2.12.0': '2.12', '2.13.2': '2.13' };
|
||||
if (!content[version]) content[version] = '2.14';
|
||||
var content = { '1.4.13': '1.4', '2.0.11': '2.0', '2.1.0': '2.1', '2.2.2': '2.2', '2.3.9': '2.3', '2.4.11': '2.4', '2.5.4': '2.5', '2.6.3': '2.6', '2.7.2': '2.7', '2.8.2': '2.8', '2.9.2': '2.9', '2.10.1': '2.10', '2.11.1': '2.11', '2.12.0': '2.12', '2.13.2': '2.13', '2.14.1': '2.14' };
|
||||
if (!content[version]) content[version] = '2.15';
|
||||
fs.writeFileSync(path.resolve(__dirname, '../../examples/versions.json'), JSON.stringify(content));
|
||||
|
||||
@@ -40,7 +40,7 @@ if [ "$TRAVIS_TAG" ]; then
|
||||
# build sub folder
|
||||
echo $TRAVIS_TAG
|
||||
|
||||
SUB_FOLDER='2.14'
|
||||
SUB_FOLDER='2.15'
|
||||
mkdir $SUB_FOLDER
|
||||
rm -rf *.js *.css *.map static
|
||||
rm -rf $SUB_FOLDER/**
|
||||
|
||||
@@ -6,7 +6,7 @@ cd temp_web
|
||||
git clone --depth 1 -b gh-pages --single-branch https://github.com/ElemeFE/element.git && cd element
|
||||
|
||||
# build sub folder
|
||||
SUB_FOLDER='2.14'
|
||||
SUB_FOLDER='2.15'
|
||||
mkdir -p $SUB_FOLDER
|
||||
rm -rf *.js *.css *.map static
|
||||
rm -rf $SUB_FOLDER/**
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14"}
|
||||
{"1.4.13":"1.4","2.0.11":"2.0","2.1.0":"2.1","2.2.2":"2.2","2.3.9":"2.3","2.4.11":"2.4","2.5.4":"2.5","2.6.3":"2.6","2.7.2":"2.7","2.8.2":"2.8","2.9.2":"2.9","2.10.1":"2.10","2.11.1":"2.11","2.12.0":"2.12","2.13.2":"2.13","2.14.1":"2.14","2.15.0":"2.15"}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-ui",
|
||||
"version": "2.14.1",
|
||||
"version": "2.15.0",
|
||||
"description": "A Component Library for Vue.js.",
|
||||
"main": "lib/element-ui.common.js",
|
||||
"files": [
|
||||
@@ -25,7 +25,7 @@
|
||||
"dist": "npm run clean && npm run build:file && npm run lint && webpack --config build/webpack.conf.js && webpack --config build/webpack.common.js && webpack --config build/webpack.component.js && npm run build:utils && npm run build:umd && npm run build:theme",
|
||||
"i18n": "node build/bin/i18n.js",
|
||||
"lint": "eslint src/**/* test/**/* packages/**/* build/**/* --quiet",
|
||||
"pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && node build/bin/gen-indices.js && sh build/deploy-faas.sh",
|
||||
"pub": "npm run bootstrap && sh build/git-release.sh && sh build/release.sh && node build/bin/gen-indices.js",
|
||||
"test": "npm run lint && npm run build:theme && cross-env CI_ENV=/dev/ BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
|
||||
"test:watch": "npm run build:theme && cross-env BABEL_ENV=test karma start test/unit/karma.conf.js"
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<transition name="viewer-fade">
|
||||
<div tabindex="-1" ref="el-image-viewer__wrapper" class="el-image-viewer__wrapper" :style="{ 'z-index': zIndex }">
|
||||
<div class="el-image-viewer__mask"></div>
|
||||
<div class="el-image-viewer__mask" @click.self="handleMaskClick"></div>
|
||||
<!-- CLOSE -->
|
||||
<span class="el-image-viewer__btn el-image-viewer__close" @click="hide">
|
||||
<i class="el-icon-circle-close"></i>
|
||||
<i class="el-icon-close"></i>
|
||||
</span>
|
||||
<!-- ARROW -->
|
||||
<template v-if="!isSingle">
|
||||
@@ -91,6 +91,14 @@ export default {
|
||||
initialIndex: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
appendToBody: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
maskClosable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -235,6 +243,11 @@ export default {
|
||||
|
||||
e.preventDefault();
|
||||
},
|
||||
handleMaskClick() {
|
||||
if (this.maskClosable) {
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
reset() {
|
||||
this.transform = {
|
||||
scale: 1,
|
||||
@@ -294,9 +307,18 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.deviceSupportInstall();
|
||||
if (this.appendToBody) {
|
||||
document.body.appendChild(this.$el);
|
||||
}
|
||||
// add tabindex then wrapper can be focusable via Javascript
|
||||
// focus wrapper so arrow key can't cause inner scroll behavior underneath
|
||||
this.$refs['el-image-viewer__wrapper'].focus();
|
||||
},
|
||||
destroyed() {
|
||||
// if appendToBody is true, remove DOM node after destroy
|
||||
if (this.appendToBody && this.$el && this.$el.parentNode) {
|
||||
this.$el.parentNode.removeChild(this.$el);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -84,10 +84,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
displayConfirmButtonText() {
|
||||
return this.confirmButtonText || t('el.popconfirm.confirmButtonText')
|
||||
return this.confirmButtonText || t('el.popconfirm.confirmButtonText');
|
||||
},
|
||||
displayCancelButtonText() {
|
||||
return this.cancelButtonText || t('el.popconfirm.cancelButtonText')
|
||||
return this.cancelButtonText || t('el.popconfirm.cancelButtonText');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "element-theme-chalk",
|
||||
"version": "2.14.1",
|
||||
"version": "2.15.0",
|
||||
"description": "Element component chalk theme.",
|
||||
"main": "lib/index.css",
|
||||
"style": "lib/index.css",
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
right: 40px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 40px;
|
||||
font-size: 24px;
|
||||
color: #fff;
|
||||
background-color: #606266;
|
||||
}
|
||||
|
||||
@include e(canvas) {
|
||||
|
||||
@@ -198,7 +198,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
||||
}
|
||||
|
||||
export default {
|
||||
version: '2.14.1',
|
||||
version: '2.15.0',
|
||||
locale: locale.use,
|
||||
i18n: locale.i18n,
|
||||
install,
|
||||
|
||||
@@ -128,10 +128,10 @@ describe('Image', () => {
|
||||
vm.$el.querySelector('.el-image__inner').click();
|
||||
await wait();
|
||||
|
||||
expect(vm.$el.querySelector('.el-image-viewer__wrapper')).to.exist;
|
||||
vm.$el.querySelector('.el-image-viewer__close').click();
|
||||
expect(document.querySelector('.el-image-viewer__wrapper')).to.exist;
|
||||
document.querySelector('.el-image-viewer__close').click();
|
||||
await wait(1000);
|
||||
expect(vm.$el.querySelector('.el-image-viewer__wrapper')).to.not.exist;
|
||||
expect(document.querySelector('.el-image-viewer__wrapper')).to.not.exist;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user