Skip to content

Commit c2a2fec

Browse files
jingyulongPanJiaChen
authored andcommitted
fix[Example]: add <el-form-item> wrapper for validate (PanJiaChen#1428)
创建文章里js里有验证规则,但是由于少了<el-form-item>元素而不起作用。
1 parent 999ea3a commit c2a2fec

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/views/example/components/ArticleDetail.vue

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,16 @@
6060
<span v-show="contentShortLength" class="word-counter">{{ contentShortLength }}字</span>
6161
</el-form-item>
6262

63-
<div class="editor-container">
64-
<Tinymce ref="editor" :height="400" v-model="postForm.content" />
65-
</div>
66-
67-
<div style="margin-bottom: 20px;">
68-
<Upload v-model="postForm.image_uri" />
69-
</div>
63+
<el-form-item prop="content">
64+
<div class="editor-container">
65+
<Tinymce ref="editor" :height="400" v-model="postForm.content" />
66+
</div>
67+
</el-form-item>
68+
<el-form-item prop="image_uri">
69+
<div style="margin-bottom: 20px;">
70+
<Upload v-model="postForm.image_uri" />
71+
</div>
72+
</el-form-item>
7073
</div>
7174
</el-form>
7275

0 commit comments

Comments
 (0)