Skip to content

Commit

Permalink
byzer-org#48 fix text
Browse files Browse the repository at this point in the history
  • Loading branch information
githubnameting committed Dec 23, 2021
1 parent 00e9714 commit e3f38ea
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
6 changes: 4 additions & 2 deletions src/components/CloneNoteBook/CloneNoteBook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ export default class CloneNoteBookModal extends Vue {
async onDialogShow (newVal, oldVal) {
// 关闭弹窗时,重置弹窗信息
if (!newVal && oldVal) {
this.resetModal()
this.$refs.$form.clearValidate()
setTimeout(() => {
this.resetModal()
this.$refs.$form.clearValidate()
}, 500)
}
}
// 校验参数名称
Expand Down
8 changes: 5 additions & 3 deletions src/components/CreateFolder/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</el-form-item>
<el-form-item class="dialog-btns">
<el-button @click="closeModal" size="medium">{{$t('cancel')}}</el-button>
<el-button type="primary" :loading="isSubmiting" size="medium" native-type="submit" @click.prevent="handleSubmit">{{$t('clone')}}</el-button>
<el-button type="primary" :loading="isSubmiting" size="medium" native-type="submit" @click.prevent="handleSubmit">{{$t('create')}}</el-button>
</el-form-item>
</el-form>
</div>
Expand Down Expand Up @@ -77,8 +77,10 @@ export default class CreateFolderModal extends Vue {
async onDialogShow (newVal, oldVal) {
// 关闭弹窗时,重置弹窗信息
if (!newVal && oldVal) {
this.resetModal()
this.$refs.$form.clearValidate()
setTimeout(() => {
this.resetModal()
this.$refs.$form.clearValidate()
}, 500)
}
}
Expand Down
9 changes: 4 additions & 5 deletions src/components/CreateNoteBook/CreateNoteBook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ vuex.registerModule(['modals', 'CreateNoteBookModal'], store)
isShow: state => state.isShow,
form: state => state.form,
callback: state => state.callback
}),
...mapState({
})
},
methods: {
Expand Down Expand Up @@ -94,8 +92,10 @@ export default class CreateNoteBookModal extends Vue {
async onDialogShow (newVal, oldVal) {
// 关闭弹窗时,重置弹窗信息
if (!newVal && oldVal) {
this.resetModal()
this.$refs.$form.clearValidate()
setTimeout(() => {
this.resetModal()
this.$refs.$form.clearValidate()
}, 500)
}
}
Expand Down Expand Up @@ -123,7 +123,6 @@ export default class CreateNoteBookModal extends Vue {
}
async handleSubmit () {
console.log('submit')
try {
await this.$refs.$form.validate()
let params = {
Expand Down
6 changes: 4 additions & 2 deletions src/components/MoveNotebook/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ export default class MoveNotebookModal extends Vue {
@Watch('isShow')
async onDialogShow (newVal, oldVal) {
if (!newVal && oldVal) {
this.resetModal()
this.$refs.$form.clearValidate()
setTimeout(() => {
this.resetModal()
this.$refs.$form.clearValidate()
}, 500)
}
}
@Watch('notebookList', { deep: true })
Expand Down
8 changes: 5 additions & 3 deletions src/components/RenameNoteBook/RenameNoteBook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</el-form-item>
<el-form-item class="dialog-btns">
<el-button @click="closeModal" size="medium">{{$t('cancel')}}</el-button>
<el-button type="primary" :loading="isSubmiting" size="medium" native-type="submit" @click.prevent="handleSubmit">{{$t('clone')}}</el-button>
<el-button type="primary" :loading="isSubmiting" size="medium" native-type="submit" @click.prevent="handleSubmit">{{$t('rename')}}</el-button>
</el-form-item>
</el-form>
</div>
Expand Down Expand Up @@ -79,8 +79,10 @@ export default class RenameNoteBookModal extends Vue {
async onDialogShow (newVal, oldVal) {
// 关闭弹窗时,重置弹窗信息
if (!newVal && oldVal) {
this.resetModal()
this.$refs.$form.clearValidate()
setTimeout(() => {
this.resetModal()
this.$refs.$form.clearValidate()
}, 500)
}
}
Expand Down

0 comments on commit e3f38ea

Please sign in to comment.