6 Commits

Author SHA1 Message Date
ahjung
19df8d5f09 1.9.2 2024-06-29 17:35:10 +08:00
Ah jung
489f791caa Update README.md 2024-06-11 21:43:40 +08:00
ahjung
2f72f34bbe 优化已知错误 2024-05-12 11:02:47 +08:00
ahjung
3d4d554733 文案修改 2024-04-10 14:44:27 +08:00
ahjung
38fe255306 basicModal 组件 导出 modalMethods 方法 2024-04-10 14:36:36 +08:00
ahjung
58e99c183b README 文件更新 2024-04-09 16:43:58 +08:00
12 changed files with 6302 additions and 5146 deletions

View File

@@ -1,5 +1,12 @@
# CHANGELOG
## 1.9.2
- 升级 `vite``5.x` 版本
- 优化 `BasicTable` 组件,编辑样式
- 新增 `BasicTable` 组件,支持 `striped` 入参
- 依赖升级
## 1.9.1
- 优化 `typeSctipt` 类型定义
@@ -19,6 +26,7 @@
- 修复 `手机端侧边导航风格不一致bug` 关闭[#247](https://github.com/jekip/naive-ui-admin/issues/247
- 移除 `yarn.lock` 文件
- 依赖升级
## 1.8.2
- ### ✨ Features

View File

@@ -1,38 +1,42 @@
## 简介
## 🚀 简介
[Naive Ui Admin](https://github.com/jekip/naive-ui-admin) 完全免费且可商用,基于 [Vue3.0](https://github.com/vuejs/vue-next)、[Vite](https://github.com/vitejs/vite)、 [Naive UI](https://www.naiveui.com/)、[TypeScript](https://www.typescriptlang.org/) 的中后台解决方案,它使用了最新的前端技术栈,并提炼了典型的业务模型,页面,包括二次封装组件、动态菜单、权限校验、粒子化权限控制等功能,它可以帮助你快速搭建企业级中后台项目, 相信不管是从新技术使用还是其他方面,都能帮助到你
## 特性
- 二次封装实用高扩展性组件
- 响应式、多主题,多配置,快速集成,开箱即用
- 最新技术栈,使用 `Vue3``Typescript``Pinia``Vite` 等前端前沿技术
- 强大的鉴权系统,对路由、菜单、功能点等支持`三种鉴权模式`,满足不同的业务鉴权需求
- 持续更新,实用性页面模板功能和交互,随意搭配组合,让构建页面变得简单化
`Naive Ui Admin` 是一款 完全免费 且可商用的中后台解决方案,基于 🌟 `Vue3.0` 🌟、🚀 `Vite` 🚀、✨ [Naive UI](https://www.naiveui.com/) ✨ 和 🎉 `TypeScript` 🎉
它融合了最新的前端技术栈,提炼了典型的业务模型和页面,包括二次封装组件、动态菜单、权限校验等功能,助力快速搭建企业级中后台项目。
## 预览
## 🌈 特性
📦 二次封装的实用高扩展性组件
🎨 响应式、多主题、多配置,快速集成,开箱即用
🚀 强大的鉴权系统,支持 三种鉴权模式,满足多样业务需求
🌐 持续更新的实用性页面模板和交互设计,简化页面构建
## 🎥 预览
- [naive-ui-admin](https://jekip.github.io)
账号admin密码123456随意
## 提示
## 💡 提示
如果开源版本的功能和组件,并不能满足您的需求,不妨看看,我们全新 `NaiveAdmin` 他或许能让您眼前一亮O(∩_∩)O哈哈~
如果您需要更多功能和组件,不妨尝试全新 `NaiveAdmin`,它可能正是您寻找的解决方案
[NaiveAdmin 官网](https://www.naiveadmin.com)
[NaiveAdmin 变更日志](https://www.yuque.com/u5825/zaqu0e)
[为什么选我们?](https://www.naiveadmin.com/choose/we)
### Plus
基于 `NaiveUi` 全新设计版本,增众多特性,强烈推荐
基于 `NaiveUi` 全新设计版本,增加了众多特性,值得一试
[NaiveAdmin Plus 预览](https://plus.naiveadmin.com)
### Arco vue
智能设计体系,连接轻盈体验
智能设计体系,提供轻盈体验
[NaiveAdmin Arco 预览](https://arco.naiveadmin.com)
@@ -50,11 +54,11 @@
[NaiveAdmin Antd 预览](https://antd.naiveadmin.com)
## 文档
## 📚 文档
[文档地址](https://jekip.github.io/docs)
[文档地址](https://docs.naiveadmin.com)
## 准备
## 🛠 准备
- [node](http://nodejs.org/) 和 [git](https://git-scm.com/) -项目开发环境
- [Vite](https://vitejs.dev/) - 熟悉 vite 特性
@@ -62,10 +66,11 @@
- [TypeScript](https://www.typescriptlang.org/) - 熟悉`TypeScript`基本语法
- [Es6+](http://es6.ruanyifeng.com/) - 熟悉 es6 基本语法
- [Vue-Router-Next](https://next.router.vuejs.org/) - 熟悉 vue-router 基本使用
- [Naive-ui-admin](https://www.naiveui.com/) - ui 基本使用
- [NaiveUi](https://www.naiveui.com/) - ui 基本使用
- [Mock.js](https://github.com/nuysoft/Mock) - mockjs 基本语法
## 使用
## 🏗️ 使用
- 获取项目代码
@@ -78,30 +83,30 @@ git clone https://github.com/jekip/naive-ui-admin.git
```bash
cd naive-ui-admin
yarn install
pnpm install
```
- 运行
```bash
yarn dev
pnpm run dev
```
- 打包
```bash
yarn build
pnpm build
```
## 更新日志
## 📜 更新日志
[CHANGELOG](./CHANGELOG.md)
## 如何贡献
## 🤝 如何贡献
非常欢迎你的加入![提一个 Issue](https://github.com/jekip/naive-ui-admin/issues) 或者提交一个 Pull Request
非常欢迎你的加入![提一个 Issue](https://github.com/jekip/naive-ui-admin/issues) 或者提交一个 `Pull Request`
**Pull Request:**
@@ -111,7 +116,7 @@ yarn build
4. 推送您的分支: `git push origin feat/xxxx`
5. 提交`pull request`
## Git 贡献提交规范
## 📋 Git 贡献提交规范
- 参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))
@@ -129,7 +134,7 @@ yarn build
- `types` 类型定义文件更改
- `wip` 开发中
## 浏览器支持
## 🌐 浏览器支持
本地开发推荐使用`Chrome 80+` 浏览器
@@ -139,17 +144,17 @@ yarn build
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
## 维护者
## 👥 维护者
[@Ah jung](https://github.com/jekip)
## 交流
## 💬 交流
`Naive Ui Admin` 使用或其他问题,都可以在群内讨论或提问
有关 `Naive Ui Admin` 使用或其他问题,欢迎加入我们的讨论群组或提出问题
![160335146-c28dd205-4600-4d62-b2c6-6456034ab7b1](https://user-images.githubusercontent.com/19426584/217689718-407e6cb9-dd3b-4a11-a025-3c58834b52ff.jpg)
## 赞助
#### 如果觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 🍹
## 💖 赞助
#### 如果觉得这个项目对您有帮助,可以通过下面的链接为作者买一杯果汁表示感谢!
![donate](https://jekip.github.io/docs/images/sponsor.png)

View File

@@ -1,57 +0,0 @@
module.exports = {
ignores: [(commit) => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
parserPreset: {
parserOpts: {
headerPattern: /^(\w*|[\u4e00-\u9fa5]*)(?:[\(\](.*)[\)\])?[\:\] (.*)/,
headerCorrespondence: ['type', 'scope', 'subject'],
referenceActions: [
'close',
'closes',
'closed',
'fix',
'fixes',
'fixed',
'resolve',
'resolves',
'resolved',
],
issuePrefixes: ['#'],
noteKeywords: ['BREAKING CHANGE'],
fieldPattern: /^-(.*?)-$/,
revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./,
revertCorrespondence: ['header', 'hash'],
warn() {},
mergePattern: null,
mergeCorrespondence: null,
},
},
rules: {
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 108],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'style',
'docs',
'test',
'refactor',
'build',
'ci',
'chore',
'revert',
'wip',
'workflow',
'types',
'release',
],
],
},
};

View File

@@ -1,6 +1,6 @@
{
"name": "naive-ui-admin",
"version": "1.9.1",
"version": "1.9.3",
"author": {
"name": "Ahjung",
"email": "735878602@qq.com",
@@ -12,56 +12,54 @@
"serve": "pnpm run dev",
"dev": "vite",
"build": "vite build && esno ./build/script/postBuild.ts",
"build:no-cache": "pnpm clean:cache && npm run build",
"report": "cross-env REPORT=true npm run build",
"preview": "npm run build && vite preview",
"build:no-cache": "pnpm clean:cache && pnpm run build",
"report": "cross-env REPORT=true pnpm run build",
"preview": "pnpm run build && vite preview",
"preview:dist": "vite preview",
"clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
"clean:lib": "rimraf node_modules",
"build typecheck": "vuedx-typecheck . && vite build",
"deploy": "gh-pages -d dist",
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
"test prod gzip": "http-server dist --cors --gzip -c-1"
"lint:pretty": "pretty-quick --staged"
},
"dependencies": {
"@vicons/antd": "^0.12.0",
"@vicons/ionicons5": "^0.12.0",
"@vueup/vue-quill": "^1.2.0",
"@vueuse/core": "^9.13.0",
"axios": "^1.6.8",
"axios": "^1.7.2",
"blueimp-md5": "^2.19.0",
"date-fns": "^2.30.0",
"echarts": "^5.5.0",
"echarts": "^5.5.1",
"element-resize-detector": "^1.2.4",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"mockjs": "^1.1.0",
"naive-ui": "^2.38.1",
"naive-ui": "^2.38.2",
"pinia": "^2.1.7",
"qs": "^6.12.0",
"qs": "^6.12.1",
"vfonts": "^0.0.3",
"vue": "^3.4.21",
"vue-router": "^4.3.0",
"vue": "^3.4.31",
"vue-router": "^4.4.0",
"vue-types": "^4.2.1"
},
"devDependencies": {
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@types/lodash": "^4.17.0",
"@types/node": "^18.19.31",
"@types/lodash": "^4.17.6",
"@types/node": "^18.19.39",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
"@vue/compiler-sfc": "^3.4.21",
"@vue/compiler-sfc": "^3.4.31",
"@vue/eslint-config-typescript": "^11.0.3",
"autoprefixer": "^10.4.19",
"commitizen": "^4.3.0",
"core-js": "^3.36.1",
"core-js": "^3.37.1",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
@@ -69,7 +67,7 @@
"eslint-define-config": "1.12.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.24.1",
"eslint-plugin-vue": "^9.26.0",
"esno": "^0.16.3",
"gh-pages": "^4.0.0",
"husky": "^8.0.3",
@@ -86,17 +84,17 @@
"stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.7.0",
"tailwindcss": "^3.4.3",
"tailwindcss": "^3.4.4",
"typescript": "^4.9.5",
"unplugin-vue-components": "^0.22.12",
"vite": "^3.2.10",
"vite": "^5.3.2",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.2",
"vite-plugin-mock": "^2.9.8",
"vite-plugin-style-import": "^2.0.0",
"vue-demi": "^0.13.11",
"vue-draggable-next": "^2.2.1",
"vue-eslint-parser": "^9.4.2",
"vue-eslint-parser": "^9.4.3",
"vuedraggable": "^4.1.0"
},
"lint-staged": {

11236
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -98,6 +98,8 @@
if (instance) {
emit('register', modalMethods);
}
defineExpose(modalMethods);
</script>
<style lang="less">

View File

@@ -156,7 +156,7 @@
const tableElRef = ref<ComponentRef>(null);
const wrapRef = ref<Nullable<HTMLDivElement>>(null);
let paginationEl: HTMLElement | null;
const isStriped = ref(false);
const isStriped = ref(props.striped || false);
const tableData = ref<Recordable[]>([]);
const innerPropsRef = ref<Partial<BasicTableProps>>();

View File

@@ -1,12 +1,6 @@
<template>
<div class="editable-cell">
<div v-show="!isEdit" class="editable-cell-content" @click="handleEdit">
{{ getValues }}
<n-icon class="edit-icon" v-if="!column.editRow">
<FormOutlined />
</n-icon>
</div>
<div class="flex editable-cell-content" v-show="isEdit" v-click-outside="onClickOutside">
<div class="flex editable-cell-content" v-if="isEdit" v-click-outside="onClickOutside">
<div class="editable-cell-content-comp">
<CellComponent
v-bind="getComponentProps"
@@ -29,6 +23,12 @@
</n-icon>
</div>
</div>
<div v-else class="flex items-center editable-cell-content" @click="handleEdit">
{{ getValues }}
<n-icon class="ml-1 edit-icon" v-if="!column.editRow">
<FormOutlined />
</n-icon>
</div>
</div>
</template>
<script lang="ts">

View File

@@ -56,4 +56,5 @@ export const basicProps = {
},
canResize: propTypes.bool.def(true),
resizeHeightOffset: propTypes.number.def(0),
striped: propTypes.bool.def(false),
};

View File

@@ -1,10 +1,10 @@
export interface PaginationProps {
page?: number; //受控模式下的当前页
itemCount?: number; //总条数
pageCount?: number; //总页数
pageSize?: number; //受控模式下的分页大小
pageSizes?: number[]; //每页条数, 可自定义
showSizePicker?: boolean; //是否显示每页条数的选择器
showQuickJumper?: boolean; //是否显示快速跳转
prefix?: any; //分页前缀
page?: number; //受控模式下的当前页
itemCount?: number; //总条数
pageCount?: number; //总页数
pageSize?: number; //受控模式下的分页大小
pageSizes?: number[]; //每页条数, 可自定义
showSizePicker?: boolean; //是否显示每页条数的选择器
showQuickJumper?: boolean; //是否显示快速跳转
prefix?: any; //分页前缀
}

View File

@@ -206,7 +206,7 @@
<n-divider title-placement="center">动画</n-divider>
<div class="drawer-setting-item">
<div class="drawer-setting-item-title"> 用动画 </div>
<div class="drawer-setting-item-title"> 用动画 </div>
<div class="drawer-setting-item-action">
<n-switch v-model:value="settingStore.isPageAnimate" />
</div>

View File

@@ -14,6 +14,7 @@
:actionColumn="actionColumn"
@update:checked-row-keys="onCheckedRow"
:scroll-x="1090"
:striped="true"
>
<template #tableTitle>
<n-button type="primary" @click="addTable">