Commit 8fecdaab authored by baiyaaaaa's avatar baiyaaaaa Committed by GitHub

Merge pull request #142 from Leopoldthecoder/master

add padding-right when popup shows
parents a7615311 71dc5bed
......@@ -9,15 +9,19 @@
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$message({
message: '删除成功!',
type: 'success'
});
setTimeout(() => {
this.$message({
message: '删除成功!',
type: 'success'
});
}, 200);
}).catch(() => {
this.$message({
message: '已取消删除',
type: 'info'
});
setTimeout(() => {
this.$message({
message: '已取消删除',
type: 'info'
});
}, 200);
});
},
......@@ -26,15 +30,19 @@
inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
inputErrorMessage: '邮箱格式不正确'
}).then(({ value }) => {
this.$message({
type: 'success',
message: '你的邮箱是: ' + value
});
setTimeout(() => {
this.$message({
type: 'success',
message: '你的邮箱是: ' + value
});
}, 200);
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
setTimeout(() => {
this.$message({
type: 'info',
message: '取消输入'
});
}, 200);
});
},
......@@ -45,10 +53,12 @@
message: '这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容, 这是一段内容',
showCancelButton: true
}).then(action => {
this.$message({
type: 'info',
message: 'action: ' + action
});
setTimeout(() => {
this.$message({
type: 'info',
message: 'action: ' + action
});
}, 200);
});
}
......
......@@ -12,6 +12,6 @@
"author": "elemefe",
"license": "MIT",
"devDependencies": {
"vue-popup": "^0.2.4"
"vue-popup": "^0.2.5"
}
}
......@@ -12,6 +12,6 @@
"author": "elemefe",
"license": "MIT",
"dependencies": {
"vue-popup": "^0.2.4"
"vue-popup": "^0.2.5"
}
}
......@@ -7,6 +7,7 @@ var defaults = {
type: '',
showInput: false,
showClose: true,
modalFade: true,
closeOnClickModal: true,
inputValue: null,
inputPlaceholder: '',
......
......@@ -79,9 +79,14 @@
this.onClose && this.onClose();
if (this.modal && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
}
setTimeout(() => {
if (this.modal && this.bodyOverflow !== 'hidden') {
document.body.style.overflow = this.bodyOverflow;
document.body.style.paddingRight = this.bodyPaddingRight;
}
this.bodyOverflow = null;
this.bodyPaddingRight = null;
}, 200);
this.opened = false;
if (!this.transition) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment