mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 09:24:25 +00:00
修复表单组件样式和单元测试用例 (#7)
* fix: loading small style, search style and dialog style * fix: scroll to top * fix mobile scroll * fix scroll to top * 文档细节优化 * unit test * dialog and image-preview unit test * fix form component style * fix radio and checkbox style * fix search component style
This commit is contained in:
@@ -9,13 +9,8 @@ let instance;
|
||||
let dialogQueue = [];
|
||||
|
||||
const defaultCallback = action => {
|
||||
/* istanbul ignore else */
|
||||
if (currentDialog) {
|
||||
const callback = currentDialog.callback;
|
||||
|
||||
if (typeof callback === 'function') {
|
||||
callback(action);
|
||||
}
|
||||
|
||||
if (currentDialog.resolve && action === 'confirm') {
|
||||
currentDialog.resolve(action);
|
||||
} else if (currentDialog.reject && action === 'cancel') {
|
||||
@@ -43,6 +38,7 @@ const showNextDialog = () => {
|
||||
const options = currentDialog.options;
|
||||
|
||||
for (const prop in options) {
|
||||
/* istanbul ignore else */
|
||||
if (options.hasOwnProperty(prop)) {
|
||||
instance[prop] = options[prop];
|
||||
}
|
||||
|
@@ -60,12 +60,14 @@ export default {
|
||||
},
|
||||
|
||||
close() {
|
||||
/* istanbul ignore if */
|
||||
if (this.closing) return;
|
||||
|
||||
this.closing = true;
|
||||
|
||||
this.value = false;
|
||||
|
||||
/* istanbul ignore else */
|
||||
if (this.lockOnScroll) {
|
||||
setTimeout(() => {
|
||||
if (this.overlay && this.bodyOverflow !== 'hidden') {
|
||||
|
Reference in New Issue
Block a user