youlaitech / vue3-element-admin Goto Github PK
View Code? Open in Web Editor NEW🔥基于 vue3 + vite5 + typescript + element-plus 构建的后台管理前端模板(配套后端源码),vue-element-admin 的 vue3 版本。
Home Page: https://vue3.youlai.tech
License: MIT License
🔥基于 vue3 + vite5 + typescript + element-plus 构建的后台管理前端模板(配套后端源码),vue-element-admin 的 vue3 版本。
Home Page: https://vue3.youlai.tech
License: MIT License
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
resolvers: [
// 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
ElementPlusResolver(),
IconsResolver({}),
],
我都复制粘贴了也没用
production的环境变量里面配置了VITE_APP_BASE_API = '/prod-api',但是部署到线上以后,请求头里面缺少/prod-api,请问是什么原因
.prettierrc.cjs 中的 printWidth 配置为 100 ,且项目重新跑过,保存代码时还是在等号那边换行,本身字数没到 100,这是什么问题
线上接口似乎会导致浏览器安全策略,怎样去解决这个问题,似乎用netlify部署之后,只能是https,有没有解决办法呀
上传文件至远程服务器
将打包生成在 dist 目录下的文件拷贝至 /usr/share/nginx/html 目录
nginx.cofig 配置
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location /prod-api/ {
proxy_pass http://vapi.youlai.tech/; # vapi.youlai.tech替换成你的后端API地址
}
}
这几个步骤一直没有头绪,还有“演示环境禁止新增、修改和删除数据,请本地部署后测试”,该怎么消除
这样写能正常进行跳转吗,在views中并没有找到external-link相关的内容
假设有task/list,那么app/list就无法访问。
这是设计缺陷还是代码缺陷?如果我要访问就必须更改其中一者的子菜单路由名称?必须要保证全局的子菜单名都不一样?
但task/list和app/list指向的是不同的资源啊
正文、 表格、emoji、航哥 等功能无效
src/layout/components/Sidebar/components/SidebarMenuItem.vue
<SidebarMenuItem v-for="child in item.children" :key="child.path" :is-nest="true" :item="child" :base-path="resolvePath(child.path)" />
这是一个递归组件吗?
项目配置中主题颜色有bug,选择对应颜色后刷新就会恢复默认颜色。
尊敬的作者,你好!
代码版本如下:
{
"name": "vue3-element-admin",
"private": true,
"version": "2.6.2",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "vite serve --mode development",
"build:prod": "vite build --mode production && vue-tsc --noEmit",
"prepare": "husky install",
"lint:eslint": "eslint --fix --ext .ts,.js,.vue ./src ",
"lint:prettier": "prettier --write "/*.{js,cjs,ts,json,tsx,css,less,scss,vue,html,md}"",
"lint:stylelint": "stylelint "/*.{css,scss,vue}" --fix",
"lint:lint-staged": "lint-staged",
"commit": "git-cz"
},
...
}
复现经过:
问题:
mock什么时候可以做成本地的呀?
This solution works perfectly in local environment . The issue starts after deployment , the login is using keycloak and it redirects perfectly . However , if the above url is refreshed manually , it crashes sending 404.
It works perfectly for routing in deployed version, however fails when and gives 404 , when same url refreshed.
I am logging in using keycloak login as soon as the web url is clicked
PLease help.
当路由的name属性值为小写值时,页面无法被缓存,每次点击都需要被重新加载,Keep-alive 并没有限制这个,能否帮忙看下是什么原因导致的?
将路由的响应信息改为以下内容可复现
{
"code": "00000",
"data": [
{
"path": "/system",
"component": "Layout",
"redirect": "/system/user",
"meta": {
"title": "系统管理",
"icon": "system",
"hidden": false,
"roles": [
"ADMIN"
],
"keepAlive": true
},
"children": [
{
"path": "user",
"component": "system/user/index",
"name": "user",
"meta": {
"title": "用户管理",
"icon": "user",
"hidden": false,
"roles": [
"ADMIN"
],
"keepAlive": true
}
},
{
"path": "role",
"component": "system/role/index",
"name": "role",
"meta": {
"title": "角色管理",
"icon": "role",
"hidden": false,
"roles": [
"ADMIN"
],
"keepAlive": true
}
},
{
"path": "menu",
"component": "system/menu/index",
"name": "menu",
"meta": {
"title": "菜单管理",
"icon": "menu",
"hidden": false,
"roles": [
"ADMIN"
],
"keepAlive": true
}
},
{
"path": "dept",
"component": "system/dept/index",
"name": "dept",
"meta": {
"title": "部门管理",
"icon": "tree",
"hidden": false,
"roles": [
"ADMIN"
],
"keepAlive": true
}
}
]
}
],
"msg": "一切ok"
}
个人感觉,这样设计也许更好,每一个菜单设置一个权限码,用户可以赋予角色或者权限。
前端权限判断可以直接用权限码进行判断
现在通过角色判断,后端处理会有点复杂的感觉
2023.03.30直接git clone code之后本地启动页面控制台报错 _ctx.$t is not a function
但是半个月前代码可以正常启动,看了下历史发现i18n这部分有修正,目前本地将src/lang/index.ts 中 const i18n中添加 globalInjection: true 页面运行正常,希望可以查一下是不是这个原因,别人有没有同样的经历
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.