fix(mes-dv): 修复 MachineryTypeForm 的 TypeScript linter 警告
移除 formData 声明中多余的 `as unknown as number/string` 类型断言, 与 WorkstationForm 等其他表单组件保持一致的写法。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>pull/871/MERGE
parent
c6ab40e175
commit
969eac21df
|
|
@ -65,13 +65,13 @@ const dialogTitle = ref('') // 弹窗的标题
|
||||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined as unknown as number,
|
id: undefined,
|
||||||
parentId: undefined as unknown as number,
|
parentId: undefined,
|
||||||
code: undefined as unknown as string,
|
code: undefined,
|
||||||
name: undefined as unknown as string,
|
name: undefined,
|
||||||
sort: 0,
|
sort: 0,
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
remark: undefined as unknown as string
|
remark: undefined
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive({
|
||||||
parentId: [{ required: true, message: '上级类型不能为空', trigger: 'blur' }],
|
parentId: [{ required: true, message: '上级类型不能为空', trigger: 'blur' }],
|
||||||
|
|
@ -132,7 +132,6 @@ const submitForm = async () => {
|
||||||
|
|
||||||
/** 重置表单 */
|
/** 重置表单 */
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
// TODO @AI:linter
|
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
parentId: undefined,
|
parentId: undefined,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue