From 133cfa50d6429504b6c18a36c20472a6a872805a Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期一, 07 六月 2021 15:08:05 +0800 Subject: [PATCH] 添加规则模板页 --- src/pages/demo/index.vue | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/pages/demo/index.vue b/src/pages/demo/index.vue index 860d081..b8d386c 100644 --- a/src/pages/demo/index.vue +++ b/src/pages/demo/index.vue @@ -67,7 +67,7 @@ </el-table> <!-- 鏂板&缂栬緫 --> - <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'鏂板鍖婚櫌绉戝':'缂栬緫鍖婚櫌绉戝'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog"> + <el-dialog v-el-drag-dialog :title="dialogData.type=='add'?'鏂板鍖婚櫌绉戝':'缂栬緫鍖婚櫌绉戝'" width="500px" :visible.sync="dialogVisible" append-to-body :before-close="hideDialog" :close-on-click-modal="false"> <el-form ref="refDialog" :model="dialogData" label-width="110px" :rules="rules" size="small"> <el-form-item label="鍚嶇О" prop="name"> <el-input v-model="dialogData.name" placeholder="璇疯緭鍏ュ悕绉�" maxlength="50" /> @@ -93,13 +93,16 @@ :limit.sync="pageSize" @pagination="getList" /> + + <back-to-top :visibility-height="300" :back-position="50" transition-name="fade" /> </div> </template> <script> - +import BackToTop from '@/components/BackToTop' export default { name: 'Demo', + components: { BackToTop }, data() { return { showSearch: true, // 鏄惁鏄剧ず鎼滅储鍖� @@ -220,6 +223,9 @@ } }, () => { this.$messageSuc(text + '鎴愬姛') + }, (res) => { + item.isUp = item.isUp === 1 ? 0 : 1 + this.$messageError(res.msg) }) }).catch(() => { item.isUp = item.isUp === 1 ? 0 : 1 @@ -290,7 +296,7 @@ }, () => { this.$messageSuc('淇濆瓨鎴愬姛') this.hideDialog() - this.reGetList() + isAdd ? this.reGetList() : this.getList() }) } } -- Gitblit v1.8.0