<div class="modal " id="add-configuration" tabindex="-1" >
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title text-center">系统配置添加</h5>
                <button type="button" class="close" data-dismiss="modal" >
                    <span>&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form class="form">
                    <div class="form-group row">
                        <label for="add-name" class="col-sm-2 col-form-label text-right">名称</label>
                        <div class="col-sm-10 form-inline">
                            <input type="text" name="name" id="add-name" class="form-control col-sm-10" placeholder="输入配置名称" v-model="addConfiguration.name"
                                   :class="configurationErrors.name?'is-invalid':''"
                                   @focus="configurationErrors.name!==null ? configurationErrors.name=null:''">
                            <div class="invalid-feedback" v-if="configurationErrors.name">
                                @{{ configurationErrors.name[0] }}
                            </div>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="add-value" class="col-sm-2 col-form-label text-right">值</label>
                        <div class="col-sm-10 form-inline">
                            <input type="text" id="add-value" class="form-control col-10" name="value" placeholder="输入配置值" v-model="addConfiguration.value"
                                   :class="configurationErrors.value?'is-invalid':''"
                                   @focus="configurationErrors.value!==null ? configurationErrors.value=null:''">
                            <div class="invalid-feedback" v-if="configurationErrors.value">
                                @{{ configurationErrors.value[0] }}
                            </div>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="add-description" class="col-sm-2 col-form-label text-right">描述</label>
                        <div class="col-sm-10 form-inline">
                            <textarea name="description" id="add-description" cols="30" rows="5"  class="form-control form-text col-10" v-model="addConfiguration.description"
                                      :class="configurationErrors.description?'is-invalid':''"
                                      @focus="configurationErrors.description!==null ? configurationErrors.description=null:''">
                            ></textarea>
                            <div class="invalid-feedback" v-if="configurationErrors.description">
                                @{{ configurationErrors.description[0] }}
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary"  data-dismiss="modal" >关闭</button>
                <button type="button" class="btn btn-primary" @click="create(addConfiguration)">提交</button>
            </div>
        </div>
    </div>
</div>
