push eventahuigo/repo
commit sha 828187798bd7761e0250d7f413dc7bd348bcf53d
all
commit sha e2a131434d01b527c486feaf1ba5b1528bfc1551
Merge branch 'master' of github.com:ahuigo/repo
push time in 2 days
push eventahuigo/dockerfile
commit sha cca7552e66cf0cf621f8af4570e9dcdd2c0038da
antd-pro
push time in 2 days
push eventahuigo/b
commit sha 2f4b1408410bf32007fff69d940bc260df7cb7c2
msg:go-time
push time in 6 days
push eventahuigo/go-lib
commit sha cc2cef21ad23fbd2681377431fe8a4b64c2636bf
docker
commit sha 21771450dfdddc4f556be5bab5b50e4f66775e33
Merge branch 'master' of https://github.com/ahuigo/go-lib
commit sha c88d94be91d3fa6a0f634665b6568cc5e9b8ea3a
example
push time in 6 days
push eventahuigo/b
commit sha 15dc0c5c008984065dec58932d7b93f578da49fc
msg:index
push time in 6 days
push eventahuigo/a
commit sha 5c85d6ae01c5e7bbaaad1628799437f0ec3c99fc
ski
commit sha ff8092aedb622de9fc24e5656d8bb54670335837
index
push time in 6 days
push eventahuigo/a
commit sha c3a63c7214ee66cf8be1afed2e407fdb0abe44dd
webpack
commit sha 1f579a356bf6aab2f8df4abc38298438a53bcf14
Merge branch 'master' of https://github.com/ahuigo/a
commit sha 4c62cb0b0cc4de83dc896dd80d41df526e971490
webpack
push time in 7 days
startedPepsRyuu/nollup
started time in 10 days
startedPepsRyuu/nollup
started time in 10 days
push eventahuigo/a
commit sha bd748100f55217ed9aaa0d6f48cffebaf85f44a9
react-dom
commit sha eb0e620ba353eae1f577e7b0d1cf2dd0c33de721
Merge branch 'master' of https://github.com/ahuigo/a
push time in 12 days
push eventahuigo/a
commit sha 3744dbc60d9beb8a3b8324cee8cb1c82a9b33acb
webpack
commit sha 967ef7bac9855de9e7902719a16e85f26196e707
Merge branch 'master' of https://github.com/ahuigo/a
push time in 12 days
issue commentant-design/ant-design-pro
🧐[问题]怎么将build阶段的环境变量传给app的window 对象?
@chenshuai2144 我在define 里面加了APP_DEV:process.env.APP.ENV.
然后在项目代码(config/defaultSettings.ts
)中使用APP_ENV.
请问我只是想通过环境变量解决让config/defaultSettings.ts 支持 dev/production 模式下的config 切换,有什么非hack 的方法吗?
comment created time in 14 days
push eventahuigo/ahuigo.github.io
commit sha 61b1677d9867585d597b197b43504d8ed4e65eb2
Update index.html
push time in 14 days
issue openedant-design/ant-design-pro
🧐[问题]怎么将构建阶段的环境变量传给应用的window 对象?
🧐 问题描述
有时我们需要将构建阶段的环境变量传给app应用
比如process.env.APP_ENV='dev'
传给app的全局对象window.APP_ENV
💻 示例代码
<!-- 如果你有解决方案,在这里清晰地阐述 -->
🚑 其他信息
这种变量传递应该写在哪里呢?
created time in 15 days
fork ahuigo/react-portal
🎯 React component for transportation of modals, lightboxes, loading bars... to document.body or else.
fork in 17 days
push eventahuigo/a
commit sha 375e0a4b66b86fc4f3b7c7ad119cb2d6ad58a8b8
ts
commit sha d6c9f732e807a493a5083f95ec3d6f6917735907
ts
push time in 17 days
issue commentant-design/ant-design-pro
👑 [需求]支持注册全局的ajax/fetch 的error 信息处理
没错,解决了。
const errorHandler = async (error: { response: Response }): Response => {
const { response } = error;
if (response && response.status) {
// const errorText = codeMessage[response.status] || response.statusText;
const { status, url } = response;
const text = await response.text();
let msg = text;
try {
const res = JSON.parse(text);
msg = res.message || text;
} catch (e) {
}
// message.error(msg)
notification.error({
message: `请求错误 ${status}: ${url}`,
description: msg,
});
} else if (!response) {
notification.error({
description: '您的网络发生异常,无法连接服务器',
message: '网络异常',
});
}
return response;
};
comment created time in 19 days
issue openedant-design/ant-design-pro
👑 [需求]支持注册全局的ajax/fetch 的error 信息处理
🥰 需求描述
为了避免重复书写ajax 弹窗error。 希望 antd pro 能注册一个全局的处理弹出ajax/fetch 请求错误显示。
🧐 解决方案
我自己写了一个Ajax 类:https://github.com/ahuigo/js-lib/blob/master/Ajax.js
在src/layouts/BaseLayout.tsx
中, 注册一个全局
的自动处理背弹窗error 的回调。
import { message } from 'antd';
import Ajax from '@/utils/Ajax';
Ajax.onErrorHandler((msg) => {
message.error(msg);
})
🚑 其他信息
示例图
created time in 19 days
push eventahuigo/js-lib
commit sha 5f98b092d6d9819a4b099b633c5eae3895f2823e
Ajax
push time in 19 days
push eventahuigo/js-lib
commit sha cf3f919856ea32ec85794f7f880dc2a9b1d2bce8
mouseDrag
push time in 19 days
push eventahuigo/b
commit sha 918b8b178907b0c670542a4f63c5b60333083b30
msg:antd-prot-intro
push time in 22 days
push eventahuigo/a
commit sha 3f5a95651a3e7e2b1cb3fd839c6c071ae9c742f2
antd-prot-intro
push time in 22 days
fork ahuigo/ama
Ask me anything!
https://github.com/sindresorhus/ama/issues?q=is%3Aissue+is%3Aclosed
fork in 22 days
startedaviflombaum/ama
started time in 22 days
issue openedant-design/ant-design
Make Compoenent `Select` support change input value with onSearch.
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Support custom format function for input value.
What does the proposed API look like?
<Select onSearch={value=>value.toUpperCase(value)} >
</Select>
<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
created time in 22 days
push eventahuigo/b
commit sha ee459a7cae9ef906317a480801eda6914757e0d3
msg:docker
push time in a month
push eventahuigo/a
commit sha cd0804af81b47db6968ac3232560545ef57441bf
docker
commit sha 41bfcb211782644b026856e7410a2671cd849ccd
Merge branch 'master' of https://github.com/ahuigo/a
commit sha f8aed1c4636cf1970d8ee5de4f3c8eb666697c82
docker
commit sha 4eba7253ad4f5e02dd3c61d4c6b192c470e54f73
docker
push time in a month
issue commentmoby/moby
Unable to remove a stopped container: `device or resource busy`
If you get such error:
Unable to remove filesystem: /var/lib/docker/container/11667ef16239.../
The solution here(No need to execute service docker restart
to restart docker):
# 1. find which process(pid) occupy the fs system
$ find /proc/*/mounts |xargs -n1 grep -l -E '^shm.*/docker/.*/11667ef16239' | cut -d"/" -f3
1302 # /proc/1302/mounts
# 2. kill this process
$ sudo kill -9 1302
comment created time in a month
push eventahuigo/js-lib
commit sha 4047fc4cb632587667e295755b9c369ecc0914f2
url
push time in a month
push eventahuigo/a
commit sha 1d673aee5f246a4b0260e6c3f87e586fbd4ccf76
ts
commit sha cd5519ff4786dd4005b58ee486c46bbf062dc901
ts
push time in a month
push eventahuigo/b
commit sha bb75449675276d0da7b9bb64732a415f0841f469
msg:react
push time in a month
push eventahuigo/a
commit sha 44bbcfe66d9ba1f33446d3c977bf567179d8f979
stock-fee
commit sha 3c62b2cba8cc0eda5c2b8e005437a152de1fef0b
Merge branch 'master' of https://github.com/ahuigo/a
push time in a month
push eventahuigo/stock
commit sha f9bedd7ae6e11699a13cc6547811d5165c10a8b7
bench1
commit sha fd49a990c27bbe7baa82e1d30effd8fa2adea948
Done: benchmark
push time in a month
fork ahuigo/dva
🌱 React and redux based, lightweight and elm-style framework. (Inspired by elm and choo)
fork in a month
push eventahuigo/prototypes
commit sha ab1a126e5868cfdbb63d51e88dfce5372db60dfe
zdate:support week
push time in a month
push eventahuigo/js-lib
commit sha 6142ed5ffd46bf68564ccd677a8f43247719ad58
url
push time in 2 months
push eventahuigo/a
commit sha 688895f2d6e267913586aaf83a52a16a6eb9544c
ria
commit sha e1bb2929cdc3a7fa039144bd7edab26cf369a7db
Merge branch 'master' of https://github.com/ahuigo/a
push time in 2 months
push eventahuigo/a
commit sha 4efcbd785c2a08f91a3812d38c8cfa63da795ef4
py-regex
push time in 2 months
push eventahuigo/stock
commit sha b071a81ef33ae14563eb949708e8f2a26303d98b
sinaapi
push time in 2 months
push eventahuigo/stock
commit sha 5e9a6f126bcc4b7161cadb0f1716e51fde7bf184
sinaapi
push time in 2 months
push eventahuigo/stock
commit sha 85e18ac26b5c5934c2d905e1821feb1f03e0bee9
data:dev-done
push time in 2 months
push eventahuigo/stock
commit sha d91bd36f2c544116894d524ffd3d932fefa723c6
showcode
push time in 2 months