vue+element-ui+vue-ele-form实现带验证校验的表单输入效果代码
代码语言:html
所属分类:表单美化
代码描述:vue+element-ui+vue-ele-form实现带验证校验的表单输入效果代码
代码标签: vue element-ui vue-ele-form 验证 校验 表单 输入
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/elementui.css"> <style> body { background-color: #f0f2f5; } </style> </head> <body > <div id="app"> <el-card header="ele-form演示" shadow="never" style="max-width: 1250px;margin: 20px auto;" > <ele-form :form-data="formData" :form-desc="formDesc" :request-fn="handleSubmit" :rules="rules" @request-success="handleSuccess" ></ele-form> </el-card> </div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1-dev.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/elementui.js"></script> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue-ele-form.umd.min.js"></script> <script> new Vue({ el: '#app', data() { return { formData: {}, formDesc: { title: { type: 'input', label: '标题' }, content: { type: 'textarea', label: '内容' }, type: { type: 'radio', label: '类型.........完整代码请登录后点击上方下载按钮下载查看
网友评论0