1234567891011121314151617181920212223242526272829303132 |
- export default {
- computed:{
- input:function () {
- return this.$refs.input;
- }
- },
- emits:['change'],
- methods:{
- onChange:function () {
- if (this.input.value) {
- this.$emit('change',this.input.files);
- if (this.clear) {
- this.input.value = '';
- }
- }
- },
- /* 打开 */
- open:function () {
- return this.input.click();
- }
- }
- }
|