refactor: StatusSwitch使用v-model替换v-mode:value
This commit is contained in:
parent
7e48682fbe
commit
0e8af7d19b
@ -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"
|
||||
|
@ -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} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -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} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -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} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -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} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -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} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user