修改编辑页面

不需要的字段表单可以直接删掉即可


                              <!--      <div :class="{'has-error':props['error']['password']}" class="form-group">
                                        <label>密码</label>
                                             <span class="help-block">
                                                <i :class="props['error']['password']?'fa-times-circle-o':'fa-info-circle'"
                                                   class="fa"></i>
                                                <span v-show="!props['error']['password']">提示信息</span>
                                                <span v-for="error in props['error']['password']">{{error}}</span>
                                            </span>
                                        <input v-model="props['row']['password']" placeholder="请输入密码" type="password"
                                               class="form-control" :disabled="!props.config['dataUrl']">

                                    </div>-->

修改提示信息


     <div :class="{'has-error':props['error']['name']}" class="form-group">
                                        <label>名称</label>
                                             <span class="help-block">
                                                <i :class="props['error']['name']?'fa-times-circle-o':'fa-info-circle'"
                                                   class="fa"></i>
                                                <span v-show="!props['error']['name']">必须是中文名称</span>
                                                <span v-for="error in props['error']['name']">{{error}}</span>
                                            </span>
                                        <input v-model="props['row']['name']" placeholder="请输入名称" class="form-control"
                                               type="text" :disabled="!props.config['dataUrl']">

                                    </div>

修改验证规则


    /**
     * 验证规则
     * @return  array
     */
    protected function getValidateRule()
    {
        $id = Request::input('id', 0);
        if (!Request::input('password')) {
            Request::offsetUnset('password');
        }
        return [
            'password' => 'sometimes|required|digits_between:6,18', 
            'email' => 'sometimes|required|email|unique:tests,email,' . $id . ',id,deleted_at,NULL',
            'is_page' => 'in:0,1', 'status' => 'in:1,2', 
            'icons' => 'nullable|alpha_dash',
            'method' => 'required|array', 
            'parent_id' => 'nullable|exists:tests,id'
        ];
    }
powered by GitbookFile Modify: 2017-10-27 15:20:23

results matching ""

    No results matching ""

    results matching ""

      No results matching ""