Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use dumi #558

Merged
merged 10 commits into from
Dec 3, 2020
Merged

feat: use dumi #558

merged 10 commits into from
Dec 3, 2020

Conversation

xrkffgg
Copy link
Member

@xrkffgg xrkffgg commented Nov 30, 2020

close #557
close #496
close #407
close #383

@vercel
Copy link

vercel bot commented Nov 30, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/table/hvcsybku3
✅ Preview: https://table-git-dumi.react-component.vercel.app

@@ -2,8 +2,8 @@ import React from 'react';
import CSSMotionList from 'rc-animate/lib/CSSMotionList';
import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import Table from '../src';
import '../assets/index.less';
import Table from 'rc-table';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

奇了怪了,设了 tsconfig 别名,不生效呢

@xrkffgg
Copy link
Member Author

xrkffgg commented Nov 30, 2020

使用了 dumi 1.0.37 这个 a 标签后面的 icon 感觉有点不好看,所以打算用 样式隐藏掉。

image

使用 1.1.0-rc4 就报错,rc-table 找不到,但是 rc-field-form https://github.com/react-component/field-form 这个项目使用了 1.1.0-rc4 别名就不报错

真是见鬼了

@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #558 (af89350) into master (dec98b0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #558   +/-   ##
=======================================
  Coverage   99.87%   99.87%           
=======================================
  Files          26       26           
  Lines         803      803           
  Branches      234      234           
=======================================
  Hits          802      802           
  Misses          1        1           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dec98b0...af89350. Read the comment docs.

@xrkffgg
Copy link
Member Author

xrkffgg commented Dec 2, 2020

O了

1

现使用的是 dumi 的 1.0,多增加图片隐藏后缀图标的样式。
该样式 1.1 添加了,但目前 1.1 rc 版本,在别名这有点小问题。
因为:

image

field-form 因为不存在多版本的引用,所以使用 1.1-rc 没有问题。

2

image

一生成 font-size:0 一个生成 font-size: 0px

所以这里没有加 @umijs/test ,保持 father test

@xrkffgg xrkffgg requested review from afc163, zombieJ and kerm1it December 2, 2020 07:58
import Table from '../src';
import '../assets/index.less';
import Table from 'rc-table';
import '../../assets/index.less';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 assets 用相对路径可以吗?这样的话使用 rc-table 就没意义了?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个没想好起啥别名?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里导入写的时候考虑用户会直接 copy 代码可以运行,不然写的那些 rc-table 的别名就全没有意义了。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

能这种别名吗?我设了不起作用啊

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感觉 除非是 自己引自己 node_modules 才能找到呀

import 'react-resizable/css/styles.css';
import { ColumnType } from '../src/interface';
import { ColumnType } from '@/interface';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个用 @ 可以吗?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsconfig 设的别名,这个可以用。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个会直接展示在代码片段上,用户直接 copy 代码可以用吗?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

像这样

import { ColumnsType } from '../src/interface';
import Table from 'rc-table';
import '../../assets/index.less';
import { ColumnsType } from '@/interface';
import { useCheckbox } from './utils/useInput';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 utils 引用路径

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@afc163 afc163 merged commit 87c4d13 into master Dec 3, 2020
@afc163 afc163 deleted the dumi branch December 3, 2020 04:09
@xrkffgg xrkffgg mentioned this pull request Dec 7, 2020
18 tasks
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants