<template>
  <div :class="[model.sysCss, 'app-login-message']" :style="containerStyle">
    <alert v-show="value" type="error" show-icon>{{ value }}</alert>
  </div>
</template>

<script lang='ts'>
import { PanelFieldModel } from "@/model/panel-detail";
import { Component, Vue, Prop } from "vue-property-decorator";

@Component({})
export default class AppLoginMessage extends Vue {

    /**
     * 模型
     *
     * @type {string}
     * @memberof AppLoginInput
     */
    @Prop() public model!: PanelFieldModel;
    
    /**
     * 值
     *
     * @type {string}
     * @memberof AppLoginInput
     */
    @Prop() public value!: string;

    /**
     * 名称
     *
     * @type {string}
     * @memberof AppLoginInput
     */
    @Prop() public name!: string;

    /**
     * 容器样式
     *
     * @type {any}
     * @memberof AppLoginInput
     */
    public containerStyle: any = null;

    public mounted() {
        if (this.model) {
            this.containerStyle = this.model.getElementStyle();
        }
    }

}
</script>

<style lang='less'>
@import "./app-login-message.less";
</style>