diff --git a/.eslintrc.js b/.eslintrc.js index bede820f..b809b228 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,8 +3,12 @@ module.exports = { rules: { 'react/no-unstable-nested-components': 1, 'no-unused-vars': 'off', + 'no-undef': 'error', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/class-name-casing': 'off' }, + globals: { + Global: 'readonly' + }, ignorePatterns: ['public/static/'] }; diff --git a/src/hooks/use-window-resize.ts b/src/hooks/use-window-resize.ts index 1cbdf5e0..74946172 100644 --- a/src/hooks/use-window-resize.ts +++ b/src/hooks/use-window-resize.ts @@ -7,6 +7,7 @@ export default function useWindowResize() { width: window.innerWidth, height: window.innerHeight }); + console.log('size:', window.innerWidth, window.innerHeight); const [isMobile, setIsMobile] = useState(false); const [isTablet, setIsTablet] = useState(false); const [isDesktop, setIsDesktop] = useState(false); diff --git a/src/pages/llmodels/components/data-form.tsx b/src/pages/llmodels/components/data-form.tsx index 55c1d6c0..1caec67e 100644 --- a/src/pages/llmodels/components/data-form.tsx +++ b/src/pages/llmodels/components/data-form.tsx @@ -22,6 +22,7 @@ import { ModelscopeTaskMap, backendOptionsMap, backendTipsList, + localPathTipsList, modelSourceMap, modelTaskMap, ollamaModelOptions, @@ -79,6 +80,7 @@ const DataForm: React.FC = forwardRef((props, ref) => { onSourceChange, onOk } = props; + console.log('DataForm -> props'); const [form] = Form.useForm(); const intl = useIntl(); const [modelTask, setModelTask] = useState>({