Browse Source

add material example

dev
powersir 1 year ago
parent
commit
8322eefba6
7 changed files with 1184 additions and 150 deletions
  1. +852
    -0
      mock/findMaterialPage.json
  2. +112
    -115
      mock/menu.json
  3. +3
    -14
      src/layout/index.tsx
  4. +3
    -3
      src/layout/slide/menus.tsx
  5. +18
    -11
      src/models/user.ts
  6. +193
    -4
      src/pages/custom/product/material/index.tsx
  7. +3
    -3
      src/pages/custom/product/sample/index.tsx

+ 852
- 0
mock/findMaterialPage.json View File

@@ -0,0 +1,852 @@
[
{
"id": 1513,
"createTime": "2023-08-07 17:27:51",
"classifyId": 22,
"materialImgId": 1988596,
"materialName": "20230606164714A209",
"materialRemark": "2",
"materialWidth": 1181.0000,
"materialHeight": 1299.0000,
"materialSize": 447442,
"createId": 1,
"classify": {
"id": 22,
"classifyName": "死神"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/8/07/20230807172750A009.png"
},
{
"id": 1509,
"createTime": "2023-06-09 14:18:37",
"classifyId": 6,
"materialImgId": 1936456,
"materialName": "20230413162134A008",
"materialRemark": "MDINU BUGS",
"materialWidth": 150.0000,
"materialHeight": 203.0000,
"materialSize": 14727,
"createId": 1,
"classify": {
"id": 6,
"classifyName": "图标"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/09/20230413162134A008_20230609141837A238.png"
},
{
"id": 1511,
"createTime": "2023-06-09 14:18:37",
"classifyId": 6,
"materialImgId": 1936458,
"materialName": "20230413162155A013",
"materialRemark": "MINSG NSUGA",
"materialWidth": 150.0000,
"materialHeight": 150.0000,
"materialSize": 13846,
"createId": 1,
"classify": {
"id": 6,
"classifyName": "图标"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/09/20230413162155A013_20230609141837A240.png"
},
{
"id": 1495,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912403,
"materialName": "20230606144316A520",
"materialRemark": "11",
"materialWidth": 708.0000,
"materialHeight": 870.0000,
"materialSize": 1144374,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606144316A520_20230606164714A205.png"
},
{
"id": 1496,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912404,
"materialName": "20230606144317A521",
"materialRemark": "11",
"materialWidth": 708.0000,
"materialHeight": 746.0000,
"materialSize": 927620,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606144317A521_20230606164714A206.png"
},
{
"id": 1497,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912405,
"materialName": "20230606144320A523",
"materialRemark": "11",
"materialWidth": 708.0000,
"materialHeight": 843.0000,
"materialSize": 1223048,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606144320A523_20230606164714A207.png"
},
{
"id": 1498,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912406,
"materialName": "20230606144322A525",
"materialRemark": "11",
"materialWidth": 885.0000,
"materialHeight": 884.0000,
"materialSize": 1091676,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606144322A525_20230606164714A208.png"
},
{
"id": 1500,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912408,
"materialName": "20230606144729A768",
"materialRemark": "11",
"materialWidth": 1181.0000,
"materialHeight": 1144.0000,
"materialSize": 959972,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606144729A768_20230606164714A210.png"
},
{
"id": 1501,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912409,
"materialName": "20230606145940A524",
"materialRemark": "11",
"materialWidth": 885.0000,
"materialHeight": 1063.0000,
"materialSize": 1225429,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606145940A524_20230606164714A211.png"
},
{
"id": 1502,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912410,
"materialName": "20230606145944A528",
"materialRemark": "11",
"materialWidth": 885.0000,
"materialHeight": 937.0000,
"materialSize": 717184,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606145944A528_20230606164714A212.png"
},
{
"id": 1503,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912411,
"materialName": "20230606145955A538",
"materialRemark": "11",
"materialWidth": 885.0000,
"materialHeight": 1181.0000,
"materialSize": 841458,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606145955A538_20230606164714A213.png"
},
{
"id": 1504,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912412,
"materialName": "20230606150000A542",
"materialRemark": "11",
"materialWidth": 590.0000,
"materialHeight": 787.0000,
"materialSize": 803637,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606150000A542_20230606164714A214.png"
},
{
"id": 1505,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912413,
"materialName": "20230606150006A548",
"materialRemark": "11",
"materialWidth": 708.0000,
"materialHeight": 826.0000,
"materialSize": 1023360,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606150006A548_20230606164714A215.png"
},
{
"id": 1506,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912414,
"materialName": "20230606150013A554",
"materialRemark": "11",
"materialWidth": 708.0000,
"materialHeight": 944.0000,
"materialSize": 798163,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606150013A554_20230606164714A216.png"
},
{
"id": 1507,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912415,
"materialName": "20230606150040A581",
"materialRemark": "11",
"materialWidth": 590.0000,
"materialHeight": 787.0000,
"materialSize": 933051,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606150040A581_20230606164715A217.png"
},
{
"id": 1508,
"createTime": "2023-06-06 16:47:15",
"classifyId": 52,
"materialImgId": 1912416,
"materialName": "20230606150114A609",
"materialRemark": "11",
"materialWidth": 885.0000,
"materialHeight": 1181.0000,
"materialSize": 897564,
"createId": 2,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606150114A609_20230606164715A218.png"
},
{
"id": 1494,
"createTime": "2023-06-06 10:47:59",
"classifyId": 52,
"materialImgId": 1875246,
"materialName": "HDC-11070015-P",
"materialRemark": "middle finger, multiple boys, 2boys, monochrome, male focus, green theme, labcoat, star (symbol)",
"materialWidth": 885.0000,
"materialHeight": 680.0000,
"materialSize": 433673,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104759A835.png"
},
{
"id": 1493,
"createTime": "2023-06-06 10:47:56",
"classifyId": 52,
"materialImgId": 1875245,
"materialName": "HDC-11070014-P",
"materialRemark": "multiple boys, 2boys, labcoat, male focus, old, transparent background, grey hair, parody, hat, old man, style parody, facial hair, english text, spiked hair",
"materialWidth": 708.0000,
"materialHeight": 923.0000,
"materialSize": 865679,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104756A834.png"
},
{
"id": 1492,
"createTime": "2023-06-06 10:47:55",
"classifyId": 52,
"materialImgId": 1875244,
"materialName": "HDC-11070013-P",
"materialRemark": "1boy, solo, male focus, blue hair, outline, facial hair, english text, looking at viewer, long sleeves, mustache, spiked hair, simple background, hands up, white background, white outline, transparent background, parody",
"materialWidth": 885.0000,
"materialHeight": 733.0000,
"materialSize": 786342,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104754A833.png"
},
{
"id": 1491,
"createTime": "2023-06-06 10:47:53",
"classifyId": 52,
"materialImgId": 1875243,
"materialName": "HDC-11070012-P",
"materialRemark": "1boy, solo, male focus, teeth, open mouth, simple background, white background, english text, smile, spiked hair",
"materialWidth": 1181.0000,
"materialHeight": 1083.0000,
"materialSize": 612564,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104753A832.png"
},
{
"id": 1490,
"createTime": "2023-06-06 10:47:52",
"classifyId": 52,
"materialImgId": 1875242,
"materialName": "HDC-11070011-P",
"materialRemark": "white background, solo, simple background, no humans, full body, 1girl",
"materialWidth": 1771.0000,
"materialHeight": 2278.0000,
"materialSize": 663343,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104752A831.png"
},
{
"id": 1489,
"createTime": "2023-06-06 10:47:51",
"classifyId": 52,
"materialImgId": 1875241,
"materialName": "HDC-11070010-P",
"materialRemark": "multiple boys, male focus, baseball bat, hat, baseball cap, smile, baseball uniform, bird, 3boys, open mouth, duck, furry male, sportswear, white background, gloves",
"materialWidth": 1181.0000,
"materialHeight": 936.0000,
"materialSize": 691486,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104750A830.png"
},
{
"id": 1488,
"createTime": "2023-06-06 10:47:50",
"classifyId": 52,
"materialImgId": 1875240,
"materialName": "HDC-11070009-P",
"materialRemark": "white background, simple background, no humans, solo, closed eyes",
"materialWidth": 1181.0000,
"materialHeight": 1554.0000,
"materialSize": 583647,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104749A829.png"
},
{
"id": 1487,
"createTime": "2023-06-06 10:47:49",
"classifyId": 52,
"materialImgId": 1875239,
"materialName": "HDC-11070008-P",
"materialRemark": "top hat, no humans, simple background, white background, solo, hat, gloves, yellow eyes, full body, white gloves",
"materialWidth": 885.0000,
"materialHeight": 881.0000,
"materialSize": 535388,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104748A828.png"
},
{
"id": 1486,
"createTime": "2023-06-06 10:47:47",
"classifyId": 52,
"materialImgId": 1875238,
"materialName": "HDC-11070007-P",
"materialRemark": "glasses, no humans, book, white background, english text, red-framed eyewear, simple background, copyright name",
"materialWidth": 1181.0000,
"materialHeight": 1496.0000,
"materialSize": 764613,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104747A827.png"
},
{
"id": 1485,
"createTime": "2023-06-06 10:47:46",
"classifyId": 52,
"materialImgId": 1875237,
"materialName": "HDC-11070006-P",
"materialRemark": "white background, solo, simple background, no humans, full body, 1girl",
"materialWidth": 1771.0000,
"materialHeight": 2278.0000,
"materialSize": 663343,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104746A826.png"
},
{
"id": 1484,
"createTime": "2023-06-06 10:47:45",
"classifyId": 52,
"materialImgId": 1875236,
"materialName": "HDC-11070002-P",
"materialRemark": "pokemon (creature), simple background, white background, no humans, solo, monochrome, from side",
"materialWidth": 1181.0000,
"materialHeight": 641.0000,
"materialSize": 481447,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104744A825.png"
},
{
"id": 1483,
"createTime": "2023-06-06 10:47:44",
"classifyId": 52,
"materialImgId": 1875235,
"materialName": "HDC-11070001-P",
"materialRemark": "monochrome, red theme, white background, no humans, solo, simple background, 1girl, blood, oekaki",
"materialWidth": 1181.0000,
"materialHeight": 693.0000,
"materialSize": 301786,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104743A824.png"
},
{
"id": 1482,
"createTime": "2023-06-06 10:47:43",
"classifyId": 52,
"materialImgId": 1875234,
"materialName": "HDC-11040037-P",
"materialRemark": "no humans, traditional youkai, white background, simple background, spot color, monochrome, sitting, silhouette",
"materialWidth": 1181.0000,
"materialHeight": 439.0000,
"materialSize": 312481,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104742A823.png"
},
{
"id": 1481,
"createTime": "2023-06-06 10:47:42",
"classifyId": 52,
"materialImgId": 1875233,
"materialName": "HDC-11040036-P",
"materialRemark": "flower, no humans, white background, solo, simple background, smile, daisy, white gloves, one eye closed, gloves, looking at viewer, white flower",
"materialWidth": 1181.0000,
"materialHeight": 1135.0000,
"materialSize": 701896,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104741A822.png"
},
{
"id": 1480,
"createTime": "2023-06-06 10:47:41",
"classifyId": 52,
"materialImgId": 1875232,
"materialName": "HDC-11040035-P",
"materialRemark": "daisy, bow, flower, polka dot, solo, hair bow, polka dot bow, white background, white gloves, parody, cosplay, simple background, red bow, gloves, black hair, white flower, retro artstyle, eyelashes, official style, jaggy lines",
"materialWidth": 1181.0000,
"materialHeight": 1306.0000,
"materialSize": 810505,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104740A821.png"
},
{
"id": 1479,
"createTime": "2023-06-06 10:47:39",
"classifyId": 52,
"materialImgId": 1875231,
"materialName": "HDC-11040034-P",
"materialRemark": "1girl, power (chainsaw man), cross-shaped pupils, horns, sharp teeth, necktie, teeth, solo, shirt, symbol-shaped pupils, black necktie, open mouth, collared shirt, white shirt, tongue, looking at viewer, hair between eyes, long hair, pink hair, red eyes, red horns, jacket, tongue out, demon horns, black pants, breasts, smile, pants, black jacket, character name, red background",
"materialWidth": 708.0000,
"materialHeight": 857.0000,
"materialSize": 874734,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104739A820.png"
},
{
"id": 1478,
"createTime": "2023-06-06 10:47:38",
"classifyId": 52,
"materialImgId": 1875230,
"materialName": "HDC-11040033-P",
"materialRemark": "1girl, power (chainsaw man), horns, cross-shaped pupils, sharp teeth, necktie, teeth, solo, shirt, symbol-shaped pupils, black necktie, open mouth, collared shirt, white shirt, tongue, looking at viewer, hair between eyes, long hair, pink hair, red eyes, red horns, jacket, tongue out, demon horns, black pants, breasts, smile, pants, black jacket, character name, red background",
"materialWidth": 708.0000,
"materialHeight": 857.0000,
"materialSize": 873522,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104737A819.png"
},
{
"id": 1477,
"createTime": "2023-06-06 10:47:36",
"classifyId": 52,
"materialImgId": 1875229,
"materialName": "HDC-11040027-P",
"materialRemark": "bug, no humans, blue butterfly, butterfly, white background, simple background, dated, artist name, english text, animal",
"materialWidth": 885.0000,
"materialHeight": 1033.0000,
"materialSize": 673256,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104736A818.png"
},
{
"id": 1476,
"createTime": "2023-06-06 10:47:35",
"classifyId": 52,
"materialImgId": 1875228,
"materialName": "HDC-11040019-P",
"materialRemark": "1girl, game boy, handheld game console, twintails, solo, sitting, aqua hair, bag, hatsune miku, mask, playstation portable",
"materialWidth": 1181.0000,
"materialHeight": 1036.0000,
"materialSize": 750076,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104734A817.png"
},
{
"id": 1475,
"createTime": "2023-06-06 10:47:34",
"classifyId": 52,
"materialImgId": 1875227,
"materialName": "HDC-11040018-P",
"materialRemark": "1girl, game boy, twintails, sitting, handheld game console, solo, aqua hair, mask, torn clothes, hatsune miku, shoes, bag, alternate hairstyle, simple background, white background",
"materialWidth": 885.0000,
"materialHeight": 878.0000,
"materialSize": 564000,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104733A816.png"
},
{
"id": 1474,
"createTime": "2023-06-06 10:47:33",
"classifyId": 52,
"materialImgId": 1875226,
"materialName": "HDC-11040011-P",
"materialRemark": "1girl, solo, hands on own face, hands on own cheeks, pink theme, monochrome, blush, looking at viewer, smile, yandere, parody, long hair, tongue out, tongue, pink border",
"materialWidth": 1771.0000,
"materialHeight": 1189.0000,
"materialSize": 569899,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104732A815.png"
},
{
"id": 1473,
"createTime": "2023-06-06 10:47:32",
"classifyId": 52,
"materialImgId": 1875225,
"materialName": "HDC-11040005-P",
"materialRemark": "1girl, toga himiko, solo, monochrome, double bun, hair bun, greyscale, skirt, bangs, fangs, cardigan, looking at viewer, blush, school uniform, blunt bangs, pleated skirt, open mouth, socks, simple background, smile, white background, sitting, neckerchief, heart, tongue, serafuku, messy hair, long sleeves, slit pupils, kneehighs, teeth, sleeves past wrists, shoes, sailor collar, tongue out",
"materialWidth": 885.0000,
"materialHeight": 1181.0000,
"materialSize": 669948,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104731A814.png"
},
{
"id": 1472,
"createTime": "2023-06-06 10:47:30",
"classifyId": 52,
"materialImgId": 1875224,
"materialName": "HDC-11040004-P",
"materialRemark": "no humans, white background, food focus, simple background, english text, yellow theme, cup, still life, food",
"materialWidth": 1181.0000,
"materialHeight": 987.0000,
"materialSize": 827456,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104730A813.png"
},
{
"id": 1471,
"createTime": "2023-06-06 10:47:29",
"classifyId": 52,
"materialImgId": 1875223,
"materialName": "HDC-11040001-P",
"materialRemark": "solo, pink eyes, strawberry, hood, fruit, pink hair, 1boy, male focus, food, bandaid, one eye closed, pants, white background, long sleeves, short hair, open mouth, pink jacket, animal hood, hood up, sitting, jacket, blue pants, shirt",
"materialWidth": 885.0000,
"materialHeight": 828.0000,
"materialSize": 528100,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104729A812.png"
},
{
"id": 1470,
"createTime": "2023-06-06 10:47:28",
"classifyId": 52,
"materialImgId": 1875222,
"materialName": "HDC-11030036-P",
"materialRemark": "no humans, solo, simple background, white background, looking at viewer, open mouth, tongue, animal focus, cat, whiskers, smile, animal",
"materialWidth": 885.0000,
"materialHeight": 652.0000,
"materialSize": 683882,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104728A811.png"
},
{
"id": 1469,
"createTime": "2023-06-06 10:47:27",
"classifyId": 52,
"materialImgId": 1875221,
"materialName": "HDC-11030035-P",
"materialRemark": "tsukino usagi, crescent earrings, crescent, sailor moon, 1girl, choker, jewelry, heart choker, solo, earrings, mouth mask, hands in pockets, weapon, jacket, blonde hair, mask, patch, long hair, circlet, twintails, upper body, looking at viewer, bandaid, sword, forehead jewel, hair bun, heart, double bun, purple eyes, bangs, crescent moon, forehead protector",
"materialWidth": 708.0000,
"materialHeight": 720.0000,
"materialSize": 953346,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104727A810.png"
},
{
"id": 1468,
"createTime": "2023-06-06 10:47:26",
"classifyId": 52,
"materialImgId": 1875220,
"materialName": "HDC-11010022-P",
"materialRemark": "apple, food, old woman, fruit, holding, multiple boys, white background, smile, old, staff, basket, hood, tentacles, 1girl, red footwear, makeup, simple background, white hair, colored skin, holding food, bird, standing, cape, jewelry, looking at viewer, cloak, blue skin",
"materialWidth": 885.0000,
"materialHeight": 639.0000,
"materialSize": 748952,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104725A809.png"
},
{
"id": 1467,
"createTime": "2023-06-06 10:47:25",
"classifyId": 52,
"materialImgId": 1875219,
"materialName": "HDC-11010021-P",
"materialRemark": "monochrome, greyscale, hat, english text, 6+boys, multiple boys, makeup, smile, teeth, pirate hat, holding, lipstick, grin, crown, jewelry, earrings, open mouth",
"materialWidth": 708.0000,
"materialHeight": 692.0000,
"materialSize": 576629,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104724A808.png"
},
{
"id": 1466,
"createTime": "2023-06-06 10:47:23",
"classifyId": 52,
"materialImgId": 1875218,
"materialName": "HDC-11010019-P",
"materialRemark": "solo, spider web, silk, white background, spider, smile, simple background, skull, pink hair, 1girl, sketch, holding, upper body, looking at viewer, skeleton, bug",
"materialWidth": 1181.0000,
"materialHeight": 1199.0000,
"materialSize": 524081,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104722A807.png"
},
{
"id": 1465,
"createTime": "2023-06-06 10:47:21",
"classifyId": 52,
"materialImgId": 1875217,
"materialName": "HDC-11010015-P",
"materialRemark": "multiple boys, brown hair, striped, hat, baseball cap, dark skin, backpack, jacket, dark-skinned male, pink dress, bag, white background, headband, camera, pants, shirt, striped shirt, backwards hat, dress, 1girl, parody, bandana, black hair, simple background, vest, holding, english text, 3boys, standing, blue jacket, white skin, short hair, shoes",
"materialWidth": 885.0000,
"materialHeight": 711.0000,
"materialSize": 617393,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104721A806.png"
},
{
"id": 1464,
"createTime": "2023-06-06 10:47:19",
"classifyId": 52,
"materialImgId": 1875215,
"materialName": "HDC-11010010-P",
"materialRemark": "statue, squatting, solo, wings, white background, 1boy, english text, male focus, simple background",
"materialWidth": 1181.0000,
"materialHeight": 804.0000,
"materialSize": 752887,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104719A804.png"
},
{
"id": 1463,
"createTime": "2023-06-06 10:47:18",
"classifyId": 52,
"materialImgId": 1875214,
"materialName": "HDC-11010009-P",
"materialRemark": "1girl, solo, mole under eye, red eyes, flower, mole, black hair, choker, smile, one eye closed, long hair, bangs, red theme, black choker, looking at viewer, parted lips, plant, portrait, head rest, red flower",
"materialWidth": 885.0000,
"materialHeight": 920.0000,
"materialSize": 1017249,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104718A803.png"
},
{
"id": 1462,
"createTime": "2023-06-06 10:47:17",
"classifyId": 52,
"materialImgId": 1875213,
"materialName": "HDC-11010005-P",
"materialRemark": "pokemon (creature), no humans, waves, solo, claws, water, open mouth, parody, fangs, watercraft, white background",
"materialWidth": 708.0000,
"materialHeight": 944.0000,
"materialSize": 952583,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104716A802.png"
},
{
"id": 1461,
"createTime": "2023-06-06 10:47:15",
"classifyId": 52,
"materialImgId": 1875212,
"materialName": "HDC-11010004-P",
"materialRemark": "charizard, pokemon (creature), fire, no humans, open mouth, tongue, claws, flame-tipped tail, building, breathing fire, giant, fangs",
"materialWidth": 708.0000,
"materialHeight": 784.0000,
"materialSize": 757746,
"createId": 1,
"classify": {
"id": 52,
"classifyName": "其他"
},
"materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104715A801.png"
}
]

src/layout/menu.json → mock/menu.json View File

@@ -5,11 +5,10 @@
"name": "首页",
"icon": "HomeOutlined",
"type":0,
"route": "/dashboard",
"filePath": "/dashboard/index.tsx",
"orderNumber": 0,
"url":"",
"show":true
"path": "/dashboard",
"component": "/dashboard/index.tsx",
"keepAlive": false,
"visible":true
},
{
"id": "custom-made",
@@ -17,11 +16,10 @@
"name": "定制选品",
"icon": "BgColorsOutlined",
"type":0,
"route": "/custom",
"filePath": "",
"orderNumber": 0,
"url":"",
"show":true
"path": "/custom",
"component": "",
"keepAlive": false,
"visible":true
},

{
@@ -30,11 +28,11 @@
"name": "定制商品",
"icon": "",
"type":2,
"route": "/product",
"filePath": "",
"path": "/product",
"component": "",
"orderNumber": 2,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "sample",
@@ -42,11 +40,11 @@
"name": "样机",
"icon": "",
"type":0,
"route": "/sample",
"filePath": "/custom/product/sample/index.tsx",
"path": "/sample",
"component": "/custom/product/sample/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "material",
@@ -54,11 +52,11 @@
"name": "素材",
"icon": "",
"type":0,
"route": "/material",
"filePath": "/custom/product/material/index.tsx",
"path": "/material",
"component": "/custom/product/material/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "shape",
@@ -66,11 +64,11 @@
"name": "款式",
"icon": "",
"type":0,
"route": "/shape",
"filePath": "/custom/product/shape/index.tsx",
"path": "/shape",
"component": "/custom/product/shape/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "finished",
@@ -78,11 +76,11 @@
"name": "成品",
"icon": "",
"type":0,
"route": "/finished",
"filePath": "/custom/product/finished/index.tsx",
"path": "/finished",
"component": "/custom/product/finished/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},


@@ -92,11 +90,11 @@
"name": "模板配置",
"icon": "",
"type":2,
"route": "/template",
"filePath": "",
"path": "/template",
"component": "",
"orderNumber": 2,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "dict",
@@ -104,11 +102,11 @@
"name": "数据字典",
"icon": "",
"type":0,
"route": "/dict",
"filePath": "/custom/template/dict/index.tsx",
"path": "/dict",
"component": "/custom/template/dict/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "xp-template",
@@ -116,11 +114,11 @@
"name": "虾皮模板",
"icon": "",
"type":0,
"route": "/xiapi",
"filePath": "/custom/template/xiapi/index.tsx",
"path": "/xiapi",
"component": "/custom/template/xiapi/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "rules",
@@ -128,11 +126,11 @@
"name": "规则引擎",
"icon": "",
"type":0,
"route": "/rules",
"filePath": "/custom/template/rules/index.tsx",
"path": "/rules",
"component": "/custom/template/rules/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},


@@ -142,11 +140,11 @@
"name": "平台商品",
"icon": "",
"type":2,
"route": "/platform-product",
"filePath": "",
"path": "/platform-product",
"component": "",
"orderNumber": 2,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "xiapi",
@@ -154,11 +152,11 @@
"name": "虾皮",
"icon": "",
"type":0,
"route": "/xiapi",
"filePath": "/custom/platform-product/xiapi/index.tsx",
"path": "/xiapi",
"component": "/custom/platform-product/xiapi/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "amazone",
@@ -166,11 +164,11 @@
"name": "亚马逊",
"icon": "",
"type":0,
"route": "/amazone",
"filePath": "/custom/platform-product/amazone/index.tsx",
"path": "/amazone",
"component": "/custom/platform-product/amazone/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},

{
@@ -179,11 +177,11 @@
"name": "SDS商品",
"icon": "",
"type":2,
"route": "/sds",
"filePath": "",
"path": "/sds",
"component": "",
"orderNumber": 2,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "xiapi",
@@ -191,11 +189,11 @@
"name": "成品库",
"icon": "",
"type":0,
"route": "/finished-product-warehouse",
"filePath": "/custom/sds/finished-product-warehouse/index.tsx",
"path": "/finished-product-warehouse",
"component": "/custom/sds/finished-product-warehouse/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "sds-shape",
@@ -203,11 +201,11 @@
"name": "款式",
"icon": "",
"type":0,
"route": "/sds-shape",
"filePath": "/custom/sds/sds-shape/index.tsx",
"path": "/sds-shape",
"component": "/custom/sds/sds-shape/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "pattern-material",
@@ -215,11 +213,11 @@
"name": "图案素材",
"icon": "",
"type":0,
"route": "/pattern-material",
"filePath": "/custom/sds/pattern-material/index.tsx",
"path": "/pattern-material",
"component": "/custom/sds/pattern-material/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},


@@ -229,11 +227,10 @@
"name": "AI应用",
"icon": "HighlightOutlined",
"type":0,
"route": "/ai",
"filePath": "",
"orderNumber": 0,
"url":"",
"show":true
"path": "/ai",
"component": "",
"keepAlive": false,
"visible":true
},
{
"id": "makeup",
@@ -241,11 +238,11 @@
"name": "AI 作图",
"icon": "",
"type":0,
"route": "/makeup",
"filePath": "/ai/makeup/index.tsx",
"path": "/makeup",
"component": "/ai/makeup/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "background",
@@ -253,11 +250,11 @@
"name": "AI 画背景",
"icon": "",
"type":0,
"route": "/background",
"filePath": "/ai/background/index.tsx",
"path": "/background",
"component": "/ai/background/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "fission",
@@ -265,11 +262,11 @@
"name": "图片裂变",
"icon": "",
"type":0,
"route": "/fission",
"filePath": "/ai/fission/index.tsx",
"path": "/fission",
"component": "/ai/fission/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "outline",
@@ -277,11 +274,11 @@
"name": "轮廓出图",
"icon": "",
"type":0,
"route": "/outline",
"filePath": "/ai/outline/index.tsx",
"path": "/outline",
"component": "/ai/outline/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "white-background",
@@ -289,11 +286,11 @@
"name": "一键白底",
"icon": "",
"type":0,
"route": "/white-background",
"filePath": "/ai/white-background/index.tsx",
"path": "/white-background",
"component": "/ai/white-background/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "ps",
@@ -301,11 +298,11 @@
"name": "AI P图",
"icon": "",
"type":0,
"route": "/ps",
"filePath": "/ai/ps/index.tsx",
"path": "/ps",
"component": "/ai/ps/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "try",
@@ -313,11 +310,11 @@
"name": "AI 试装",
"icon": "",
"type":0,
"route": "/try",
"filePath": "/ai/try/index.tsx",
"path": "/try",
"component": "/ai/try/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "makeup2",
@@ -325,11 +322,11 @@
"name": "AI 作图2",
"icon": "",
"type":0,
"route": "/makeup2",
"filePath": "/ai/makeup2/index.tsx",
"path": "/makeup2",
"component": "/ai/makeup2/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
},
{
"id": "smart-libs",
@@ -337,10 +334,10 @@
"name": "旺嘉智库",
"icon": "",
"type":0,
"route": "/smart-libs",
"filePath": "/ai/smart-libs/index.tsx",
"path": "/smart-libs",
"component": "/ai/smart-libs/index.tsx",
"orderNumber": 3,
"url":"",
"show":true
"keepAlive": false,
"visible":true
}
]

+ 3
- 14
src/layout/index.tsx View File

@@ -17,7 +17,7 @@ import TabsLayout from './tabs-layout';
import Content from './content';
import homeService from '@/request/service/home';
import { useRequest } from "@/hooks/use-request";
import menuData from './menu.json'
import menuData from '../../mock/menu.json'

const BasicLayout: React.FC = () => {

@@ -42,7 +42,7 @@ const BasicLayout: React.FC = () => {
const children = menuGroup[menu.id];

const parentPaths = parentMenu?.parentPaths || [];
const path = (parentMenu ? `${parentPaths.at(-1)}${menu.route}` : menu.route) || '';
const path = (parentMenu ? `${parentPaths.at(-1)}${menu.path}` : menu.path) || '';

routes.push({ ...menu, path, parentPaths });

@@ -60,17 +60,6 @@ const BasicLayout: React.FC = () => {

useEffect(() => {
const menus:Array<Menu> = menuData as Array<Menu> ;
// {
// "id": 90121,
// "parentid": 901,
// "homeid": 9,
// "menuName": "国家管理",
// "parentMenuName": "基础配置",
// "pageUrl": "/modules/config/country_list.html",
// "sort": 13,
// "level": 3
// }

console.log(menus);

const menuGroup = menus.reduce<Record<string, Menu[]>>((prev, menu) => {
@@ -95,7 +84,7 @@ const BasicLayout: React.FC = () => {
replaceRoutes('*', [
...routes.map(menu => ({
path: `/*${menu.path}`,
Component: menu.filePath ? lazy(components[menu.filePath]) : null,
Component: menu.component ? lazy(components[menu.component]) : null,
id: `/*${menu.path}`,
handle: {
parentPaths: menu.parentPaths,


+ 3
- 3
src/layout/slide/menus.tsx View File

@@ -274,7 +274,7 @@ const SlideMenu = () => {
]);

const getMenuTitle = (menu: MenuType) => {
if (menu?.children?.filter(menu => menu.show)?.length) {
if (menu?.children?.filter(menu => menu.visible)?.length) {
return menu.name;
}
return (
@@ -285,7 +285,7 @@ const SlideMenu = () => {
const treeMenuData = useCallback((menus: MenuType[]): ItemType[] => {
return (menus)
.map((menu: MenuType) => {
const children = menu?.children?.filter(menu => menu.show) || [];
const children = menu?.children?.filter(menu => menu.visible) || [];
const type = menu.type === 2 ? "group": (menu.type === 3 ? "divider" : "")
return {
type: type,
@@ -300,7 +300,7 @@ const SlideMenu = () => {

const { menus } = useMenusStore();
const menuData = useMemo(() => {
return treeMenuData(menus?.filter(menu => menu.show) || []);
return treeMenuData(menus?.filter(menu => menu.visible) || []);
}, [menus]);

return (


+ 18
- 11
src/models/user.ts View File

@@ -3,11 +3,12 @@ export interface LoginDTO {
password: string;
}


export interface TokenDTO {
expire: number;
token: string;
refreshExpire: number;
userId: number,
accessToken: string;
refreshToken: string;
expiresTime: string;
}

export interface RoleDTO {
@@ -72,21 +73,27 @@ export interface LoginRespDTO {
pop: Array<PopMenu>;
}

// "id": 0,
// "parentId": 1024,
// "name": "芋道",
// "path": "post",
// "component": "system/post/index",
// "icon": "/menu/list",
// "visible": false,
// "keepAlive": false

export interface Menu {
id: string;
parentId?: string;
name?: string;
icon?: string;
type?: number;
route?: string;
filePath?: string;
orderNumber?: number;
url?: string;
show?: boolean;
children?: Menu[];
visible?: boolean;
path: string;
Component?: any;
component?: string;
keepAlive: boolean;
type?: number;
parentPaths?: string[];
children?: Array<Menu>;
}

export interface User {


+ 193
- 4
src/pages/custom/product/material/index.tsx View File

@@ -1,9 +1,198 @@
import { Empty } from 'antd';
import { Space, Tag, Table, Form, Row, Col, Input, InputNumber, Button, Avatar, Divider } from 'antd';
import type { ColumnsType } from 'antd/es/table';
import { t } from '@/utils/i18n';
import { IconBuguang } from '@/assets/icons/buguang';
import React, { useState } from 'react';
import type { TableRowSelection } from 'antd/es/table/interface';
import mData from '../../../../../mock/findMaterialPage.json'


// {
// "id": 1465,
// "createTime": "2023-06-06 10:47:21",
// "classifyId": 52,
// "materialImgId": 1875217,
// "materialName": "HDC-11010015-P",
// "materialRemark": "multiple boys, brown hair, striped, hat, baseball cap, dark skin, backpack, jacket, dark-skinned male, pink dress, bag, white background, headband, camera, pants, shirt, striped shirt, backwards hat, dress, 1girl, parody, bandana, black hair, simple background, vest, holding, english text, 3boys, standing, blue jacket, white skin, short hair, shoes",
// "materialWidth": 885.0000,
// "materialHeight": 711.0000,
// "materialSize": 617393,
// "createId": 1,
// "classify": {
// "id": 52,
// "classifyName": "其他"
// },
// "materialImgUrl": "https://test.vogocm.com:9010/eshop/eshop_img/2023/6/06/20230606104721A806.png"
// },

interface Classify {
id: number;
classifyName: string;
}

interface DataType {
id: number;
createTime: string;
classifyId: number;
materialImgId: number;
materialName: string;
materialRemark: string;
materialWidth: number;
materialHeight: number;
materialSize: number;
createId: number;
materialImgUrl: string;
dictDetails: string[];
classify: Classify;
}

const TablePage: React.FC = () => {

const columns: ColumnsType<DataType> = [
{
title: '图片',
dataIndex: 'materialImgUrl',
key: 'materialImgUrl',
render: (value: string) => (
<div className='flex justify-center'>
{value ? (
<img src={value} className='w-[40px] h-[40px] flex items-center rounded-[50%]' />
) : (
<Avatar className='bg-[gold] align-middle flex items-center justify-center w-[40px] h-[40px]' icon={<IconBuguang />} />
)}
</div>
),
align: 'center',
width: 100,
},
{
title: '标题',
dataIndex: 'materialName',
key: 'materialName',
width: 150,
},
{
title: '分类',
dataIndex: ['classify', 'classifyName'],
key: 'classify',
width: 80,
},
{
title:'描述',
key: 'materialRemark',
dataIndex: 'materialRemark'
},
{
title: '分辨率',
key: 'materialInfo',
render:(_, record) => (
<>
{record.materialWidth}px * {record.materialHeight}px
</>
),
width: 150,
},
{
title: '图片大小',
dataIndex: 'materialSize',
key: 'materialRemark',
render:(value: number) => (
<>
{value}kb
</>
),
width: 100,
},
{
title:'上传时间',
key: 'createTime',
dataIndex: 'createTime',
width: 200,
},
{
title: t("QkOmYwne" /* 操作 */),
key: 'action',
render: (_, record) => (
<Space size="middle" split={(
<Divider type='vertical' />
)}>
<a
onClick={() => {
// setCreateVisible(true);
// setCurRowData(record);
}}>
编辑
</a>
<a
onClick={() => {
// setEditData(record);
// setCreateVisible(true);
}}>
删除
</a>
</Space>
),
width: 150,
},
];

const data: Array<DataType> = mData as Array<DataType>;

const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);

const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
console.log('selectedRowKeys changed: ', newSelectedRowKeys);
setSelectedRowKeys(newSelectedRowKeys);
};

const rowSelection: TableRowSelection<DataType> = {
selectedRowKeys,
onChange: onSelectChange,
selections: [
Table.SELECTION_ALL,
Table.SELECTION_INVERT,
Table.SELECTION_NONE,
{
key: 'odd',
text: 'Select Odd Row',
onSelect: (changeableRowKeys) => {
let newSelectedRowKeys = [];
newSelectedRowKeys = changeableRowKeys.filter((_, index) => {
if (index % 2 !== 0) {
return false;
}
return true;
});
setSelectedRowKeys(newSelectedRowKeys);
},
},
{
key: 'even',
text: 'Select Even Row',
onSelect: (changeableRowKeys) => {
let newSelectedRowKeys = [];
newSelectedRowKeys = changeableRowKeys.filter((_, index) => {
if (index % 2 !== 0) {
return true;
}
return false;
});
setSelectedRowKeys(newSelectedRowKeys);
},
},
],
};


const CustomMade = () => {
return (
<Empty />
<div>
<div className="dark:bg-[rgb(33,41,70)] rounded-md">
<Table rowKey="id" rowSelection={rowSelection} scroll={{ x: true }} columns={columns} dataSource={data} className='bg-transparent'
pagination={{ position: ['bottomRight'] }}
/>
</div>
</div>
);
};

export default CustomMade;
export default TablePage;

+ 3
- 3
src/pages/custom/product/sample/index.tsx View File

@@ -86,7 +86,7 @@ const TablePage: React.FC = () => {
createId: 2,
categoryName: "男士T恤",
createName: "陈相荣✨",
oneImgUrl: "http://192.168.10.136:9000/eshop/eshop_img/2023/7/21/20230721150600A003.png",
oneImgUrl: "https://test.vogocm.com:9010/eshop/eshop_img/2023/8/21/20230821114346A056.jpg",
dictDetails: []
},
{
@@ -98,7 +98,7 @@ const TablePage: React.FC = () => {
createId: 2,
categoryName: "男士T恤",
createName: "陈相荣✨",
oneImgUrl: "http://192.168.10.136:9000/eshop/eshop_img/2023/7/13/20230713172425A025.png",
oneImgUrl: "https://test.vogocm.com:9010/eshop/eshop_img/2023/8/21/20230821114346A056.jpg",
dictDetails: []
}
];
@@ -152,7 +152,7 @@ const TablePage: React.FC = () => {
return (
<div>
<div className="dark:bg-[rgb(33,41,70)] rounded-md">
<Table rowSelection={rowSelection} scroll={{ x: true }} columns={columns} dataSource={data} className='bg-transparent'
<Table rowKey="id" rowSelection={rowSelection} scroll={{ x: true }} columns={columns} dataSource={data} className='bg-transparent'
pagination={{ position: ['bottomRight'] }}
/>
</div>


Loading…
Cancel
Save