refactor: StatusSwitch使用v-model替换v-mode:value

This commit is contained in:
dhb52 2024-05-05 01:22:13 +08:00
parent 7e48682fbe
commit 0e8af7d19b
6 changed files with 7 additions and 7 deletions

View File

@ -5,7 +5,7 @@ defineOptions({
name: 'StatusSwitch'
});
const modelValue = defineModel<Api.Common.EnableStatusNumber>('value', { default: 0 });
const model = defineModel<Api.Common.EnableStatusNumber>({ default: 0 });
interface Emits {
(e: 'fetch', value: Api.Common.EnableStatusNumber, callback: () => void): void;
@ -26,7 +26,7 @@ const handleUpdateValue = (value: Api.Common.EnableStatusNumber) => {
<template>
<NSwitch
:value="modelValue"
:value="model"
:loading="loading"
:rubber-band="false"
:checked-value="1"

View File

@ -68,7 +68,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
callback();
};
return <StatusSwitch v-model:value={row.groupStatus} onFetch={fetchFn} />;
return <StatusSwitch v-model={row.groupStatus} onFetch={fetchFn} />;
}
},
{

View File

@ -60,7 +60,7 @@ const { columns, data, getData, loading, mobilePagination, searchParams, resetSe
callback();
};
return <StatusSwitch v-model:value={row.jobStatus} onFetch={fetchFn} />;
return <StatusSwitch v-model={row.jobStatus} onFetch={fetchFn} />;
}
},
{

View File

@ -97,7 +97,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
callback();
};
return <StatusSwitch v-model:value={row.notifyStatus} onFetch={fetchFn} />;
return <StatusSwitch v-model={row.notifyStatus} onFetch={fetchFn} />;
}
},
{

View File

@ -70,7 +70,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
callback();
};
return <StatusSwitch v-model:value={row.sceneStatus} onFetch={fetchFn} />;
return <StatusSwitch v-model={row.sceneStatus} onFetch={fetchFn} />;
}
},
{

View File

@ -85,7 +85,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
callback();
};
return <StatusSwitch v-model:value={row.workflowStatus} onFetch={fetchFn} />;
return <StatusSwitch v-model={row.workflowStatus} onFetch={fetchFn} />;
}
},
{