duxianwei520 / react Goto Github PK
View Code? Open in Web Editor NEWReact+webpack+redux+ant design+axios+less全家桶后台管理框架
License: MIT License
React+webpack+redux+ant design+axios+less全家桶后台管理框架
License: MIT License
点击echarts页面, 抱错:Uncaught SyntaxError: Unexpected token export
http.js下的const _filter = require('./interfaceFilter');根本没有引入东西
ERROR in ./app/history.js
Module not found: Error: Cannot resolve module 'history/lib/createHashHistory' i
n C:\Users\acer1\Desktop\react\app
@ ./app/history.js 11:25-65
ERROR in ./app/components/searchForm/index.js
Module not found: Error: Cannot resolve module 'lodash' in C:\Users\acer1\Deskto
p\react\app\components\searchForm
@ ./app/components/searchForm/index.js 135:14-31
Child html-webpack-plugin for "index.html":
chunk {0} index.html 541 kB [rendered]
[0] .//._html-webpack-plugin@2.22.0@html-webpack-plugin/lib/loader.js!./._lodash@4.17.4@lodash/lodash.js 540 kB {0} [built]
/app/index.html 1.38 kB {0} [built]
[1] ./
[2] (webpack)/buildin/module.js 241 bytes {0} [built]
webpack: Failed to compile.
各种包缺失。。 request、classnames、lodash。
如题
你好,我看你在react里面引用图片直接写的相对路径,但是我这边也是设置相对路径页面为什么不显示图片呢?我尝试使用require引用,但是页面dom结构上面显示的是//img/***.jpg,变成绝对路径并且不带有域,请问是什么问题呢?
修改代码保存后发现不会自动刷新
如题。
1、this.props.dispatch(fetchLogin(value,(res)=>{..},(res)=>{..));
2、export const fetchLogin = createAjaxAction(common.login);
3、export const createAjaxAction=(httpHandle,startAction,endAction)=>(resData,cb,reject,handleCancel)=>(dispatch)=>{...}
4、export const login = ajax.fetchJSONByPost('/login'); //commom目录下的
5、const fetchJSONByPost = (url, target) => (reqData, handleCancel) => axiosPost(url, reqData, target, handleCancel)
这条逻辑链上value是怎么传递的??
在js文件添加div class为dd
import './dd.css';
dd.css 文件内容
.dd, .dd::before, .dd::after {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.dd {
width: 200px;
height: 200px;
margin: auto;
/*background: url("img/Button-White-Large.png") no-repeat 50%/70% rgba(0, 0, 0, 0.1);*/
background: rgba(0, 0, 0, 0.1);
color: #69ca62;
box-shadow: inset 0 0 0 1px rgba(105, 202, 98, 0.5);
}
.dd::before, .dd::after {
content: '';
z-index: -1;
margin: -5%;
box-shadow: inset 0 0 0 2px;
animation: clipMe 8s linear infinite;
}
.dd::before {
animation-delay: -4s;
}
.dd:hover::after, .dd:hover::before {
background-color: rgba(255, 0, 0, 0.3);
}
@keyframes clipMe {
0%, 100% {
clip: rect(0px, 220.0px, 2px, 0px);
}
25% {
clip: rect(0px, 2px, 220.0px, 0px);
}
50% {
clip: rect(218.0px, 220.0px, 220.0px, 0px);
}
75% {
clip: rect(0px, 220.0px, 220.0px, 218.0px);
}
}
这个例子在自己的项目中可以使用, 你的这个项目里不行, 测试过 对 ::before 等无法解析, 但是找不到webpack配置的问题
我想以你这个项目为基础构建自己的应用,但是上手开发还需要一些读代码。
能否再精简一些文件。。谢谢
RT
打着技术的擦边球去招亲,这样好吗 |=V=| @duxianwei520
Uncaught Error: Module build failed: SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (F:\react-master\react-master\node_modules@babel\helper-module-imports\lib\index.js:23:46)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (F:\react-master\react-master\node_modules\babel-plugin-import\lib\Plugin.js:10:28)
at Module._compile (module.js:413:34)
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (F:\react-master\react-master\node_modules@babel\helper-module-imports\lib\index.js:23:46)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object. (F:\react-master\react-master\node_modules\babel-plugin-import\lib\Plugin.js:10:28)
at Module._compile (module.js:413:34)
at Object.25 (http://localhost:3010/client.115f.js:39:7)
at webpack_require (http://localhost:3010/common.bundle.js:55:30)
at Object.2 (http://localhost:3010/client.115f.js:7:18)
at webpack_require (http://localhost:3010/common.bundle.js:55:30)
at webpackJsonpCallback (http://localhost:3010/common.bundle.js:26:23)
at http://localhost:3010/client.115f.js:1:1
看错了。。。
没弄明白什么地方导致这样的结果, 暂时不需要这样的打包配置
看完了这个项目,觉得做得很棒,而且公司目前采用的技术栈也是React+React-Router+Redux+Ant design。希望楼主后期能继续完善这个项目,另外如果能同步文档就更👍了。
看看分享好使吗
如题,webpack-dev-server
自带打开浏览器的功能。可以使用--open
ncaught Error: Cannot find module "history/lib/createHashHistory"报错
提示的问题如下:
npm WARN deprecated [email protected]: babel-plugin-antd is renamed to babel-plugin-import
npm WARN deprecated [email protected]: Babel's CLI commands have been moved from the babel package to the babel-cli package
npm WARN deprecated [email protected]: Use npmjs.com/husky instead, see ghooks-org/ghooks#166
该怎么解决啊?
询问一下大神本地json为什么链接不上呢/需要修改申明配置活着我少了神马?
我是8.2,有个包写明 4<= node < 6,导致拉不下依赖
用户和密码是多少
我看官方说不应该直接用react-router, 而是用react-router-dom.
那为什么这个repo用的是 core 呢?
当用户退出账户时,未通知socket服务终止连接,也没删除socket用户缓存池中的当前用户名,导致再次登录后,进入chat模块,提示‘登录用户名重复,请重新登录设置不同的用户名’
sessionStorage可以在客户端手动设置token值,如何做到严格的权限控制呢?
mark
请教一下,我用create-react-app搭建的项目没有webpack配置之类的文件,你是怎么搭建项目跟配置webpack的呢?
我刚才问题这里 不小心提交了一个问题,随后就关闭了,但是现在每次我登陆githhub,库的列表里面还有你的库名字,怎么给去掉呢,不好意思
我想问下大神是用的什么软件开发
请求时报错:“POST http://localhost:8080/mockapi/data.json net::ERR_CONNECTION_REFUSED”,路径被拼成了“localhost:8080”,应该是“localhost:3000”吧?
用Koa2+Mysql搭建了一下后台请求的数据,可以实现分页数据和查询数据的展示了。
请问一下点击侧边栏,然后右边弹出新的页面。如果右边已经有页面,则跳到那个页面。这个效果事如何实现的,如何切换页面的时候如何保存数据
export const createAjaxAction = (api, startAction, endAction) => (data, cb, reject) =>
(dispatch) => { //dispatch 怎么传进来的
let respon
startAction && dispatch(startAction())
// eslint-disable-next-line no-param-reassign
// 每个请求带上token
const token = sessionStorage.getItem('token')
if (token) {
if (!data) {
data = {}
}
data.token = token || null
}
data = isArray(data) ? data : [data]
api(...data)
.then(checkStatus) // eslint-disable-line no-use-before-define
.then(response => response.json())
.then((resp) => {
respon = resp
endAction && dispatch(endAction({ req: data, res: resp }))
})
.then(() => {
if (respon.status === 1) {
cb && cb(respon)
} else {
if (respon.errorCode == '101') {
logOut()
} else {
if (typeof (reject) === 'function') {
reject(respon)
} else {
message.error(respon.msg)
}
}
}
})
.catch(catchError) // eslint-disable-line no-use-before-define
}
然后在组件中调用 this.props.dispatch(fetchHouseCheckList({ currentPage: 1 }))
在这里dispatch 不应该是一个action 么?
fetchHouseCheckList({ currentPage: 1 }) 返回的是一个function,
并且 上面中的 参数 dispatch 是如何传进去的呢?
蟹蟹。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.