瀏覽代碼

onChange(value: string, option)

visuddhinanda 11 月之前
父節點
當前提交
d6c3dc9cb3
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      dashboard-v4/dashboard/src/components/channel/ChannelSelectWithToken.tsx

+ 3 - 2
dashboard-v4/dashboard/src/components/channel/ChannelSelectWithToken.tsx

@@ -23,8 +23,9 @@ const ChannelSelectWithToken = ({ channelsId, type, onChange }: IWidget) => {
         label={false}
         placeholder={"选择一个channel"}
         fieldProps={{
-          onChange(value, option) {
+          onChange(value: string, option) {
             console.debug(value);
+
             setChannel(value);
             let output = value;
             if (value) {
@@ -73,7 +74,7 @@ const ChannelSelectWithToken = ({ channelsId, type, onChange }: IWidget) => {
         label={false}
         placeholder={"选择访问权限"}
         fieldProps={{
-          onChange(value, option) {
+          onChange(value: string, option) {
             console.debug(value);
             setPower(value);
             let output = channel;