lin-xin / vue-manage-system Goto Github PK
View Code? Open in Web Editor NEWVue3、Element Plus、typescript后台管理系统
Home Page: https://lin-xin.github.io/example/vue-manage-system/
License: MIT License
Vue3、Element Plus、typescript后台管理系统
Home Page: https://lin-xin.github.io/example/vue-manage-system/
License: MIT License
因为我使用到了模块ws
,他其中有var fs = require('fs')
加载fs
模块使用的部分。
然后每次npm run dev
的时候,在编译期间,总是会报错如下:
ERROR Failed to compile with 1 errors
This dependency was not found:
* fs in ./src/main.js
To install it, you can run: npm install --save fs
即使我安装模块fs
他仍然报错。
网上有类似的解决方法,在webpack的配置文件中加入fs: empty
来忽略这个错误,但貌似忽略来后,fs就无法正常使用来。
求大神给他解决方法~
下面是我的测试代码:
import Vue from 'vue';
import App from './App';
import router from './router';
import axios from 'axios';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css'; // 默认主题
// import '../static/css/theme-green/index.css'; // 浅绿色主题
import "babel-polyfill";
import './mock/index.js';
import fs from 'fs'; // 我加入的测试代码
Vue.use(ElementUI);
Vue.prototype.$axios = axios;
new Vue({
router,
render: h => h(App)
}).$mount('#app');
element中的table默认padding,感觉太大了,
明明可以在一行显示的,查看了element的文档没有发现有控制padding的api!
也尝试了在elemet issues提问的同样问题的解决方案,但是还是不起作用:http://jsfiddle.net/hqvnwsdk/
有个问题想不明白,用户鉴权和授权怎么处理?即用户没登录的状态只能访问登陆页,不能进入系统内部
http://work.omwteam.com/ 用IE浏览器访问报错,希望能尽快解决。我的是IE11不过IE里头都不行。
默认一页显示10条,当选择一页显示20条的时候,希望数据,变成20条,选择框中选中20条/页,同时页码发生变化,结果光数据发生了变化,但是选择框中一闪而过20条/页,之后又变成10条/页,页码也没有变化
@lin-xin
github.com/erguotou520/vue-fullstack
我这个主要负责提供整体架构,而你是有很多功能的集合,哈哈
element的切换主题色,下载下来替换上去不是出错,就是不起作用,element下载下来的文件,少了个color-theme.css这样的文件,看起来是不是需要手写啊?
npm install正常,但是npm run dev就报错
ERROR Failed to compile with 1 errors 10:16:00
error in ./~/vue-core-image-upload/src/props.js
Module parse failed: E:\study\project\github\vue-manage-system\node_modules\vue-core-image-upload\src\props.js Unexpected token (46:13)
You may need an appropriate loader to handle this file type.
| ResizeBtn: {
| type: Object,
| default: return {
| ok: 'Ok',
| cancel: 'Cancel'
@ .//babel-loader/lib!.//vue-loader/lib/selector.js?type=script&index=0!.//vue-core-image-upload/src/vue-core-image-upload.vue 49:13-31/vue-core-image-upload/src/vue-core-image-upload.vue
@ ./
@ .//vue-core-image-upload/src/index.js/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/page/Upload.vue
@ ./
@ ./src/components/page/Upload.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./build/dev-client babel-polyfill ./src/main.js
下面的这个路径中文件名大小写有问题,现在git下来是小写的文件名,在Linux下运行时会报错,
应该都是大写的文件。
src/components/common
下载,安装,run,一切ok。
用chrome打开demo后,唯独图表里的“基础图表”和“混合图表”,无法正常显示。
求解决方案~
(用safari,也一样的情况)
Can't get dom width or height
gt.init @ full.js?5fd1:10
init @ full.js?5fd1:26
boundFn @ vue.common.js?e881:164
mounted @ full.js?5fd1:26
callHook @ vue.common.js?e881:2534
insert @ vue.common.js?e881:3361
invokeInsertHook @ vue.common.js?e881:5179
patch @ vue.common.js?e881:5343
Vue._update @ vue.common.js?e881:2301
updateComponent @ vue.common.js?e881:2417
get @ vue.common.js?e881:2756
run @ vue.common.js?e881:2826
flushSchedulerQueue @ vue.common.js?e881:2593
(anonymous) @ vue.common.js?e881:654
nextTickHandler @ vue.common.js?e881:601
作者你好!非常感谢你的贡献,进期正好要做后台系统,厌烦了以前的模式,想引进新技术!首先说下我是小白,如果提的问题是element或者vue本身的问题请谅解:
1.当我在侧边栏切换的时候发现js实际上执行了一次!如我在BaseTable组件中console.log(123123),发现只有当进入主页面的时候执行一次,但是再次切换到form组件不会执行!这样是很糟糕的,我在想是不是我在组件中写的ajax也只是在进入页面的时候执行一次,再切换的时候就不执行了!
能不能把BaseTable.vue中分页代码总的页数不写死,而从API读取:
<el-pagination @current-change="handleCurrentChange" layout="prev, pager, next" :total="100">
中 :total="100"
我clone你的工程,并去掉DllPlugin 和 DllReferencePlugin的注释,怎么比不用DllPlugin 和 DllReferencePlugin编译还慢呢??
[Vue warn]: "style" is a reserved attribute and cannot be used as component prop.
启动后首次登陆会出现如下警告信息,是否可以忽略:
warning in ./src/components/common/Sidebar.vue
(Emitted value instead of an instance of Error) : component lists rendered with v-for should have explicit keys. See
https://vuejs.org/guide/list.html#key for more info.
@ ./src/components/common/Sidebar.vue 9:2-186
@ .//babel-loader/lib!.//vue-loader/lib/selector.js?type=script&index=0!./src
/components/common/Home.vue
@ ./src/components/common/Home.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi ./build/dev-client babel-polyfill ./src/main.js
首页的submitForm form 的validate返回值一直是 false。不管用户名和密码是否有值。
感觉是检测不到输入了值。或者双向绑定失败了?
导致登陆不行。
@lin-xin 现在用 el-upload组件上传图片,但是发现选择图片后立即上传,但是需求是这样的
我需要手动上传图片,可是发现如果设置了auto-upload为false的时候,那么就得不到预览图,查看了element的issues,可以自动获取图片的地址然后手动赋值src,可是当手动上传的时候发现发不出请求!
请问这个有解决方案吗
在线demo页面 可以正常显示上传进度条,但是源码下载到本机却无法显示, action已改为后端接口,能够正常上传文件,求指教,谢谢!
<el-upload action="http://localhost:3000/api/files" type="drag" :thumbnail-mode="true" :on-preview="handlePreview" :on-remove="handleRemove"
:on-error="handleError" :default-file-list="fileList">
<i class="el-icon-upload"></i>
<div class="el-dragger__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>
</el-upload>
如题
build一次的时间达到了184793ms,略吓人啊。
麻烦po主有空帮忙分析下是啥原因?
另外我看之前页面是默认有引入那个vendor.dll.js的,最近更新之后发现被注释掉了,请问是什么原因呢?
@lin-xin
不好意思
Hi! Could you please translate documents into English as well?
您好,我想正在使用您的这套框架,我在.vue文件中加了<style scoped lang="less"> 运行的时候报错,说有很多loader没有下载。
This dependency was not found:
!!vue-style-loader!css-loader?sourceMap!../../../node_modules/vue-loader/lib/s
tyle-rewriter?id=data-v-0e0cac89&scoped=true!less-loader!../../../node_modules/v
ue-loader/lib/selector?type=styles&index=0!./Header.vue in ./src/components/comm
on/Header.vue
To install it, you can run: npm install --save !!vue-style-loader!css-loader?sou
rceMap!../../../node_modules/vue-loader/lib/style-rewriter?id=data-v-0e0cac89&sc
oped=true!less-loader!../../../node_modules/vue-loader/lib/selector?type=styles&
index=0!./Header.vue
但是我在package.json的devDependencies中看到loaders都下载了呀,package.json和您的一样
其中, 在/src/components/common/Home.vue 中,import的文件名称错了,大小写实际上是区分的
import vHead from './Header.vue';
import vSidebar from './Sidebar.vue';
==》
import vHead from './header.vue';
import vSidebar from './sidebar.vue';
proxyTable: { '/manager':{ target:'http://manager.xxxxxx.com', changeOrigin:true, pathRewrite:{ '^/manager':'/manager' } } },
这样配置的的,但是并不生效。所以想问一下,这个框架支持使用proxyTable吗
在home.vue里面,引入的是vHead,为什么在template用的是v-head
请问您项目中用到的这个转发插件应该怎么配置呢!本地起来是8000端口,接口端口是8080端口,应该怎么配置才不跨域呢!
$npm run build
....
ERROR in static/js/0.ed314fa45c35f2165374.js from UglifyJs
Unexpected token punc «(», expected punc «:» [static/js/0.ed314fa45c35f2165374.js:13189,6]
.....
Build complete.
Tip: built files are meant to be served over an HTTP server.
Opening index.html over file:// won't work.
vue.common.js?e881:422 TypeError: Cannot read property 'toString' of undefined at new Watcher (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:2379:14) at initComputed (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:2708:21) at initState (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:2615:24) at VueComponent.Vue._init (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:3644:5) at new VueComponent (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:3810:12) at createComponentInstanceForVnode (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:2990:10) at init (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:3000:43) at createComponent (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:4527:9) at createElm (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:4470:9) at createChildren (eval at <anonymous> (http://localhost:8080/app.js:1:0), <anonymous>:4595:9)logError @ vue.common.js?e881:422
因为是现在采用单面应用,那该如何保存用户状态?如果使用sessionStorage?这样安全吗?
VueTable.vue这个页面的beforeMount这个方法是写在computed里面,为什么会在页面加载前执行,不是应该在computed外吗?
建议作者把项目名称增加vue字眼或者描述。相信会有更多人搜到~
问题重复了,不好意思
比如,我在page页里面获取到用户的头像,想更新到header里面的头像,请问怎么做才可以实现呢?
网上查很多都是vuex,就是请问下还有没有其他方法。谢谢~
比如想修改一个盒子的padding值,在谷歌控制台修改是有效的,但是在代码中修改样式不生效,使用important也不起作用。 请问博主,应该怎么做能起作用呢
Error in event handler for (unknown): TypeError: Cannot read property 'status' of null :8080/#/login:1
没有错误栈
浏览器版本:chrome 58
我用了样式
.markdown-editor .CodeMirror {
height: 900px;
}
发现并没有改变markdown-editor的高度。
路由表是否开始只加载不需要登陆的页面的路由配置,等用户登陆后再从后台取用户可以访问的页面重新更新一下路由表
npm run dev 之后会出现这个错误,是为什么啊
请问是否可以提供默认主题
1.比如我现在我dev以后,点击登陆的按钮回执行自己的逻辑,我发现我在浏览器中找不到这行代码
2,还有我整个项目都要传到git上吗太大了,还是我需要build后只把dist给后台,可是dist都是压缩后的代码,能不让他压缩build后就像传统的页面一样,css和js都是引入的浏览器明显能看到代码
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.