feat: add baseSelect
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { modelsExpandKeysAtom } from '@/atoms/models';
|
||||
import MoreButton from '@/components/buttons/more';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import { PageAction } from '@/config';
|
||||
import useBodyScroll from '@/hooks/use-body-scroll';
|
||||
import { IS_FIRST_LOGIN, writeState } from '@/utils/localstore/index';
|
||||
import { SyncOutlined } from '@ant-design/icons';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { Button, Input, Pagination, Select, Space, message } from 'antd';
|
||||
import { Button, Input, Pagination, Space, message } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
@@ -278,7 +279,7 @@ const Catalog: React.FC = () => {
|
||||
}
|
||||
onChange={handleNameChange}
|
||||
></Input>
|
||||
<Select
|
||||
<BaseSelect
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({ id: 'models.filter.category' })}
|
||||
@@ -287,7 +288,7 @@ const Catalog: React.FC = () => {
|
||||
maxTagCount={1}
|
||||
onChange={handleCategoryChange}
|
||||
options={categoryOptions}
|
||||
></Select>
|
||||
></BaseSelect>
|
||||
<Button
|
||||
type="text"
|
||||
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { getRequestId } from '@/atoms/models';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import SimpleOverlay from '@/components/simple-overlay';
|
||||
import { createAxiosToken } from '@/hooks/use-chunk-request';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Empty, Select, Spin } from 'antd';
|
||||
import { Empty, Spin } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, {
|
||||
forwardRef,
|
||||
@@ -367,7 +368,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
{intl.formatMessage({ id: 'models.available.files' })} (
|
||||
{dataSource.fileList.length || 0})
|
||||
</span>
|
||||
<Select
|
||||
<BaseSelect
|
||||
value={sortType}
|
||||
onChange={handleSortChange}
|
||||
labelRender={({ label }) => {
|
||||
@@ -380,7 +381,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
options={modelFilesSortOptions.current}
|
||||
size="middle"
|
||||
style={{ width: '120px' }}
|
||||
></Select>
|
||||
></BaseSelect>
|
||||
</TitleWrapper>
|
||||
{dataSource.loading && (
|
||||
<div className="spin-wrapper">
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { getRequestId, setRquestId } from '@/atoms/models';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import { createAxiosToken } from '@/hooks/use-chunk-request';
|
||||
import { QuestionCircleOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Pagination, Select, Tooltip } from 'antd';
|
||||
import { Pagination, Tooltip } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
@@ -547,7 +548,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
</div>
|
||||
<div className={SearchStyle.filter}>
|
||||
<span>
|
||||
<Select
|
||||
<BaseSelect
|
||||
value={dataSource.sortType}
|
||||
onChange={handleSortChange}
|
||||
labelRender={({ label }) => {
|
||||
@@ -560,7 +561,7 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
options={modelFilesSortOptions.current}
|
||||
size="middle"
|
||||
style={{ width: '150px' }}
|
||||
></Select>
|
||||
></BaseSelect>
|
||||
{/* <Checkbox
|
||||
onChange={handleFilterGGUFChange}
|
||||
className="m-l-8"
|
||||
|
||||
@@ -4,6 +4,7 @@ import DropDownActions from '@/components/drop-down-actions';
|
||||
import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import { PageSize } from '@/components/logs-viewer/config';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import SealTable from '@/components/seal-table';
|
||||
import { PageAction } from '@/config';
|
||||
import useBodyScroll from '@/hooks/use-body-scroll';
|
||||
@@ -16,7 +17,7 @@ import { DownOutlined, SyncOutlined } from '@ant-design/icons';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { useMemoizedFn } from 'ahooks';
|
||||
import { Button, Input, Select, Space, message } from 'antd';
|
||||
import { Button, Input, Space, message } from 'antd';
|
||||
import { useAtom } from 'jotai';
|
||||
import _ from 'lodash';
|
||||
import React, {
|
||||
@@ -584,7 +585,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
allowClear
|
||||
onChange={handleNameChange}
|
||||
></Input>
|
||||
<Select
|
||||
<BaseSelect
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({
|
||||
@@ -595,8 +596,8 @@ const Models: React.FC<ModelsProps> = ({
|
||||
maxTagCount={1}
|
||||
onChange={handleCategoryChange}
|
||||
options={modelCategories.filter((item) => item.value)}
|
||||
></Select>
|
||||
<Select
|
||||
></BaseSelect>
|
||||
<BaseSelect
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({
|
||||
@@ -607,7 +608,7 @@ const Models: React.FC<ModelsProps> = ({
|
||||
maxTagCount={1}
|
||||
onChange={handleClusterChange}
|
||||
options={clusterList}
|
||||
></Select>
|
||||
></BaseSelect>
|
||||
<Button
|
||||
type="text"
|
||||
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import MoreButton from '@/components/buttons/more';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import CardList from '@/components/templates/card-list';
|
||||
import CardSkeleton from '@/components/templates/card-skelton';
|
||||
import useTableFetch from '@/hooks/use-table-fetch';
|
||||
import { SyncOutlined } from '@ant-design/icons';
|
||||
import { PageContainer } from '@ant-design/pro-components';
|
||||
import { useIntl, useNavigate } from '@umijs/max';
|
||||
import { Button, Input, Select, Space } from 'antd';
|
||||
import { Button, Input, Space } from 'antd';
|
||||
import React from 'react';
|
||||
import { MODELS_API, queryModelsList } from './apis';
|
||||
import ModelItem from './components/model-item';
|
||||
@@ -96,7 +97,7 @@ const UserModels: React.FC = () => {
|
||||
}
|
||||
onChange={handleNameChange}
|
||||
></Input>
|
||||
<Select
|
||||
<BaseSelect
|
||||
allowClear
|
||||
showSearch={false}
|
||||
placeholder={intl.formatMessage({ id: 'models.filter.category' })}
|
||||
@@ -105,7 +106,7 @@ const UserModels: React.FC = () => {
|
||||
maxTagCount={1}
|
||||
options={categoryOptions}
|
||||
onChange={handleCategoryChange}
|
||||
></Select>
|
||||
></BaseSelect>
|
||||
<Button
|
||||
type="text"
|
||||
style={{ color: 'var(--ant-color-text-tertiary)' }}
|
||||
|
||||
Reference in New Issue
Block a user