美文网首页
element的表单

element的表单

作者: afeng_1234 | 来源:发表于2019-01-09 09:56 被阅读0次
     <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' }]
          },
    }
    

    相关文章

      网友评论

          本文标题:element的表单

          本文链接:https://www.haomeiwen.com/subject/lfrwrqtx.html