Code Monkey home page Code Monkey logo

vue-admin's Introduction

友情链接:【react-admin】持续更新 演示地址

演示地址

账号密码任意

Build Setup

npm install

# 修改文件内容/build/webpack.base.conf.js,将element-ui和vuex-router-sync版本替换成install后node_modules目录中当前版本,注意不能用软链
#      {
#        test: /\.js$/,
#        loader: 'babel-loader',
#        //exclude: /(node_modules|bower_components)/,
#        // 注意elementUI的源码使用ES6需要解析
#        include: [
#          resolve('src'),
#          resolve('test'),
#          resolve('/node_modules/.1.4.8@element-ui/src'),
#          resolve('/node_modules/.1.4.8@element-ui/packages'),
#          resolve('/node_modules/.4.3.0@vuex-router-sync')
#        ]
#      },


# serve with hot reload at localhost:9000
npm run dev
npm run build

npm run mock
  1. 启动mock服务 npm run mock
  2. 启动dev server npm run dev
  • 打包发布,修改根路径名

  1. 修改 ./Vue-Admin/config/index.js 参数:build.assetsPublicPath
//eg.  assetsPublicPath: '/Vue-Admin/'
assetsPublicPath: 'Your path name';
  1. 修改 ./Vue-Admin/src/api.js
// export const CONTEXT = './Vue-Admin';
export const CONTEXT = 'Your path name';
cnpm i json-server -D
cnpm i json-server -S
npm outdated:检查包是否已经过时,此命令会列出所有已经过时的包,可以及时进行包的更新
npm update moduleName:更新node模块
npm uninstall moudleName:卸载node模块

页面截图

vue-admin's People

Contributors

lanux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-admin's Issues

项目clone成功,不能成功运行

由于图片上传不成功, 控制台报错 Uncaught SyntaxError: Unexpected token ... 还想请问楼主,需要改代码是否才能在本地运行成功? 如果更改代码,是在哪更改呢

下载整个Demo,在IE11还是显示空白,谷歌可以正常显示

源码下载,安装组件后,在IE11下还显示空白,但谷歌可以正常显示,要做什么配置吗?望帮忙解决下,谢谢!
出错提示:
SCRIPT1003: 缺少 ':'
文件: app.js,行: 40071,列: 69

40071行 /* harmony default export */ webpack_exports["default"] = ({ use, t, i18n });

404 not found

Why I get 404 after I run npm run dev? How to fix it?

用的难受

很多二次开发的框架看似对功能实现了模块化,但是这种通过文件之间跳来跳去实现的解藕,本质上就是一种很low的思路。本来Vue是一个很简洁明了的框架,硬生生搞的这么复杂。。。当然我只是吐槽一下,无视我即可

npm run dev失败

  • node版本 v8.11.2
  • npm版本 5.6.0
  • 按你的要求修改了/build/webpack.base.conf.js
{
        test: /\.js$/,
        loader: 'babel-loader',
        //exclude: /(node_modules|bower_components)/,
        // 注意elementUI的源码使用ES6需要解析
        include: [
          resolve('src'),
          resolve('test'),
          resolve('/node_modules/element-ui/src'),
          resolve('/node_modules/element-ui/packages'),
          resolve('/node_modules/vuex-router-sync')
        ]
}
  • npm run dev之后就报错了
  • 报错内容
E:\learn\Vue-Admin>npm run dev

> [email protected] dev E:\learn\Vue-Admin
> node build/dev-server.js

[HPM] Proxy created: /api  ->  http://127.0.0.1:3000
[HPM] Proxy rewrite rule created: "^/api" ~> ""


 ERROR  Failed to compile with 18 errors                                                                                                                        13:00:16

 error  in ./src/components/selectTree.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/components/selectTree.vue 7:0-251
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/sys/resource.vue
 @ ./src/pages/sys/resource.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/frame.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/frame.vue 11:0-240
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/sys/userAdd.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/sys/userAdd.vue 7:0-254
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/sys/user.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/sys/user.vue 11:0-251
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/sys/resource.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/sys/resource.vue 11:0-255
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/sys/menu.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/sys/menu.vue 11:0-251
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/sys/role.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/sys/role.vue 11:0-251
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/login.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/login.vue 11:0-246
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/dashboard.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/dashboard.vue 11:0-249
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/components/panel.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/components/panel.vue 11:0-245
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/resetPwd.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/resetPwd.vue 7:0-249
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/App.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/App.vue 11:0-238
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./node_modules/element-ui/packages/select/src/select-dropdown.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./node_modules/element-ui/packages/select/src/select-dropdown.vue 7:0-242
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/selectTree.vue
 @ ./src/components/selectTree.vue
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/pages/sys/resource.vue
 @ ./src/pages/sys/resource.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/components/404.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/components/404.vue 11:0-244
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/components/sideMenu.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/components/sideMenu.vue 11:0-249
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/components/subMenu.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/components/subMenu.vue 11:0-248
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/sideMenu.vue
 @ ./src/components/sideMenu.vue
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/layout/header.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/layout/header.vue 11:0-252
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

 error  in ./src/pages/layout/footer.vue

Module build failed: Error: No parser and no file path given, couldn't infer a parser.
    at normalize (E:\learn\Vue-Admin\node_modules\prettier\index.js:7051:13)
    at formatWithCursor (E:\learn\Vue-Admin\node_modules\prettier\index.js:10370:12)
    at E:\learn\Vue-Admin\node_modules\prettier\index.js:31115:15
    at Object.format (E:\learn\Vue-Admin\node_modules\prettier\index.js:31134:12)
    at Object.module.exports (E:\learn\Vue-Admin\node_modules\vue-loader\lib\template-compiler\index.js:80:23)

 @ ./src/pages/layout/footer.vue 11:0-253
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/App.vue
 @ ./src/App.vue
 @ ./src/router/routes.js
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

> Listening at http://localhost:9000

空白页面

hello,我用npm run build的页面打开是空白的,请问您试过吗,能不能帮忙看下?生成后,index的代码如下
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>Vue-Admin-Demo</title><meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name=viewport><link href=/Vue-Admin/static/css/app.af5943e03a354b9a94773039e8ab62d5.css rel=stylesheet></head><body class="hold-transition skin-blue sidebar-mini"><div id=root></div><script type=text/javascript src=/Vue-Admin/static/js/manifest.b5747c1e8182a279d0fa.js></script><script type=text/javascript src=/Vue-Admin/static/js/vendor.8f9111dea9329da687ed.js></script><script type=text/javascript src=/Vue-Admin/static/js/app.a2e81010c4c4aba21c9f.js></script></body></html>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.