<el-form ref="ruleForm" :rules="rules" :model="form" label-width="120px" size="small">
<el-form-item label="通知主题:" prop="noticeName">
<el-input v-model="form.noticeName" clearable placeholder="请输入通知主题"></el-input>
</el-form-item>
<el-form-item label="通知内容:" prop="noticeContent">
<vue-ueditor-wrap style="line-height: 20px;" ref="ueditor" :init="myInit" v-model="form.noticeContent" :config="UeditorConfig"></vue-ueditor-wrap>
</el-form-item>
</el-form>
methods:{
// 表单验证
rules: {
noticeName: [{ required: true, message: '请输入通知主题(格式为非空格的任何字符)', trigger: 'blur', pattern: /^[\s\S]*.*[^\s][\s\S]*$/ }],
noticeContent: [{ required: true, message: '请填写通知内容', trigger: 'blur' }]
},
}
网友评论