Upload support Form's disabled
This commit is contained in:
parent
6e22b4d1ff
commit
834b31f731
1 changed files with 5 additions and 4 deletions
|
@ -29,12 +29,13 @@
|
|||
import ajax from './ajax';
|
||||
import { oneOf } from '../../utils/assist';
|
||||
import Emitter from '../../mixins/emitter';
|
||||
import mixinsForm from '../../mixins/form';
|
||||
|
||||
const prefixCls = 'ivu-upload';
|
||||
|
||||
export default {
|
||||
name: 'Upload',
|
||||
mixins: [ Emitter ],
|
||||
mixins: [ Emitter, mixinsForm ],
|
||||
components: { UploadList },
|
||||
props: {
|
||||
action: {
|
||||
|
@ -166,7 +167,7 @@
|
|||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
if (this.disabled) return;
|
||||
if (this.itemDisabled) return;
|
||||
this.$refs.input.click();
|
||||
},
|
||||
handleChange (e) {
|
||||
|
@ -180,11 +181,11 @@
|
|||
},
|
||||
onDrop (e) {
|
||||
this.dragOver = false;
|
||||
if (this.disabled) return;
|
||||
if (this.itemDisabled) return;
|
||||
this.uploadFiles(e.dataTransfer.files);
|
||||
},
|
||||
handlePaste (e) {
|
||||
if (this.disabled) return;
|
||||
if (this.itemDisabled) return;
|
||||
if (this.paste) {
|
||||
this.uploadFiles(e.clipboardData.files);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue