Git Product home page Git Product logo

element-plus-admin's Introduction

vue element-plus vite typescript postcss license

简介

element-plus-admin 是一个后台前端解决方案,它基于 vue-nextelement-plus实现。它使用了最新的前端技术栈vite,typescript和postcss构建,内置了 动态路由,权限验证,皮肤更换,提供了丰富的功能组件,它可以帮助你快速搭建中后台产品原型。

前序准备

你需要在本地安装 nodegit。本项目技术栈基于 ES2015+vue-nexttypescriptvitepostcsselement-plus,所有的请求数据都使用Mock.js进行模拟,提前了解和学习这些知识会对使用本项目有很大的帮助。

开发

# 克隆项目
git clone https://github.com/hsiangleev/element-plus-admin.git

# 进入项目目录
cd element-plus-admin

# 安装依赖
npm install

# 启动服务
npm run dev

浏览器访问 http://localhost:3002

发布

# 发布
npm run build

# 预览
npm run preview

其它

# eslint代码校验
npm run eslint

# stylelint代码校验
npm run stylelint

浏览器

目前仅支持现代浏览器

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
Edge last 2 versions last 2 versions last 2 versions

捐赠

如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 🍹
donate

License

MIT

Copyright (c) 2020-present hsiangleev

element-plus-admin's People

Contributors

hsiangleev 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

element-plus-admin's Issues

提一个小意见

原有的业务逻辑我分析是这样的:登录时 项目 会在 localStorage 中使用 'token'做 标识,存储服务器返回的token,
但是当 localStorage 中以存在 'token'这个键,但不符合你设计的token值的规则,在页面首次登录时做的 路由守卫就会报错。原因是 setLocal, useLocal, getLocal 这三个工具没有考虑到 localstrorage 已经存在一个 'token'的键,值为‘384819cb-f70c-46af-b6f3-5e19604292a1’,不符合你这边的规则。
我 用了一个最懒的方式做处理的 就是 登录是 存储 localstrorage 使用 ‘token_盐’ 的方式命名键,就不会跟浏览器可能存在的 一些键冲突。
我是用你的核心代码迁移到vue-cli中做了一个项目后 两个项目切换的时候才发现的。同时感谢你的分享

src/layout/components/tags.vue:8:22 :ref='getTagsDom'

build的时候,有个报错,,这里 报错太复杂,看不清楚啥问题

> vue-tsc --noEmit --skipLibCheck && vite build

src/layout/components/tags.vue:8:22 - error TS2322: Type '(el: ComponentInternalInstance | Element | null) => number | null' is not assignable to type 'string | Ref | ((ref: Element | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null) => void) | undefined'.
Type '(el: ComponentInternalInstance | Element | null) => number | null' is not assignable to type '(ref: Element | ComponentPublicInstance<{}, {},
{}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null) => void'.
Types of parameters 'el' and 'ref' are incompatible.
Type 'Element | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null' is not assignable to type 'ComponentInternalInstance | Element | null'.
Type 'ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>' is not assignable to type 'ComponentInternalInstance | Element | null'.
Type 'ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 160 more.

8 :ref='getTagsDom'
~~~

Found 1 error.

应该是 ts 校验 数据类型不匹配

ts提示错误TS2345

您好,我用webstorm加载这个工程的时候,main.ts提示这个错误,你知道为什么吗?
image

页面刷新后标签栏异常

如打开3个标签,F5刷新页面,标签栏仅剩最后一个标签。
且剩余的这个标签变成了固定标签,没有关闭按钮

刷新前
image

刷新后
image

请教一个小问题

export async function validate( ref: Ref | any, isGetError = false ): Promise<boolean | { valid: boolean; object: any }> { const validateFn = unref(ref).validate console.log(validateFn) return new Promise((resolve) => validateFn((valid: boolean, object: any) => isGetError ? resolve({ valid, object }) : resolve(valid) ) ) }
你封装了验证是基于同步的,如果我需要在验证的过程中调用store向后台发起请求,获取到后台的数据password进行验证怎么操作呢??

启动的时候提示

[email protected] dev E:\git\github\element-plus-admin
vite

internal/modules/cjs/loader.js:596
throw err;
^

Error: Cannot find module 'worker_threads'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
at Function.Module._load (internal/modules/cjs/loader.js:520:25)
at Module.require (internal/modules/cjs/loader.js:650:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (E:\git\github\element-plus-admin\node_modules\vite\dist\node\chunks\dep-efe32886.js:19:24)
at Module._compile (internal/modules/cjs/loader.js:702:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
at Module.load (internal/modules/cjs/loader.js:612:32)
at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
at Function.Module._load (internal/modules/cjs/loader.js:543:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: vite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

typescript 文件老提示找不到模块的

typescript 文件老提示找不到模块的,但是可以运行!是不是缺少了什么配置?还是我的VSCode少了什么配置?百度不到解决方案,特地来问大佬;
image

您好 我还有一个小问题

如果页面停留在 动态加载的路由上,刷新页面后,会报一个 warning :
[Vue Router warn]: No match found for location with path "/System/Client"
想请问一下,是在哪个代码中出现的警告warning呢,其实对项目没啥影响,就想单纯的消除一下这个 warning

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.