Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:18
    yongjiangliu opened #8877
  • 08:13
    liujianchaogit commented #8470
  • 08:01
    yongjiangliu edited #8874
  • 07:57
    yongjiangliu opened #8876
  • 07:51
    giscafer commented #8544
  • 07:50
    github-actions[bot] closed #8875
  • 07:50
    github-actions[bot] commented #8875
  • 07:50
    yongjiangliu opened #8875
  • 07:35
    niexq edited #8838
  • 07:32
    github-actions[bot] closed #8874
  • 07:32
    github-actions[bot] commented #8874
  • 07:32
    yongjiangliu opened #8874
  • 07:32
    rayhan999 commented #8470
  • 07:28
    niexq commented #8838
  • 07:26
    niexq commented #8838
  • 07:24
    niexq commented #8838
  • 07:24
    niexq commented #8838
  • 07:24
    niexq commented #8838
  • 07:18
    shilianmalaxiangguo commented #8838
  • 06:50
    yuandalu commented #8738
liu1573
@liu1573

const GeographicView = () => {
const { initialState } = useModel('@@initialState');
const { currentUser } = initialState;
const { geographic } = currentUser;
const { province, city } = geographic;
const [cityList, setCityList] = useState(cities[province['key']]);
const [userCity, setUserCity] = useState(city);

const getProvinceOption = () => {
if (provinces) {
return getOption(provinces);
}
return [];
}

const getCityOption = () => {
if (cityList) {
return getOption(cityList);
}
return [];
};

const getOption = (list) => {
if (!list || list.length < 1) {
return (
<Option key={0} value={0}>
没有找到选项
</Option>
);
}

return list.map((item) => (
  <Option key={item.id} value={item.id}>
    {item.name}
  </Option>
));

};

return (
<Spin spinning={false} wrapperClassName={styles.row}>
<Select className={styles.item} defaultValue={province || nullSelectItem} labelInValue showSearch // onChange={() => setUserCity(nullSelectItem)}
onSelect={(item) => {
setUserCity(nullSelectItem);
setCityList(cities[item['key']]);
console.log(userCity);

      }}
  >
    {getProvinceOption()}
  </Select>
  <Select
    className={styles.item}
    defaultValue={userCity || nullSelectItem}
    labelInValue
    showSearch
    onSelect={() => {}}
  >
    {getCityOption()}
  </Select>
</Spin>

);
};

export default GeographicView;

为什么setUserCity()这个hook没起作用,第二个<Select>没有重新渲染
peijunlei
@peijunlei
hello xdm
hello
wangzhoubin
@wangzhoubin
antd pro 更新后 怎么看更新日志
有时候看文档才发现有更新的地方,不晓得代码有没有更新
BENBTX
@benjamin86
anyone know how to debug in VSC + blazorserver + windowauth?
WhiteTheIce
@WhiteTheIce
antd pro v5 约定式路由怎么写
WhiteTheIce
@WhiteTheIce
??
zyp932
@zyp932
大哥们,ProComponents
DrawerForm的初始值initialValues,不能附上form表单怎么解决的。
zyp932
@zyp932
约定式路由需要规避routes还有 .umi吧
tanglonghai-0610
@tanglonghai-0610
ant design pro v5 怎么用piwik统计访问流量呀
yangtianzhen
@yangtianzhen
权限控制在类组件中如何使用?
WhiteTheIce
@WhiteTheIce
DrawerForm的初始值initialValues 做个开关咯 有值的时候再调用form
tanglonghai-0610
@tanglonghai-0610
有没有大佬,用ant design pro v5 对接piwik来统计用户访问流量啊,求指点
liuyuesheng
@l4yn3

大哥们,ProComponents
DrawerForm的初始值initialValues,不能附上form表单怎么解决的。

是说编辑的时候没有初始值没成功吗

houlin
@houlin
有人回到问题么?
lishaoh
@lishaoh
v5 里面通过menu.request服务端返回菜单,但是左侧菜单未更新,请问有人遇到过吗?
lishaoh
@lishaoh
哪怕刷新网页也没有更新
biubiue
@biubiue
vue-clipboard2 这个safari复制不了有人知道怎么解决么
wdsongyj
@wdsongyj
表单Form 组件中 一行二列,一行三列,一行四列,有没有办法让label对齐
風同學
@sxfmao
新手 问一下 models文件下的文件是怎么引入dva的 并没有看到dva引入model
有人吗
Testarrosa
@Testarrosa
v5版本从服务器请求菜单,icon不显示,在src目录下找不到layout目录,有谁处理过的吗?
Julian Zhu
@OrangeBorning
umi 通过内部插件定义了目录文件和开启调用的方式,具体的引入,可以理解插件已经帮你做了,你只用在配置文件中开启功能
santalzhou
@santalzhou
请问,按官网创建项目 启动时报错,webpack配置项 有问题, 如何解决
yoco
@yocoyang
React 新手, 请问在 Pro V5 中 怎么实现 订阅, 类似 Angular Subject
buliangc
@buliangc
antd pro菜单路由切换,会重新刷新页面,有办法关掉切换后自动刷新吗,请问
Mithun
@hansiemithun
Hi all, Gud mrng! I am new to ant pro design. Saw there is pro 5 version already available now. Followed the documentation, installed via umi. How do we get to see the complete admin dashboard as its shown in preview and is there pro 5 documentation available?
The ant design is famous now and used world wide, request you support international language and have the demo contents too with English and other local language support as well
panzhengtao
@panzhengtao
大家好,请问有人搞过从接口获取国际化数据的解决方案吗?
JhonRen
@JhonRen
大家好 请问有人弄过pro v4的SSO Oidc吗
能不能指点一点 我改如何对接单点登录
万分感谢
peijunlei
@peijunlei
hi
take a touch
Lby
@Jams-boya
image.png
image.png
英文显示18周,中文显示17周,知道怎么处理吗,我把星期天设置为1周开始了,还是对不上
Winter
@maiqiumaker
npm ERR! code 1
npm ERR! path D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@14.17.1 | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.15 found at "C:\Users\Winter.windows-build-tools\python27\python.exe"
npm ERR! gyp info find VS using VS2017 (15.9.28307.1525) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\Winter.windows-build-tools\python27\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\Winter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Winter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\Winter\AppData\Local\node-gyp\Cache\14.17.1\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\Winter\AppData\Local\node-gyp\Cache\14.17.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\Winter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\Users\Winter\AppData\Local\node-gyp\Cache\14.17.1\<(target_arch)\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: C:\Users\Winter\AppData\Local\node-gyp\Cache\14.17.1\common.gypi not found (cwd: D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil) while reading includes of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\Winter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:375:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "D:\Program Files\nodejs\node.exe" "C:\Users\Winter\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\InspuraccfunPro\ant-design-pro\node_modules\bufferutil
npm ERR! gyp ERR! node -v v14.17.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
mlzk
@mlzk
所以 v5还没有正式发布么
Sambhav Jain
@sambhav2612
Hi I need to implement PWA in a app built with AntD Pro v4. Can't figure out how to invoke service worker registration. Any clue?
1 reply
ahwgs
@ahwgs
image.png
文档看着有点问题
透露
@wulibaibao
升级@umi3.5.13中英文报错
Module "./antd/es/locale/en_US" does not exist in container.
while loading "./antd/es/locale/en_US" from webpack/container/reference/mf