diff --git a/web/berry/src/views/Channel/component/TableRow.js b/web/berry/src/views/Channel/component/TableRow.js
index 1e58b678..2a7b9c7f 100644
--- a/web/berry/src/views/Channel/component/TableRow.js
+++ b/web/berry/src/views/Channel/component/TableRow.js
@@ -11,10 +11,7 @@ import {
MenuItem,
TableCell,
IconButton,
- FormControl,
- InputLabel,
- InputAdornment,
- Input,
+ TextField,
Dialog,
DialogActions,
DialogContent,
@@ -31,12 +28,7 @@ import ResponseTimeLabel from "./ResponseTimeLabel";
import GroupLabel from "./GroupLabel";
import NameLabel from "./NameLabel";
-import {
- IconDotsVertical,
- IconEdit,
- IconTrash,
- IconPencil,
-} from "@tabler/icons-react";
+import { IconDotsVertical, IconEdit, IconTrash } from "@tabler/icons-react";
export default function ChannelTableRow({
item,
@@ -79,11 +71,19 @@ export default function ChannelTableRow({
}
};
- const handlePriority = async () => {
- if (priorityValve === "" || priorityValve === item.priority) {
+ const handlePriority = async (event) => {
+ const currentValue = parseInt(event.target.value);
+ if (isNaN(currentValue) || currentValue === priorityValve) {
return;
}
- await manageChannel(item.id, "priority", priorityValve);
+
+ if (currentValue < 0) {
+ showError("优先级不能小于 0");
+ return;
+ }
+
+ await manageChannel(item.id, "priority", currentValue);
+ setPriority(currentValue);
};
const handleResponseTime = async () => {
@@ -170,9 +170,7 @@ export default function ChannelTableRow({
handle_action={handleResponseTime}
/>
-
- {renderNumber(item.used_quota)}
-
+ {renderNumber(item.used_quota)}
-
- 优先级
- setPriority(e.target.value)}
- sx={{ textAlign: "center" }}
- endAdornment={
-
-
-
-
-
- }
- />
-
+