fix: no undef var error
This commit is contained in:
@@ -3,8 +3,12 @@ module.exports = {
|
|||||||
rules: {
|
rules: {
|
||||||
'react/no-unstable-nested-components': 1,
|
'react/no-unstable-nested-components': 1,
|
||||||
'no-unused-vars': 'off',
|
'no-unused-vars': 'off',
|
||||||
|
'no-undef': 'error',
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
'@typescript-eslint/no-unused-vars': 'off',
|
||||||
'@typescript-eslint/class-name-casing': 'off'
|
'@typescript-eslint/class-name-casing': 'off'
|
||||||
},
|
},
|
||||||
|
globals: {
|
||||||
|
Global: 'readonly'
|
||||||
|
},
|
||||||
ignorePatterns: ['public/static/']
|
ignorePatterns: ['public/static/']
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export default function useWindowResize() {
|
|||||||
width: window.innerWidth,
|
width: window.innerWidth,
|
||||||
height: window.innerHeight
|
height: window.innerHeight
|
||||||
});
|
});
|
||||||
|
console.log('size:', window.innerWidth, window.innerHeight);
|
||||||
const [isMobile, setIsMobile] = useState<boolean>(false);
|
const [isMobile, setIsMobile] = useState<boolean>(false);
|
||||||
const [isTablet, setIsTablet] = useState<boolean>(false);
|
const [isTablet, setIsTablet] = useState<boolean>(false);
|
||||||
const [isDesktop, setIsDesktop] = useState<boolean>(false);
|
const [isDesktop, setIsDesktop] = useState<boolean>(false);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import {
|
|||||||
ModelscopeTaskMap,
|
ModelscopeTaskMap,
|
||||||
backendOptionsMap,
|
backendOptionsMap,
|
||||||
backendTipsList,
|
backendTipsList,
|
||||||
|
localPathTipsList,
|
||||||
modelSourceMap,
|
modelSourceMap,
|
||||||
modelTaskMap,
|
modelTaskMap,
|
||||||
ollamaModelOptions,
|
ollamaModelOptions,
|
||||||
@@ -79,6 +80,7 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
|||||||
onSourceChange,
|
onSourceChange,
|
||||||
onOk
|
onOk
|
||||||
} = props;
|
} = props;
|
||||||
|
console.log('DataForm -> props');
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const [modelTask, setModelTask] = useState<Record<string, any>>({
|
const [modelTask, setModelTask] = useState<Record<string, any>>({
|
||||||
|
|||||||
Reference in New Issue
Block a user