<template>
    <div
        class="nus_textt"
        :style="lineClamp"
        @click="_onClick($event)"
        @tap="_onTap($event)">
        <slot>
            {{nameText}}
        </slot>
    </div>
</template>

<script>
import TextTmp from '../_comm/TextTmp';
export default {
    extends: TextTmp,
    name: 'NuTextt',
    props: {
        /**
         * 行数
         */
        row: {
            type: Number,
            default: 2
        }
    },
    computed: {
        // 计算设置行数的style
        lineClamp () {
            let _row = this.row;
            return _row && {
                '-webkit-line-clamp': _row
            };
        }
    }
};
</script>

<style lang="scss">
@import '../../../../_assets/style/_iconFont.scss';
@import '../../../../_assets/style/_var.scss';
@import '../../../../_assets/style/_mixin.scss';

.nus_textt {
    @include lineClamp(0);
    white-space: normal;
    word-break: break-all;
    word-wrap: break-word;
}
</style>

