Commit d724443282151d06fba434db7ed300bd251ba6f4

Authored by 杨泽宇
1 parent 4b392ae9

表单prevent

src/layout/icon.vue
... ... @@ -9,6 +9,7 @@ import {
9 9 Shop,
10 10 List,
11 11 Tools,
  12 + Opportunity,
12 13 PhoneFilled,
13 14 Avatar,
14 15 Menu as IconMenu,
... ... @@ -33,6 +34,7 @@ const props = withDefaults(defineProps<Props>(), {
33 34 <Shop v-else-if="keyId === 3000" />
34 35 <Avatar v-else-if="keyId === 4000" />
35 36 <PhoneFilled v-else-if="keyId === 5000" />
  37 + <Opportunity v-else-if="keyId === 6000" />
36 38 <List v-else />
37 39 </el-icon>
38 40 </template>
... ...
src/views/event/category/index.vue
... ... @@ -276,7 +276,7 @@ onMounted(() =&gt; {
276 276 <el-button @click="resetForm(ruleFormRef)">取消</el-button>
277 277 <el-button
278 278 type="primary"
279   - @click="submitForm(ruleFormRef)"
  279 + @click.prevent="submitForm(ruleFormRef)"
280 280 :loading="form.loading"
281 281 >确认</el-button
282 282 >
... ...
src/views/event/handwork/edit.vue
... ... @@ -237,7 +237,7 @@ onMounted(() =&gt; {
237 237 <el-form-item style="width: 100%" v-show="form.dataType !== 'detail'">
238 238 <el-button
239 239 type="primary"
240   - @click="submitForm(ruleFormRef)"
  240 + @click.prevent="submitForm(ruleFormRef)"
241 241 :loading="form.loading"
242 242 >发布</el-button
243 243 >
... ...
src/views/notify/edit.vue
... ... @@ -199,13 +199,13 @@ onMounted(() =&gt; {
199 199 <el-form-item style="width: 100%" v-show="form.dataType !== 'detail'">
200 200 <el-button
201 201 type="primary"
202   - @click="submitForm(ruleFormRef, 1)"
  202 + @click.prevent="submitForm(ruleFormRef, 1)"
203 203 :loading="form.loading"
204 204 >发布</el-button
205 205 >
206 206 <el-button
207 207 type="primary"
208   - @click="submitForm(ruleFormRef, 0)"
  208 + @click.prevent="submitForm(ruleFormRef, 0)"
209 209 :loading="form.loading"
210 210 >存为草稿</el-button
211 211 >
... ...
src/views/permission/edit.vue
... ... @@ -181,7 +181,7 @@ onMounted(() =&gt; {
181 181 <el-form-item style="width: 100%">
182 182 <el-button
183 183 type="primary"
184   - @click="submitForm(ruleFormRef)"
  184 + @click.prevent="submitForm(ruleFormRef)"
185 185 :loading="form.loading"
186 186 >提交</el-button
187 187 >
... ...
src/views/property/edit.vue
... ... @@ -315,7 +315,7 @@ onMounted(() =&gt; {
315 315 <el-form-item style="width: 100%">
316 316 <el-button
317 317 type="primary"
318   - @click="submitForm(ruleFormRef)"
  318 + @click.prevent="submitForm(ruleFormRef)"
319 319 :loading="form.loading"
320 320 >提交</el-button
321 321 >
... ...
src/views/repair/edit.vue
... ... @@ -289,7 +289,7 @@ onMounted(() =&gt; {
289 289 <el-form-item style="width: 100%" v-show="form.dataType !== 'edit'">
290 290 <el-button
291 291 type="primary"
292   - @click="submitForm(ruleFormRef)"
  292 + @click.prevent="submitForm(ruleFormRef)"
293 293 :loading="form.loading"
294 294 >提交</el-button
295 295 >
... ...
src/views/role/edit.vue
... ... @@ -105,7 +105,7 @@ onMounted(() =&gt; {
105 105 <el-form-item style="width: 100%">
106 106 <el-button
107 107 type="primary"
108   - @click="submitForm(ruleFormRef)"
  108 + @click.prevent="submitForm(ruleFormRef)"
109 109 :loading="form.loading"
110 110 >提交</el-button
111 111 >
... ...
src/views/role/permission.vue
... ... @@ -154,7 +154,7 @@ onMounted(() =&gt; {
154 154 />
155 155 </el-form-item>
156 156 <el-form-item style="width: 100%">
157   - <el-button type="primary" @click="submitForm(ruleFormRef)" :loading="form.loading"
  157 + <el-button type="primary" @click.prevent="submitForm(ruleFormRef)" :loading="form.loading"
158 158 >提交</el-button
159 159 >
160 160 <el-button type="info" @click="resetForm(ruleFormRef)"
... ...
src/views/system/info.vue
... ... @@ -128,7 +128,7 @@ const submitForm = (formEl: InstanceType&lt;typeof ElForm&gt; | undefined) =&gt; {
128 128 <el-form-item style="width: 100%">
129 129 <el-button
130 130 type="primary"
131   - @click="submitForm(ruleFormRef)"
  131 + @click.prevent="submitForm(ruleFormRef)"
132 132 :loading="form.loading"
133 133 >提交</el-button
134 134 >
... ...
src/views/user/edit.vue
... ... @@ -274,7 +274,7 @@ onMounted(() =&gt; {
274 274 <el-form-item style="width: 100%">
275 275 <el-button
276 276 type="primary"
277   - @click="submitForm(ruleFormRef)"
  277 + @click.prevent="submitForm(ruleFormRef)"
278 278 :loading="form.loading"
279 279 >提交</el-button
280 280 >
... ...
src/views/user/login.vue
... ... @@ -124,7 +124,7 @@ const getMenu = async () =&gt; {
124 124 <el-form-item style="width: 100%">
125 125 <el-button
126 126 type="primary"
127   - @click="submitForm(ruleFormRef)"
  127 + @click.prevent="submitForm(ruleFormRef)"
128 128 style="width: 100%"
129 129 :loading="loading"
130 130 >登录</el-button
... ...