fix(ui): 修复剩余 TS strict 编译错误及类型定义

- EditableTable.d.ts: fixed 类型调整,新增 extraprops
  - FormItem.d.ts: 新增 disabled、onClick 属性
  - EditableTable/Form/FormItem/FormLayout: 添加参数类型注解
  - DataDashboard: screenData 类型修正 + 隐式 any 修复
  - api/datacollection: 新增 index.d.ts 声明文件
  - patientList/receipt: 补充缺失函数声明
This commit is contained in:
wangjian963
2026-06-26 12:10:03 +08:00
parent 3236375154
commit a679fc1700
10 changed files with 36 additions and 23 deletions

View File

@@ -183,7 +183,7 @@
style="width: 100%"
:class="row.error ? 'error-border' : ''"
@change="
async (value) => {
async (value: any) => {
const checkBeforeChange = col.extraprops?.checkBeforeChange;
if (checkBeforeChange && typeof checkBeforeChange === 'function') {
const result = await checkBeforeChange(row, rowIndex, value);
@@ -399,7 +399,7 @@ watch(
{ deep: true }
);
const handleAdd = (index) => {
const handleAdd = (index: number) => {
const newRow = { ...props.defaultRow };
tableData.value.splice(index + 1, 0, newRow);
nextTick(() => {
@@ -407,7 +407,7 @@ const handleAdd = (index) => {
});
};
const handleDelete = (index) => {
const handleDelete = (index: number) => {
if (tableData.value.length === 1) {
Object.keys(tableData.value[0]).forEach((key) => {
tableData.value[0][key] = '';
@@ -484,13 +484,13 @@ const handleSearch = () => {
// 搜索逻辑已在 computed 中处理
};
const validate = (callback) => {
const validate = (callback: any) => {
if (formRef.value) {
return formRef.value.validate(callback);
}
};
const validateField = (props, callback) => {
const validateField = (props: any, callback: any) => {
if (formRef.value) {
return formRef.value.validateField(props, callback);
}
@@ -502,7 +502,7 @@ const resetFields = () => {
}
};
const clearValidate = (props) => {
const clearValidate = (props: any) => {
if (formRef.value) {
formRef.value.clearValidate(props);
}