@@ -21,14 +22,13 @@
@on-input-change="handleInputChange"
@on-focus="handleFocus"
@on-blur="handleBlur"
- @on-click="handleIconClick"
@click.native="handleFocus"
@keydown.native="handleKeydown"
@mouseenter.native="handleInputMouseenter"
@mouseleave.native="handleInputMouseleave"
-
- :icon="iconType"
- >
+ >
+
+
@@ -79,6 +79,7 @@
import iInput from '../../components/input/input.vue';
import Drop from '../../components/select/dropdown.vue';
+ import Icon from '../../components/icon/icon.vue';
import {directive as clickOutside} from 'v-click-outside-x';
import TransferDom from '../../directives/transfer-dom';
import { oneOf } from '../../utils/assist';
@@ -120,7 +121,7 @@
export default {
mixins: [ Emitter ],
- components: { iInput, Drop },
+ components: { iInput, Drop, Icon },
directives: { clickOutside, TransferDom },
props: {
format: {
@@ -267,12 +268,6 @@
opened () {
return this.open === null ? this.visible : this.open;
},
- iconType () {
- let icon = 'ios-calendar-outline';
- if (this.type === 'time' || this.type === 'timerange') icon = 'ios-time-outline';
- if (this.showClose) icon = 'ios-close-circle';
- return icon;
- },
transition () {
const bottomPlaced = this.placement.match(/^bottom/);
return bottomPlaced ? 'slide-up' : 'slide-down';
@@ -282,6 +277,80 @@
},
isConfirm(){
return this.confirm || this.type === 'datetime' || this.type === 'datetimerange' || this.multiple;
+ },
+ // 3.4.0, global setting customArrow 有值时,arrow 赋值空
+ arrowType () {
+ let type = '';
+
+ if (this.type === 'time' || this.type === 'timerange') {
+ type = 'ios-time-outline';
+
+ if (this.$IVIEW) {
+ if (this.$IVIEW.timePicker.customIcon) {
+ type = '';
+ } else if (this.$IVIEW.timePicker.icon) {
+ type = this.$IVIEW.timePicker.icon;
+ }
+ }
+ } else {
+ type = 'ios-calendar-outline';
+
+ if (this.$IVIEW) {
+ if (this.$IVIEW.datePicker.customIcon) {
+ type = '';
+ } else if (this.$IVIEW.datePicker.icon) {
+ type = this.$IVIEW.datePicker.icon;
+ }
+ }
+ }
+
+ if (this.showClose) type = 'ios-close-circle';
+
+ return type;
+ },
+ // 3.4.0, global setting
+ customArrowType () {
+ let type = '';
+
+ if (!this.showClose) {
+ if (this.type === 'time' || this.type === 'timerange') {
+ if (this.$IVIEW) {
+ if (this.$IVIEW.timePicker.customIcon) {
+ type = this.$IVIEW.timePicker.customIcon;
+ }
+ }
+ } else {
+ if (this.$IVIEW) {
+ if (this.$IVIEW.datePicker.customIcon) {
+ type = this.$IVIEW.datePicker.customIcon;
+ }
+ }
+ }
+ }
+
+ return type;
+ },
+ // 3.4.0, global setting
+ arrowSize () {
+ let size = '';
+
+ if (!this.showClose) {
+ if (this.type === 'time' || this.type === 'timerange') {
+ if (this.$IVIEW) {
+ if (this.$IVIEW.timePicker.iconSize) {
+ size = this.$IVIEW.timePicker.iconSize;
+ }
+ }
+ } else {
+ if (this.$IVIEW) {
+ if (this.$IVIEW.datePicker.iconSize) {
+ size = this.$IVIEW.datePicker.iconSize;
+ }
+ }
+ }
+ }
+
+ return size;
}
},
methods: {
@@ -313,6 +382,7 @@
this.visible = false;
e && e.preventDefault();
e && e.stopPropagation();
+ this.$emit('on-clickoutside', e);
return;
}
diff --git a/src/components/drawer/drawer.vue b/src/components/drawer/drawer.vue
index dd6df410..23548280 100644
--- a/src/components/drawer/drawer.vue
+++ b/src/components/drawer/drawer.vue
@@ -303,6 +303,9 @@
if (this.$slots.header === undefined) {
this.showHead = !!val;
}
+ },
+ width (val) {
+ this.dragWidth = val;
}
}
};
diff --git a/src/components/dropdown/dropdown.vue b/src/components/dropdown/dropdown.vue
index feed5ccf..138f5609 100644
--- a/src/components/dropdown/dropdown.vue
+++ b/src/components/dropdown/dropdown.vue
@@ -57,6 +57,10 @@
transferClassName: {
type: String
},
+ stopPropagation: {
+ type: Boolean,
+ default: false
+ },
},
computed: {
transition () {
@@ -164,6 +168,7 @@
},
mounted () {
this.$on('on-click', (key) => {
+ if (this.stopPropagation) return;
const $parent = this.hasParent();
if ($parent) $parent.$emit('on-click', key);
});
diff --git a/src/components/input-number/input-number.vue b/src/components/input-number/input-number.vue
index 19fc85b6..336581c2 100644
--- a/src/components/input-number/input-number.vue
+++ b/src/components/input-number/input-number.vue
@@ -292,6 +292,7 @@
}
},
change (event) {
+ if (event.type == 'change') return;
if (event.type == 'input' && !this.activeChange) return;
let val = event.target.value.trim();
diff --git a/src/components/input/input.vue b/src/components/input/input.vue
index 75824a35..5a1516ac 100644
--- a/src/components/input/input.vue
+++ b/src/components/input/input.vue
@@ -312,6 +312,7 @@
this.$emit('input', '');
this.setCurrentValue('');
this.$emit('on-change', e);
+ this.$emit('on-clear');
},
handleSearch () {
if (this.disabled) return false;
diff --git a/src/components/loading-bar/index.js b/src/components/loading-bar/index.js
index b7a69e6d..7a9dd6ee 100644
--- a/src/components/loading-bar/index.js
+++ b/src/components/loading-bar/index.js
@@ -2,6 +2,7 @@ import LoadingBar from './loading-bar';
let loadingBarInstance;
let color = 'primary';
+let duration = 800;
let failedColor = 'error';
let height = 2;
let timer;
@@ -32,7 +33,7 @@ function hide() {
percent: 0
});
}, 200);
- }, 800);
+ }, duration);
}
function clearTimer() {
@@ -96,6 +97,9 @@ export default {
if (options.color) {
color = options.color;
}
+ if (options.duration) {
+ duration = options.duration;
+ }
if (options.failedColor) {
failedColor = options.failedColor;
}
diff --git a/src/components/menu/menu.vue b/src/components/menu/menu.vue
index 66586887..392b57af 100644
--- a/src/components/menu/menu.vue
+++ b/src/components/menu/menu.vue
@@ -133,9 +133,9 @@
}
},
mounted () {
- this.updateActiveName();
this.openedNames = [...this.openNames];
this.updateOpened();
+ this.$nextTick(() => this.updateActiveName());
this.$on('on-menu-item-select', (name) => {
this.currentActiveName = name;
this.$emit('on-select', name);
diff --git a/src/components/menu/submenu.vue b/src/components/menu/submenu.vue
index b723f1f0..e4e5ae10 100644
--- a/src/components/menu/submenu.vue
+++ b/src/components/menu/submenu.vue
@@ -2,7 +2,7 @@
-
+
@@ -75,6 +75,41 @@
return this.hasParentSubmenu && this.mode !== 'horizontal' ? {
paddingLeft: 43 + (this.parentSubmenuNum - 1) * 24 + 'px'
} : {};
+ },
+ // 3.4.0, global setting customArrow 有值时,arrow 赋值空
+ arrowType () {
+ let type = 'ios-arrow-down';
+
+ if (this.$IVIEW) {
+ if (this.$IVIEW.menu.customArrow) {
+ type = '';
+ } else if (this.$IVIEW.menu.arrow) {
+ type = this.$IVIEW.menu.arrow;
+ }
+ }
+ return type;
+ },
+ // 3.4.0, global setting
+ customArrowType () {
+ let type = '';
+
+ if (this.$IVIEW) {
+ if (this.$IVIEW.menu.customArrow) {
+ type = this.$IVIEW.menu.customArrow;
+ }
+ }
+ return type;
+ },
+ // 3.4.0, global setting
+ arrowSize () {
+ let size = '';
+
+ if (this.$IVIEW) {
+ if (this.$IVIEW.menu.arrowSize) {
+ size = this.$IVIEW.menu.arrowSize;
+ }
+ }
+ return size;
}
},
methods: {
diff --git a/src/components/modal/confirm.js b/src/components/modal/confirm.js
index dbb525bb..5be583d6 100644
--- a/src/components/modal/confirm.js
+++ b/src/components/modal/confirm.js
@@ -109,7 +109,8 @@ Modal.newInstance = properties => {
on: {
input: (status) => {
this.visible = status;
- }
+ },
+ 'on-cancel': this.cancel
}
}, [
h('div', {
diff --git a/src/components/modal/modal.vue b/src/components/modal/modal.vue
index 3c62366d..429d5519 100644
--- a/src/components/modal/modal.vue
+++ b/src/components/modal/modal.vue
@@ -60,7 +60,9 @@
},
maskClosable: {
type: Boolean,
- default: true
+ default () {
+ return !this.$IVIEW || this.$IVIEW.modal.maskClosable === '' ? true : this.$IVIEW.modal.maskClosable;
+ }
},
title: {
type: String
diff --git a/src/components/poptip/poptip.vue b/src/components/poptip/poptip.vue
index 184473fe..333a0428 100644
--- a/src/components/poptip/poptip.vue
+++ b/src/components/poptip/poptip.vue
@@ -111,6 +111,11 @@
// default by css: 8px 16px
padding: {
type: String
+ },
+ // 3.4.0
+ disabled: {
+ type: Boolean,
+ default: false
}
},
data () {
@@ -181,6 +186,8 @@
},
methods: {
handleClick () {
+ if (this.disabled) return;
+
if (this.confirm) {
this.visible = !this.visible;
return true;
@@ -208,6 +215,8 @@
this.visible = false;
},
handleFocus (fromInput = true) {
+ if (this.disabled) return;
+
if (this.trigger !== 'focus' || this.confirm || (this.isInput && !fromInput)) {
return false;
}
@@ -220,6 +229,8 @@
this.visible = false;
},
handleMouseenter () {
+ if (this.disabled) return;
+
if (this.trigger !== 'hover' || this.confirm) {
return false;
}
diff --git a/src/components/select/select-head.vue b/src/components/select/select-head.vue
index 9bb8e42b..5efc60d6 100644
--- a/src/components/select/select-head.vue
+++ b/src/components/select/select-head.vue
@@ -1,8 +1,21 @@
-
-
+
+
+
+
+
+
+
{{ item.label }}
+
+
+ {{ maxTagPlaceholder(selectedMultiple.length - maxTagCount) }}
+ + {{ selectedMultiple.length - maxTagCount }}...
+
-
+