<script>
import { generateUUID } from 'nimble-lib';
import WidgetTmp from '../../_comm/WidgetTmp';
export default {
    extends: WidgetTmp,
    props: {
        /**
         * 大小
         */
        size: {
            type: [String, Number]
        },
        /**
         * 显示的标签文字
         */
        nameText: {
            type: String
        }
    },
    data() {
        return {};
    },
    computed: {
        /**
             * 大小
             * @returns {String}
             */
        mySize() {
            let _that = this;
            let _size = _that.size;
            if (typeof _size === 'number' || /\d\s*$/.test(_size + '')) {
                _size = (_size * 100) + '%';
            }
            return _size;
        },
        fillId() {
            return '_line-' + generateUUID() + '_';
        }
    }
};
</script>
