|
|
|
@ -1,14 +1,40 @@
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
import styles from './style/index.module.less';
|
|
|
|
import styles from './style/index.module.less';
|
|
|
|
import CustomCard from '@/components/CustomCard/index';
|
|
|
|
import CustomCard from '@/components/CustomCard/index';
|
|
|
|
import CompCard from './compCard';
|
|
|
|
import CompCard from './compCard';
|
|
|
|
import { menu } from './test/data';
|
|
|
|
import { menu } from './test/data';
|
|
|
|
import { Tabs, Input, Select } from '@arco-design/web-react';
|
|
|
|
import { Tabs, Input, Select } from '@arco-design/web-react';
|
|
|
|
|
|
|
|
import { getComponentMarket } from '@/api/componentMarket';
|
|
|
|
|
|
|
|
import { getComponentClassify } from '@/api/componentClassify';
|
|
|
|
|
|
|
|
|
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
|
const TabPane = Tabs.TabPane;
|
|
|
|
const InputSearch = Input.Search;
|
|
|
|
const InputSearch = Input.Search;
|
|
|
|
|
|
|
|
|
|
|
|
function ComponentMarket() {
|
|
|
|
function ComponentMarket() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getMarketData = async () => {
|
|
|
|
|
|
|
|
const params = {
|
|
|
|
|
|
|
|
componentClassify: '',
|
|
|
|
|
|
|
|
componentClassifyLabel: '全部',
|
|
|
|
|
|
|
|
keyword: '',
|
|
|
|
|
|
|
|
current: 1,
|
|
|
|
|
|
|
|
size: 15
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
const res: any = await getComponentMarket(params);
|
|
|
|
|
|
|
|
console.log('res:', res);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getMenuList = async () => {
|
|
|
|
|
|
|
|
const res: any = await getComponentClassify('component');
|
|
|
|
|
|
|
|
console.log('menu:', res);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
getMarketData();
|
|
|
|
|
|
|
|
getMenuList();
|
|
|
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className={styles['comp-market-container']}>
|
|
|
|
<div className={styles['comp-market-container']}>
|
|
|
|
|