mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
feat(Form): support using uploader
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
import { createNamespace, addUnit, noop } from '../utils';
|
||||
import { toArray, readFile, isOversize, isImageFile } from './utils';
|
||||
|
||||
// Mixins
|
||||
import { FieldMixin } from '../mixins/field';
|
||||
|
||||
// Components
|
||||
import Icon from '../icon';
|
||||
import Image from '../image';
|
||||
@@ -13,6 +16,8 @@ const [createComponent, bem] = createNamespace('uploader');
|
||||
export default createComponent({
|
||||
inheritAttrs: false,
|
||||
|
||||
mixins: [FieldMixin],
|
||||
|
||||
model: {
|
||||
prop: 'fileList',
|
||||
},
|
||||
@@ -70,6 +75,11 @@ export default createComponent({
|
||||
previewSizeWithUnit() {
|
||||
return addUnit(this.previewSize);
|
||||
},
|
||||
|
||||
// for form
|
||||
value() {
|
||||
return this.fileList;
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
Reference in New Issue
Block a user