优化代码

This commit is contained in:
RuoYi
2022-02-12 14:23:11 +08:00
parent e66f65b257
commit dbca691746
19 changed files with 37 additions and 49 deletions

View File

@@ -5,11 +5,11 @@ let confGlobal
let someSpanIsNot24
export function dialogWrapper(str) {
return `<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Titile">
return `<el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Title">
${str}
<div slot="footer">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="handelConfirm">确定</el-button>
<el-button type="primary" @click="handleConfirm">确定</el-button>
</div>
</el-dialog>`
}

View File

@@ -98,7 +98,7 @@ function mixinMethod(type) {
close: `close() {
this.$emit('update:visible', false)
},`,
handelConfirm: `handelConfirm() {
handleConfirm: `handleConfirm() {
this.$refs['${confGlobal.formRef}'].validate(valid => {
if(!valid) return
this.close()