草庐IT

red-gate-ants

全部标签

ant-design-pro-cli 运行pro create myapp报错Error [ERR_REQUIRE_ESM]: require() of ES Module是什么原因?

根据官方文档全局安装了npmi@ant-design/pro-cli-g,然后运行procreatemyapp,命令行出现:PSE:\studio\GIT\ant-design-react-pro\an-pro-new>procreatemyappC:\Users\grugu\AppData\Roaming\npm\node_modules\@ant-design\pro-cli\src\create\generators\ant-design-pro\index.js:10constsortPackage=require('sort-package-json');^Error[ERR_REQ

Ant-Design 官方网站总是打不开,那么我们则需要使用以下该官网的镜像地址来打开;

 1、Ant-Design官网原地址: https://ant.design/index-cnAnt-Design官网镜像地址:http://ant-design.gitee.io/index-cn或者  AntDesign-一套企业级UI设计语言和React组件库 2、Ant-Design-Pro原地址: https://pro.ant.design/index-cnAnt-Design-Pro镜像地址:http://ant-design-pro.gitee.io/index-cn 3、Ant-Mobile原地址: https://mobile.ant.design/index-cnAnt-

Vue 3 中 Ant Design Vue 如何自定义表格 Table 的表头(列头)内容?

1.使用场景项目用到的是AntDesignVue(2.2.8)组件库,开发中遇到一个如下图的表格,有些表头文本后面会有一些自定义图标,鼠标移入图标时显示对应的审批时间提示。当前列如果没有审批时间就会隐藏图标,只展示列头文本。2.解决方案使用AntDesignVue基础的Table组件是无法满足这个场景的,所以需要自定义表头的内容,这里就要用到定义表格列时的一个属性——slots:{title:'自定义表头插槽名'},再结合模板在表格中创建的插槽内容实现。组合使用方式见如下代码:(title要和模板中插槽名一致)template> a-table :columns="columns" :data

Es集群状态为red

本文针对es为7.0以上版本1.执行curl-XGET-u‘账号:密码’‘http://127.0.0.1:9200/_nodes/process?pretty’查看集群中每个节点的信息(包括节点名称)2.执行curl-XGET-u‘账号:密码’‘http://127.0.0.1:9200/_cat/indices?v’查看集群的索引信息3.通过第二步操作可以找到集群中索引状态为red的索引,并且可以拿到该索引id,然后执行curl-u‘账号:密码’-XPOST‘http://127.0.0.1:9200/_cluster/reroute’-H“Content-type:application

elasticsearch索引health 健康状态变为yellow,red处理

查看所有索引健康状态[root@test3~]#curl-XGET"192.168.1.77:30308/_cat/indices/?v"healthstatusindexuuidprirepdocs.countdocs.deletedstore.sizepri.store.sizeyellowopenticketdr8eZlOlT-i_lhnSK27i4Q11290322051.1mb51.1mbyellowopenline_goods33xPiCrdhSdiiZmnWhFBiiw51001.2kb1.2kbyellowopencarKOhywWXoSByM7gK3CsKMhA11406.6

react ant-design实现导航菜单menu的路由设置/切换页面

ant-design版本是5.1.1,路由版本是v6的新版本的导航菜单路由设置与旧版的不太一样,刚开始的时候甚至不知道该怎么写实现效果:代码:importReact,{useState}from'react';import{DesktopOutlined,EditFilled,PieChartOutlined,}from'@ant-design/icons';import{Breadcrumb,Layout,Menu,theme}from'antd';import{useNavigate,Routes,Route}from'react-router-dom'import"./App.css"i

Warning: [ant-design-vue: Form.Item] FormItem can only collect one field item, you haved set `ASele

控制台出现这个提示:Warning:[ant-design-vue:Form.Item]FormItemcanonlycollectonefielditem,youhavedsetASelect,ASelect,AInputNumber,AInputNumber,AInput5fielditems.Youcansetnotneedtobecollectedfieldsintoa-form-item-resttable中使用了自定义组件如图:解决方案://对应的多组件添加a-form-item-rest>/a-form-item-rest>详情官网

string - 为什么 sorted "tan"!= "ant"?

关闭。这个问题是notreproducibleorwascausedbytypos.它目前不接受答案。这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助future的读者。关闭3年前。Improvethisquestion我试图通过对字符串中的一部分字节进行排序(使用sort.Slice)来对字符串中的字符进行排序。我使用的代码有时会得到正确的结果,但有时会产生我无法理解的结果。packagemainimport("fmt""sort")funcmain(){for_,s:=range[]string{"nat","

string - 为什么 sorted "tan"!= "ant"?

关闭。这个问题是notreproducibleorwascausedbytypos.它目前不接受答案。这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topic在这里,这个问题的解决方式不太可能帮助future的读者。关闭3年前。Improvethisquestion我试图通过对字符串中的一部分字节进行排序(使用sort.Slice)来对字符串中的字符进行排序。我使用的代码有时会得到正确的结果,但有时会产生我无法理解的结果。packagemainimport("fmt""sort")funcmain(){for_,s:=range[]string{"nat","

Ant Design Pro项目中 提示:找不到模块“@ant-design/pro-components”或其相应的类型声明

AntDesignPro中在使用StatisticCard指标卡组件时候,按照官方的文档从“@ant-design/pro-components”中引入这个组件发现会报错提示找不到模块“@ant-design/pro-components”或其相应的类型声明也就是说AntDesignPro脚手架创建的项目中,默认没有引入这个依赖包,于是去package.json中看了下,确实是没有找到这个依赖包于是又去官方文档看了下,官方文档确实有这方面的提及,告诉我们每个组件都是一个独立的包,那么这样来看,确实没有安装@ant-design/pro-components这个包了。根据提示,安装一下下面的包即