Commit d6143137 authored by yyh's avatar yyh

增加多行输入文本

parent e80a6f3a
<template>
<div class="van-hairline--bottom">
<van-field
:value="value.value"
rows="3"
type="textarea"
autosize
v-model="aa"
@input="input"
:label="proofSubItem.label"
placeholder="请输入" />
</div>
</template>
<script lang="ts">
import { Component, Prop, Model, Emit, Vue } from 'vue-property-decorator';
import { Field } from 'vant';
@Component({
name: 'TypeTen',
components: {
[Field.name]: Field,
},
})
export default class TypeTen extends Vue {
@Prop()
private proofSubItem: any;
// @Model ('input', {type: String})
@Prop()
private value!: any;
// @Emit('input')
private aa: string = this.value.value;
private input() {
this.$emit('update:value', {...this.value, value: this.aa});
}
}
</script>
......@@ -6,6 +6,7 @@ import TypeFive from './TypeFive.vue';
import TypeSix from './TypeSix.vue';
import TypeEight from './TypeEight.vue';
import TypeNine from './TypeNine.vue';
import TypeTen from './TypeTen.vue';
export default {
0: TypeZero,
......@@ -16,4 +17,5 @@ export default {
6: TypeSix,
8: TypeEight,
9: TypeNine,
10: TypeTen,
};
......@@ -41,6 +41,7 @@ export enum DataType {
Date = 6, // 时间戳
Video = 8, // 视频
Audio = 9, // 音频
TextArea = 10, // 多行文本
}
export enum AuthStatus {
......
......@@ -69,10 +69,11 @@ export default class AddOption extends Vue {
desc: '可以上传多个图片,但只能选择一项',
type: DataType.Image,
},
// {
// title: '多行文本',
// desc: '可以输入多行,适合文字多的内容',
// },
{
title: '多行文本',
desc: '可以输入多行,适合文字多的内容',
type: DataType.TextArea,
},
{
title: 'PDF文件',
desc: '选择PDF文件',
......
......@@ -95,6 +95,7 @@ export default class Add extends Vue {
[DataType.Date]: '日期',
[DataType.Video]: '视频',
[DataType.Audio]: '音频',
[DataType.TextArea]: '多行文本',
};
private typeValue: any = {
0: {
......@@ -174,6 +175,16 @@ export default class Add extends Vue {
key: '',
label: '音频',
},
10: {
data : {
type : 'text',
format : 'string',
value : '',
},
type: 10,
key: '',
label: '多行文本',
},
};
private showActionHandler({ index, parentIndex}: any) {
this.showMoreAction = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment