Compare commits

...

28 Commits

Author SHA1 Message Date
cs1707
29268a3d4a [release] 2.15.2 2021-05-28 15:29:22 +08:00
cs1707
f1ef52e194 [build] 2.15.2 2021-05-28 15:29:22 +08:00
好多大米
d0194e1e2f feat: add change log (#21032) 2021-05-28 15:24:32 +08:00
好多大米
17de41f3e2 Drawer: add overflow auto (#20948) 2021-04-21 11:44:35 +08:00
好多大米
486219a752 Cascader: fix delete tag bug (#20939) 2021-04-16 16:16:23 +08:00
好多大米
655d89fe0e Carousel: fix interval and scale bug (#20931) 2021-04-15 14:10:56 +08:00
好多大米
0418a47148 fix: update isFunction (#20912) 2021-04-08 17:13:39 +08:00
好多大米
0606cb8f96 Input: fix show password icon in edge (#20902) 2021-04-06 11:37:14 +08:00
好多大米
04858017fb Input: fix show password cursor (#20870) 2021-03-26 16:57:45 +08:00
好多大米
fa64999032 Image: fix z-index and keydown event add stopPropagation (#20859) 2021-03-19 16:32:36 +08:00
好多大米
06ddc10571 chore: remove getTestEle (#20811) 2021-03-19 16:32:20 +08:00
cs1707
29956b5de9 [release] 2.15.1 2021-02-23 20:13:54 +08:00
cs1707
9bbf070a73 [build] 2.15.1 2021-02-23 20:13:54 +08:00
好多大米
de0bf4f274 docs: add change log (#20798) 2021-02-23 20:06:58 +08:00
好多大米
6c9af477a4 Merge pull request #20791 from iamkun/feat/v3-banner
chore: update header banner
2021-02-23 14:56:55 +08:00
iamkun
53f842aa4f chore: update header banner 2021-02-23 14:38:35 +08:00
好多大米
20c7cc9c50 Merge pull request #20758 from iamkun/fix/calendar-i18n
fix: fix calendar component i18n bug
2021-02-10 20:59:15 +08:00
UxieKong
061dfa3deb fix(color-picker): fix color-picker can't select 8-digit hex color (#20710) 2021-02-06 16:12:24 +08:00
iamkun
8d1d5c57c9 fix: fix calendar component i18n bug
fix #20524
2021-02-06 16:00:22 +08:00
好多大米
cea8c8c792 Cascader: fix cascader panel active path (#20730) 2021-02-02 21:15:32 +08:00
好多大米
e8e3a64038 Merge pull request #20740 from iamkun/chore/axure
chore: update Axure resource v2.1.0
2021-02-01 11:06:42 +08:00
iamkun
c323890ba4 chore: update Axure resource v2.1.0 2021-01-31 12:27:44 +08:00
charlie0228
493e18877a fix: fix incorrect image object fit ratio in IE (#19583) 2021-01-25 13:16:05 +08:00
好多大米
18cf34f7b5 fix(Drawer): fix size number bug (#20718) 2021-01-22 18:01:34 +08:00
cs1707
b4efaa3d87 [release] 2.15.0 2021-01-15 20:03:43 +08:00
cs1707
6569ae2738 [build] 2.15.0 2021-01-15 20:03:42 +08:00
好多大米
9eb0a3d55a feat: add change log 2.15.0 (#20692) 2021-01-15 19:58:14 +08:00
好多大米
188605c383 Image: preview optimization (#20652) 2021-01-15 16:49:44 +08:00
31 changed files with 383 additions and 58 deletions

View File

@@ -1,5 +1,68 @@
## Changelog
### 2.15.2
*2021-05-28*
#### Bug fixes
- Image
- fix z-index and keydown event add stopPropagation (#20859 by @cs1707)
- Input
- fix show password cursor (#20870 by @cs1707)
- fix show password icon in edge (#20902 by @cs1707)
- Carousel
- fix interval and scale bug (#20931 by @cs1707)
- Cascader
- fix delete tag bug (#20939 by @cs1707)
- Drawer
- add overflow auto (#20948 by @cs1707)
- Others
- fix isFunction (#20912 by @cs1707)
### 2.15.1
*2021-02-23*
#### Bug fixes
- Drawer
- bugfix (by @cs1707)
- Image
- fix incorrect image object fit ratio in IE (#19583 by @charlie0228)
- Cascader
- fix cascader panel active path (#20730 by @cs1707)
- Calendar
- fix calendar component i18n bug (#20758 by @iamkun)
- ColorPicker
- fix bugs (by @UxieVerity)
#### Optimization
- Doc
- update Axure resource v2.1.0 (by @iamkun)
### 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*

View File

@@ -1,5 +1,67 @@
## Changelog
### 2.15.2
*2021-05-28*
#### Bug fixes
- Image
- fix z-index and keydown event add stopPropagation (#20859 by @cs1707)
- Input
- fix show password cursor (#20870 by @cs1707)
- fix show password icon in edge (#20902 by @cs1707)
- Carousel
- fix interval and scale bug (#20931 by @cs1707)
- Cascader
- fix delete tag bug (#20939 by @cs1707)
- Drawer
- add overflow auto (#20948 by @cs1707)
- Others
- fix isFunction (#20912 by @cs1707)
### 2.15.1
*2021-02-23*
#### Bug fixes
- Drawer
- bugfix (by @cs1707)
- Image
- fix incorrect image object fit ratio in IE (#19583 by @charlie0228)
- Cascader
- fix cascader panel active path (#20730 by @cs1707)
- Calendar
- fix calendar component i18n bug (#20758 by @iamkun)
- ColorPicker
- fix bugs (by @UxieVerity)
#### Optimization
- Doc
- update Axure resource v2.1.0 (by @iamkun)
### 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*

View File

@@ -1,5 +1,68 @@
## Changelog
### 2.15.2
*2021-05-28*
#### Bug fixes
- Image
- fix z-index and keydown event add stopPropagation (#20859 by @cs1707)
- Input
- fix show password cursor (#20870 by @cs1707)
- fix show password icon in edge (#20902 by @cs1707)
- Carousel
- fix interval and scale bug (#20931 by @cs1707)
- Cascader
- fix delete tag bug (#20939 by @cs1707)
- Drawer
- add overflow auto (#20948 by @cs1707)
- Others
- fix isFunction (#20912 by @cs1707)
### 2.15.1
*2021-02-23*
#### Bug fixes
- Drawer
- bugfix (by @cs1707)
- Image
- fix incorrect image object fit ratio in IE (#19583 by @charlie0228)
- Cascader
- fix cascader panel active path (#20730 by @cs1707)
- Calendar
- fix calendar component i18n bug (#20758 by @iamkun)
- ColorPicker
- fix bugs (by @UxieVerity)
#### Optimization
- Doc
- update Axure resource v2.1.0 (by @iamkun)
### 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*

View File

@@ -1,5 +1,68 @@
## 更新日志
### 2.15.2
*2021-05-28*
#### Bug 修复
- Image
- 修复 z-index 增加 keydown 事件 添加 stopPropagation (#20859 by @cs1707)
- Input
- 修复 password cursor 展示 (#20870 by @cs1707)
- 修复 password icon 在 edge 下的展示 (#20902 by @cs1707)
- Carousel
- 修复 interval 和 scale bug (#20931 by @cs1707)
- Cascader
- 修复 delete tag bug (#20939 by @cs1707)
- Drawer
- 支持 overflow auto (#20948 by @cs1707)
- 其他
- 修复 isFunction (#20912 by @cs1707)
### 2.15.1
*2021-02-23*
#### Bug 修复
- Drawer
- 修复 Drawer bug (by @cs1707)
- Image
- 修复 image object fit ratio 在 IE 下的 bug (#19583 by @charlie0228)
- Cascader
- 修复 cascader panel active path (#20730 by @cs1707)
- Calendar
- 修复 calendar 国际化 bug (#20758 by @iamkun)
- ColorPicker
- 修复 bugs (by @UxieVerity)
#### 优化
- Doc
- 更新 Axure 设计资源 v2.1.0 (by @iamkun)
### 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*

View File

@@ -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));

View File

@@ -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/**

View File

@@ -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/**

View File

@@ -3,6 +3,21 @@
height: 80px;
}
#v3-banner {
background-color: #409EFF;
min-height: 30px;
padding: 5px 60px;
z-index: 19;
box-sizing: border-box;
text-align: center;
color: #eee;
}
#v3-banner a {
color: #FFF;
font-weight: bold;
}
.header {
height: 80px;
background-color: #fff;
@@ -267,6 +282,16 @@
</style>
<template>
<div class="headerWrapper">
<div id="v3-banner" v-if="isHome">
<template v-if="lang === 'zh-CN'">
您正在浏览基于 Vue 2.x Element UI 文档;
<a href="https://element-plus.org/#/zh-CN">点击这里</a> 查看 Vue 3.x 的升级版本
</template>
<template v-else>
Youre browsing the documentation of Element UI for Vue 2.x version.
<a href="https://element-plus.org">Click here</a> for Vue 3.x version
</template>
</div>
<header class="header" ref="header">
<div class="container">
<h1><router-link :to="`/${ lang }`">
@@ -380,7 +405,6 @@
import compoLang from '../i18n/component.json';
import Element from 'main/index.js';
import themeLoader from './theme/loader';
import { getTestEle } from './theme/loader/api.js';
import bus from '../bus';
import { ACTION_USER_CONFIG_UPDATE } from './theme/constant.js';
@@ -422,19 +446,12 @@
},
isComponentPage() {
return /^component/.test(this.$route.name);
},
isHome() {
return /^home/.test(this.$route.name);
}
},
mounted() {
getTestEle()
.then(() => {
this.$isEle = true;
ga('send', 'event', 'DocView', 'Ele', 'Inner');
})
.catch((err) => {
ga('send', 'event', 'DocView', 'Ele', 'Outer');
console.error(err);
});
const testInnerImg = new Image();
testInnerImg.onload = () => {
this.$isEle = true;

View File

@@ -5,7 +5,6 @@ const { version } = Element;
const hostList = {
local: 'http://localhost:3008/',
alpha: 'https://element-api.ar.elenet.me/element/theme/',
production: 'https://element-api.ele.me/element/theme/'
};
@@ -15,10 +14,6 @@ export const getVars = () => {
return get(`${host}getVariable?version=${version}`);
};
export const getTestEle = () => {
return get(`${hostList.alpha}getVariable`);
};
export const updateVars = (data, cb) => {
return post(`${host}updateVariable?version=${version}`, data, cb);
};

View File

@@ -3,7 +3,7 @@
text-align: center;
}
.banner-desc {
padding-top: 20px;
padding-top: 50px;
h1 {
font-size: <%= titleSize >px;

View File

@@ -144,7 +144,7 @@
<p><%= 4 ></p>
<a
onclick="ga('send', 'event', 'ResourceDownload', 'Download', 'Axure');"
href="https://github.com/ElementUI/Resources/raw/master/Element_Components_v2.0.0.rplib"
href="https://github.com/ElementUI/Resources/raw/master/Element_Components_v2.1.0.rplib"
><%= 5 ></a>
</div>
</li>

View File

@@ -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.2":"2.15"}

View File

@@ -1,6 +1,6 @@
{
"name": "element-ui",
"version": "2.14.1",
"version": "2.15.2",
"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"
},

View File

@@ -20,12 +20,6 @@ export default {
inject: ['elCalendar'],
data() {
return {
WEEK_DAYS: getI18nSettings().dayNames
};
},
methods: {
toNestedArr(days) {
return rangeArr(days.length / 7).map((_, index) => {
@@ -83,6 +77,9 @@ export default {
},
computed: {
WEEK_DAYS() {
return getI18nSettings().dayNames;
},
prevMonthDatePrefix() {
const temp = new Date(this.date.getTime());
temp.setDate(0);

View File

@@ -98,6 +98,7 @@
this.active = index === activeIndex;
const isVertical = parentDirection === 'vertical';
this.translate = this.calcTranslate(index, activeIndex, isVertical);
this.scale = 1;
}
this.ready = true;
},

View File

@@ -159,6 +159,11 @@ export default {
loop() {
this.setActiveItem(this.activeIndex);
},
interval() {
this.pauseTimer();
this.startTimer();
}
},

View File

@@ -176,6 +176,7 @@ export default {
syncCheckedValue() {
const { value, checkedValue } = this;
if (!isEqual(value, checkedValue)) {
this.activePath = [];
this.checkedValue = value;
this.syncMenuState();
}

View File

@@ -44,14 +44,14 @@
<div v-if="multiple" class="el-cascader__tags">
<el-tag
v-for="(tag, index) in presentTags"
v-for="tag in presentTags"
:key="tag.key"
type="info"
:size="tagSize"
:hit="tag.hitState"
:closable="tag.closable"
disable-transitions
@close="deleteTag(index)">
@close="deleteTag(tag)">
<span>{{ tag.text }}</span>
</el-tag>
<input
@@ -588,7 +588,7 @@ export default {
if (this.pressDeleteCount) {
if (lastTag.hitState) {
this.deleteTag(lastIndex);
this.deleteTag(lastTag);
} else {
lastTag.hitState = true;
}
@@ -607,10 +607,11 @@ export default {
this.toggleDropDownVisible(false);
}
},
deleteTag(index) {
deleteTag(tag) {
const { checkedValue } = this;
const val = checkedValue[index];
this.checkedValue = checkedValue.filter((n, i) => i !== index);
const current = tag.node.getValueByOption();
const val = checkedValue.find(n => isEqual(n, current));
this.checkedValue = checkedValue.filter(n => !isEqual(n, current));
this.$emit('remove-tag', val);
},
updateStyle() {

View File

@@ -249,7 +249,7 @@ export default class Color {
}
} else if (value.indexOf('#') !== -1) {
const hex = value.replace('#', '').trim();
if (!/^(?:[0-9a-fA-F]{3}){1,2}$/.test(hex)) return;
if (!/^(?:[0-9a-fA-F]{3}){1,2}|[0-9a-fA-F]{8}$/.test(hex)) return;
let r, g, b;
if (hex.length === 3) {

View File

@@ -19,7 +19,7 @@
:aria-label="title"
class="el-drawer"
:class="[direction, customClass]"
:style="isHorizontal ? `width: ${size}` : `height: ${size}`"
:style="isHorizontal ? `width: ${drawerSize}` : `height: ${drawerSize}`"
ref="drawer"
role="dialog"
tabindex="-1"
@@ -93,7 +93,7 @@ export default {
default: true
},
size: {
type: String,
type: [Number, String],
default: '30%'
},
title: {
@@ -115,6 +115,9 @@ export default {
computed: {
isHorizontal() {
return this.direction === 'rtl' || this.direction === 'ltr';
},
drawerSize() {
return typeof this.size === 'number' ? `${this.size}px` : this.size;
}
},
data() {

View File

@@ -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 tabindex="-1" ref="el-image-viewer__wrapper" class="el-image-viewer__wrapper" :style="{ 'z-index': viewerZIndex }">
<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">
@@ -54,6 +54,7 @@
<script>
import { on, off } from 'element-ui/src/utils/dom';
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
import { PopupManager } from 'element-ui/src/utils/popup';
const Mode = {
CONTAIN: {
@@ -91,6 +92,14 @@ export default {
initialIndex: {
type: Number,
default: 0
},
appendToBody: {
type: Boolean,
default: true
},
maskClosable: {
type: Boolean,
default: true
}
},
@@ -135,6 +144,10 @@ export default {
style.maxWidth = style.maxHeight = '100%';
}
return style;
},
viewerZIndex() {
const nextZIndex = PopupManager.nextZIndex();
return this.zIndex > nextZIndex ? this.zIndex : nextZIndex;
}
},
watch: {
@@ -159,7 +172,8 @@ export default {
this.onClose();
},
deviceSupportInstall() {
this._keyDownHandler = rafThrottle(e => {
this._keyDownHandler = e => {
e.stopPropagation();
const keyCode = e.keyCode;
switch (keyCode) {
// ESC
@@ -187,7 +201,7 @@ export default {
this.handleActions('zoomOut');
break;
}
});
};
this._mouseWheelHandler = rafThrottle(e => {
const delta = e.wheelDelta ? e.wheelDelta : -e.detail;
if (delta > 0) {
@@ -235,6 +249,11 @@ export default {
e.preventDefault();
},
handleMaskClick() {
if (this.maskClosable) {
this.hide();
}
},
reset() {
this.transform = {
scale: 1,
@@ -294,9 +313,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>

View File

@@ -204,7 +204,8 @@
if (!imageWidth || !imageHeight || !containerWidth || !containerHeight) return {};
const vertical = imageWidth / imageHeight < 1;
const imageAspectRatio = imageWidth / imageHeight;
const containerAspectRatio = containerWidth / containerHeight;
if (fit === ObjectFit.SCALE_DOWN) {
const isSmaller = imageWidth < containerWidth && imageHeight < containerHeight;
@@ -215,9 +216,9 @@
case ObjectFit.NONE:
return { width: 'auto', height: 'auto' };
case ObjectFit.CONTAIN:
return vertical ? { width: 'auto' } : { height: 'auto' };
return (imageAspectRatio < containerAspectRatio) ? { width: 'auto' } : { height: 'auto' };
case ObjectFit.COVER:
return vertical ? { height: 'auto' } : { width: 'auto' };
return (imageAspectRatio < containerAspectRatio) ? { height: 'auto' } : { width: 'auto' };
default:
return {};
}

View File

@@ -403,7 +403,9 @@
},
handlePasswordVisible() {
this.passwordVisible = !this.passwordVisible;
this.focus();
this.$nextTick(() => {
this.focus();
});
},
getInput() {
return this.$refs.input || this.$refs.textarea;

View File

@@ -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: {

View File

@@ -1,6 +1,6 @@
{
"name": "element-theme-chalk",
"version": "2.14.1",
"version": "2.15.2",
"description": "Element component chalk theme.",
"main": "lib/index.css",
"style": "lib/index.css",

View File

@@ -165,6 +165,7 @@ $directions: rtl, ltr, ttb, btt;
&__body {
flex: 1;
overflow: auto;
& > * {
box-sizing: border-box;
}

View File

@@ -75,7 +75,9 @@
right: 40px;
width: 40px;
height: 40px;
font-size: 40px;
font-size: 24px;
color: #fff;
background-color: #606266;
}
@include e(canvas) {

View File

@@ -120,6 +120,10 @@
transition: $--border-transition-base;
width: 100%;
&::-ms-reveal {
display: none;
}
&::placeholder {
color: $--input-placeholder-color;
}

View File

@@ -198,7 +198,7 @@ if (typeof window !== 'undefined' && window.Vue) {
}
export default {
version: '2.14.1',
version: '2.15.2',
locale: locale.use,
i18n: locale.i18n,
install,

View File

@@ -1,3 +1,5 @@
import Vue from 'vue';
export function isString(obj) {
return Object.prototype.toString.call(obj) === '[object String]';
}
@@ -10,11 +12,25 @@ export function isHtmlElement(node) {
return node && node.nodeType === Node.ELEMENT_NODE;
}
export const isFunction = (functionToCheck) => {
/**
* - Inspired:
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
*/
let isFunction = (functionToCheck) => {
var getType = {};
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
};
if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && (Vue.prototype.$isServer || typeof document.childNodes !== 'function')) {
isFunction = function(obj) {
return typeof obj === 'function' || false;
};
}
export {
isFunction
};
export const isUndefined = (val)=> {
return val === void 0;
};

View File

@@ -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;
});
});