app-mob-textarea.vue 899 字节
Newer Older
zcdtk's avatar
zcdtk committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
<template>
    <ion-textarea
      :placeholder="placeholder"
      :auto-grow = "true"
      :value = "value"
      @ionChange = "valueChange($event)"
    ></ion-textarea>
</template>

<script lang="ts">
import { Vue, Component, Prop, Provide, Emit, Watch } from 'vue-property-decorator';

@Component({
    components: {
    }
})
export default class AppTextarea extends Vue {       
    /**
     * 输入值
     *
     * @type {string}
     * @memberof AppTextarea
     */
    @Prop() public value?: string;
        
    /**
     * 值改变
     * 
     * @memberof AppTextarea
     */
    public valueChange(event:any){
     	this.$emit('change',event.detail.value);
    }

		/**
     * 占位提示文字
     *
     * @type {string}
     * @memberof AppTextarea
     */
    @Prop() public placeholder?:string;       
}
</script>
<style lang="less">
@import './app-mob-textarea.less';
</style>