Skip to content

Commit

Permalink
docs(salary): reset form
Browse files Browse the repository at this point in the history
  • Loading branch information
YDKD committed Apr 12, 2022
1 parent f9f8afc commit 65ed51b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/views/salary/components/salary-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,8 @@
</el-input>
</div>
<div :class="['salary-form mt-2']">
<el-card shadow="hover">
<el-form
v-if="queried"
ref="salaryFormRef"
:model="salaryForm"
label-width="80px"
>
<el-card v-if="queried" shadow="hover">
<el-form ref="salaryFormRef" :model="salaryForm" label-width="80px">
<el-form-item label="工资编号">
<el-input v-model="salaryForm.id" disabled></el-input>
</el-form-item>
Expand Down
4 changes: 2 additions & 2 deletions src/views/salary/hooks/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Autor: YDKD
* @Date: 2022-04-12 10:27:55
* @LastEditors: YDKD
* @LastEditTime: 2022-04-12 15:42:33
* @LastEditTime: 2022-04-12 15:52:23
*/
import { getWorkerSalary } from '@/api/getApi'
import { updateWorkerSalary } from '@/api/postApi'
Expand All @@ -13,7 +13,7 @@ import { computed, ref } from 'vue'

import type { SalaryForm } from '../types'

const searchName = ref('小王')
const searchName = ref()

const queried = ref(false)

Expand Down
1 change: 1 addition & 0 deletions types/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ declare module 'vue' {
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
ElForm: typeof import('element-plus/es')['ElForm']
'ElForm\u02DD': typeof import('element-plus/es')['ElForm\u02DD']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
Expand Down

0 comments on commit 65ed51b

Please sign in to comment.