mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	Merge branch 'main' of github.com:pure-admin/vue-pure-admin into gitee
This commit is contained in:
		
						commit
						55129577c7
					
				
							
								
								
									
										21
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
node_modules
 | 
			
		||||
.DS_Store
 | 
			
		||||
dist
 | 
			
		||||
dist-ssr
 | 
			
		||||
*.local
 | 
			
		||||
.eslintcache
 | 
			
		||||
report.html
 | 
			
		||||
 | 
			
		||||
yarn.lock
 | 
			
		||||
npm-debug.log*
 | 
			
		||||
.pnpm-error.log*
 | 
			
		||||
.pnpm-debug.log
 | 
			
		||||
tests/**/coverage/
 | 
			
		||||
 | 
			
		||||
# Editor directories and files
 | 
			
		||||
.idea
 | 
			
		||||
*.suo
 | 
			
		||||
*.ntvs*
 | 
			
		||||
*.njsproj
 | 
			
		||||
*.sln
 | 
			
		||||
tsconfig.tsbuildinfo
 | 
			
		||||
@ -1,3 +1,33 @@
 | 
			
		||||
# 4.3.0 (2023-06-04)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
- Add `docker` support
 | 
			
		||||
- Add project version real-time update detection function
 | 
			
		||||
- Improve system management - role management page
 | 
			
		||||
- Waterfall component adds infinite scrolling
 | 
			
		||||
- Add `updateDialog` to the functional bullet box to change the property value of the bullet box itself
 | 
			
		||||
- `wangeditor` rich text add multiple rich text and custom image upload examples
 | 
			
		||||
- Advanced usage of `pure-table` table added keep checked `CheckBox` option example
 | 
			
		||||
- Added `title` slot to `RePureTableBar` component
 | 
			
		||||
 | 
			
		||||
### 🐞 Bug fixes
 | 
			
		||||
 | 
			
		||||
- Fixed the problem that the countdown to obtain the verification code will be disabled with a delay of `1s`
 | 
			
		||||
- Fixed the problem that the icon selector did not initialize the preview correctly
 | 
			
		||||
- Fixed dynamic routing redirection causing duplicate content on tabs
 | 
			
		||||
- Fix the problem that the `getTopMenu()` function cannot get `path` and report an error when the page is forced to refresh
 | 
			
		||||
- Fix the problem that the left menu does not display as a whole due to the sudden pull up after the left menu is folded
 | 
			
		||||
- Fixed `RePureTableBar` scrollbar issue in `windows` after turning off column settings
 | 
			
		||||
 | 
			
		||||
### 🍏 Perf
 | 
			
		||||
 | 
			
		||||
-Optimized tab page operation-routing parameter transfer mode usage
 | 
			
		||||
 | 
			
		||||
- Optimize menu search function and style
 | 
			
		||||
- Update `vscode` code snippets
 | 
			
		||||
- Optimize the initialization call timing of `dataThemeChange` theme setting
 | 
			
		||||
 | 
			
		||||
# 4.2.0 (2023-05-15)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@ -1,3 +1,33 @@
 | 
			
		||||
# 4.3.0 (2023-06-04)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
- Add `docker` support
 | 
			
		||||
- Add project version real-time update detection function
 | 
			
		||||
- Improve system management - role management page
 | 
			
		||||
- Waterfall component adds infinite scrolling
 | 
			
		||||
- Add `updateDialog` to the functional bullet box to change the property value of the bullet box itself
 | 
			
		||||
- `wangeditor` rich text add multiple rich text and custom image upload examples
 | 
			
		||||
- Advanced usage of `pure-table` table added keep checked `CheckBox` option example
 | 
			
		||||
- Added `title` slot to `RePureTableBar` component
 | 
			
		||||
 | 
			
		||||
### 🐞 Bug fixes
 | 
			
		||||
 | 
			
		||||
- Fixed the problem that the countdown to obtain the verification code will be disabled with a delay of `1s`
 | 
			
		||||
- Fixed the problem that the icon selector did not initialize the preview correctly
 | 
			
		||||
- Fixed dynamic routing redirection causing duplicate content on tabs
 | 
			
		||||
- Fix the problem that the `getTopMenu()` function cannot get `path` and report an error when the page is forced to refresh
 | 
			
		||||
- Fix the problem that the left menu does not display as a whole due to the sudden pull up after the left menu is folded
 | 
			
		||||
- Fixed `RePureTableBar` scrollbar issue in `windows` after turning off column settings
 | 
			
		||||
 | 
			
		||||
### 🍏 Perf
 | 
			
		||||
 | 
			
		||||
-Optimized tab page operation-routing parameter transfer mode usage
 | 
			
		||||
 | 
			
		||||
- Optimize menu search function and style
 | 
			
		||||
- Update `vscode` code snippets
 | 
			
		||||
- Optimize the initialization call timing of `dataThemeChange` theme setting
 | 
			
		||||
 | 
			
		||||
# 4.2.0 (2023-05-15)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,32 @@
 | 
			
		||||
# 4.3.0 (2023-06-04)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
- 添加 `docker` 支持
 | 
			
		||||
- 添加项目版本实时更新检测功能
 | 
			
		||||
- 完善系统管理-角色管理页面
 | 
			
		||||
- 瀑布流组件添加无限滚动
 | 
			
		||||
- 函数式弹框添加 `updateDialog` 更改弹框自身属性值方法
 | 
			
		||||
- `wangeditor` 富文本添加多个富文本和自定义图片上传示例
 | 
			
		||||
- `pure-table` 表格高级用法添加保留已选中的 `CheckBox` 选项示例
 | 
			
		||||
- `RePureTableBar` 组件添加 `title` 插槽
 | 
			
		||||
 | 
			
		||||
### 🐞 Bug fixes
 | 
			
		||||
 | 
			
		||||
- 修复获取验证码倒计时会有 `1s` 延时禁用的问题
 | 
			
		||||
- 修复图标选择器未正确初始化预览问题
 | 
			
		||||
- 修复动态路由重定向造成标签页出现重复内容
 | 
			
		||||
- 修复强制刷新页面 `getTopMenu()` 函数获取不到 `path` 报错的问题
 | 
			
		||||
- 修复左侧菜单折叠后突然拉升造成左侧菜单整体不显示的问题
 | 
			
		||||
- 修复 `RePureTableBar` 关闭列设置后在 `windows` 出现滚动条的问题
 | 
			
		||||
 | 
			
		||||
### 🍏 Perf
 | 
			
		||||
 | 
			
		||||
- 优化标签页操作-路由传参模式用法
 | 
			
		||||
- 优化菜单搜索功能和样式
 | 
			
		||||
- 更新 `vscode` 代码片段
 | 
			
		||||
- 优化 `dataThemeChange` 主题设置的初始化调用时机
 | 
			
		||||
 | 
			
		||||
# 4.2.0 (2023-05-15)
 | 
			
		||||
 | 
			
		||||
### 🎫 Feat
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
FROM node:16-alpine as build-stage
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
RUN corepack enable
 | 
			
		||||
RUN corepack prepare pnpm@7.32.1 --activate
 | 
			
		||||
 | 
			
		||||
RUN npm config set registry https://registry.npmmirror.com
 | 
			
		||||
 | 
			
		||||
COPY .npmrc package.json pnpm-lock.yaml ./
 | 
			
		||||
RUN pnpm install --frozen-lockfile
 | 
			
		||||
 | 
			
		||||
COPY . .
 | 
			
		||||
RUN pnpm build
 | 
			
		||||
 | 
			
		||||
FROM nginx:stable-alpine as production-stage
 | 
			
		||||
 | 
			
		||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
 | 
			
		||||
EXPOSE 80
 | 
			
		||||
 | 
			
		||||
CMD ["nginx", "-g", "daemon off;"]
 | 
			
		||||
@ -90,6 +90,28 @@ pnpm serve
 | 
			
		||||
pnpm build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Docker support
 | 
			
		||||
 | 
			
		||||
1. Customize the image named `vue-pure-admin` (please note that there is a dot `.` at the end of the command below, indicating that the `Dockerfile` file in the current path is used, and the path can be specified according to the actual situation)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
docker build -t vue-pure-admin .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. Port mapping and start the `docker` container (`8080:80`: indicates that the `80` port is used in the container, and the port is forwarded to the `8080` port of the host; `pure-admin`: indicates a custom container name; `vue-pure-admin`: indicates the custom image name)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
docker run -dp 8080:80  --name pure-admin vue-pure-admin
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
After operating the above two commands, open `http://localhost:8080` in the browser to preview
 | 
			
		||||
 | 
			
		||||
Of course, you can also operate the `docker` project through the [Docker Desktop](https://www.docker.com/products/docker-desktop/) visual interface, as shown below
 | 
			
		||||
 | 
			
		||||
<p align="center">
 | 
			
		||||
  <img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
## Change Log
 | 
			
		||||
 | 
			
		||||
[CHANGELOG](./CHANGELOG.en_US.md)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										22
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								README.md
									
									
									
									
									
								
							@ -90,6 +90,28 @@ pnpm serve
 | 
			
		||||
pnpm build
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Docker 支持
 | 
			
		||||
 | 
			
		||||
1. 自定义镜像名为 `vue-pure-admin` 的镜像(请注意下面命令末尾有一个点 `.` 表示使用当前路径下的 `Dockerfile` 文件,可根据实际情况指定路径)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
docker build -t vue-pure-admin .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
2. 端口映射并启动 `docker` 容器(`8080:80`:表示在容器中使用 `80` 端口,并将该端口转发到主机的 `8080` 端口;`pure-admin`:表示自定义容器名;`vue-pure-admin`:表示自定义镜像名)
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
docker run -dp 8080:80  --name pure-admin vue-pure-admin
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
操作完上面两个命令后,在浏览器打开 `http://localhost:8080` 即可预览
 | 
			
		||||
 | 
			
		||||
当然也可以通过 [Docker Desktop](https://www.docker.com/products/docker-desktop/) 可视化界面去操作 `docker` 项目,如下图
 | 
			
		||||
 | 
			
		||||
<p align="center">
 | 
			
		||||
  <img alt="docker" width="100%" src="https://yiming_chang.gitee.io/pure-admin-doc/img/docker/1.jpg">
 | 
			
		||||
</p>
 | 
			
		||||
 | 
			
		||||
## 更新日志
 | 
			
		||||
 | 
			
		||||
[CHANGELOG](./CHANGELOG.zh_CN.md)
 | 
			
		||||
 | 
			
		||||
@ -453,6 +453,7 @@ export default [
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    // https://api.github.com/repos/pure-admin/vue-pure-admin/releases?per_page=100
 | 
			
		||||
    url: "/releases",
 | 
			
		||||
    method: "get",
 | 
			
		||||
    response: () => {
 | 
			
		||||
@ -460,6 +461,11 @@ export default [
 | 
			
		||||
        success: true,
 | 
			
		||||
        data: {
 | 
			
		||||
          list: [
 | 
			
		||||
            {
 | 
			
		||||
              created_at: "2023-06-04T04:11:51Z",
 | 
			
		||||
              published_at: "2023-06-04T04:13:24Z",
 | 
			
		||||
              body: "# 4.3.0 (2023-06-04)\r\n\r\n### 🎫 Feat\r\n\r\n- 添加 `docker` 支持\r\n- 添加项目版本实时更新检测功能\r\n- 完善系统管理-角色管理页面\r\n- 瀑布流组件添加无限滚动\r\n- 函数式弹框添加 `updateDialog` 更改弹框自身属性值方法\r\n- `wangeditor` 富文本添加多个富文本和自定义图片上传示例\r\n- `pure-table` 表格高级用法添加保留已选中的 `CheckBox` 选项示例\r\n- `RePureTableBar` 组件添加 `title` 插槽\r\n\r\n### 🐞 Bug fixes\r\n\r\n- 修复获取验证码倒计时会有 `1s` 延时禁用的问题\r\n- 修复图标选择器未正确初始化预览问题\r\n- 修复动态路由重定向造成标签页出现重复内容\r\n- 修复强制刷新页面 `getTopMenu()` 函数获取不到 `path` 报错的问题\r\n- 修复左侧菜单折叠后突然拉升造成左侧菜单整体不显示的问题\r\n- 修复 `RePureTableBar` 关闭列设置后在 `windows` 出现滚动条的问题\r\n\r\n### 🍏 Perf\r\n\r\n- 优化标签页操作-路由传参模式用法\r\n- 优化菜单搜索功能和样式\r\n- 更新 `vscode` 代码片段\r\n- 优化 `dataThemeChange` 主题设置的初始化调用时机"
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
              created_at: "2023-05-15T07:03:57Z",
 | 
			
		||||
              published_at: "2023-05-15T07:04:54Z",
 | 
			
		||||
 | 
			
		||||
@ -1,11 +1,11 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "vue-pure-admin",
 | 
			
		||||
  "version": "4.2.0",
 | 
			
		||||
  "version": "4.3.0",
 | 
			
		||||
  "private": true,
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
 | 
			
		||||
    "serve": "pnpm dev",
 | 
			
		||||
    "build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build",
 | 
			
		||||
    "build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
 | 
			
		||||
    "build:staging": "rimraf dist && vite build --mode staging",
 | 
			
		||||
    "report": "rimraf dist && vite build",
 | 
			
		||||
    "preview": "vite preview",
 | 
			
		||||
@ -65,6 +65,7 @@
 | 
			
		||||
    "typeit": "^8.7.1",
 | 
			
		||||
    "v-contextmenu": "3.0.0",
 | 
			
		||||
    "v3-infinite-loading": "^1.2.2",
 | 
			
		||||
    "version-rocket": "^1.6.2",
 | 
			
		||||
    "vue": "^3.3.4",
 | 
			
		||||
    "vue-i18n": "^9.2.2",
 | 
			
		||||
    "vue-json-pretty": "^2.2.4",
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8407
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8407
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,5 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
  "Version": "4.2.0",
 | 
			
		||||
  "Version": "4.3.0",
 | 
			
		||||
  "Title": "PureAdmin",
 | 
			
		||||
  "FixedHeader": true,
 | 
			
		||||
  "HiddenSideBar": false,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										27
									
								
								src/App.vue
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								src/App.vue
									
									
									
									
									
								
							@ -7,10 +7,12 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { defineComponent } from "vue";
 | 
			
		||||
import { checkVersion } from "version-rocket";
 | 
			
		||||
import { ElConfigProvider } from "element-plus";
 | 
			
		||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
 | 
			
		||||
import en from "element-plus/lib/locale/lang/en";
 | 
			
		||||
import { ReDialog } from "@/components/ReDialog";
 | 
			
		||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
 | 
			
		||||
 | 
			
		||||
export default defineComponent({
 | 
			
		||||
  name: "app",
 | 
			
		||||
  components: {
 | 
			
		||||
@ -21,6 +23,29 @@ export default defineComponent({
 | 
			
		||||
    currentLocale() {
 | 
			
		||||
      return this.$storage.locale?.locale === "zh" ? zhCn : en;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  beforeCreate() {
 | 
			
		||||
    const { version, name: title } = __APP_INFO__.pkg;
 | 
			
		||||
    const { VITE_PUBLIC_PATH, MODE } = import.meta.env;
 | 
			
		||||
    // https://github.com/guMcrey/version-rocket/blob/main/README.zh-CN.md#api
 | 
			
		||||
    if (MODE === "production") {
 | 
			
		||||
      // 版本实时更新检测,只作用于线上环境
 | 
			
		||||
      checkVersion(
 | 
			
		||||
        // config
 | 
			
		||||
        {
 | 
			
		||||
          // 5分钟检测一次版本
 | 
			
		||||
          pollingTime: 300000,
 | 
			
		||||
          localPackageVersion: version,
 | 
			
		||||
          originVersionFileUrl: `${location.origin}${VITE_PUBLIC_PATH}version.json`
 | 
			
		||||
        },
 | 
			
		||||
        // options
 | 
			
		||||
        {
 | 
			
		||||
          title,
 | 
			
		||||
          description: "检测到新版本",
 | 
			
		||||
          buttonText: "立即更新"
 | 
			
		||||
        }
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
});
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
@ -6,11 +6,18 @@ import type { PaginationProps, LoadingConfig, Align } from "@pureadmin/table";
 | 
			
		||||
export function useColumns() {
 | 
			
		||||
  const dataList = ref([]);
 | 
			
		||||
  const loading = ref(true);
 | 
			
		||||
  const select = ref("no");
 | 
			
		||||
  const hideVal = ref("nohide");
 | 
			
		||||
  const tableSize = ref("default");
 | 
			
		||||
  const paginationSmall = ref(false);
 | 
			
		||||
  const paginationAlign = ref("right");
 | 
			
		||||
  const columns: TableColumnList = [
 | 
			
		||||
    {
 | 
			
		||||
      type: "selection",
 | 
			
		||||
      align: "left",
 | 
			
		||||
      reserveSelection: true,
 | 
			
		||||
      hide: () => (select.value === "no" ? true : false)
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
      label: "日期",
 | 
			
		||||
      prop: "date",
 | 
			
		||||
@ -83,7 +90,9 @@ export function useColumns() {
 | 
			
		||||
      Array.from({ length: 6 }).forEach(() => {
 | 
			
		||||
        newList.push(clone(tableData, true));
 | 
			
		||||
      });
 | 
			
		||||
      dataList.value = newList.flat(Infinity);
 | 
			
		||||
      newList.flat(Infinity).forEach((item, index) => {
 | 
			
		||||
        dataList.value.push({ id: index, ...item });
 | 
			
		||||
      });
 | 
			
		||||
      pagination.total = dataList.value.length;
 | 
			
		||||
      loading.value = false;
 | 
			
		||||
    });
 | 
			
		||||
@ -93,6 +102,7 @@ export function useColumns() {
 | 
			
		||||
    loading,
 | 
			
		||||
    columns,
 | 
			
		||||
    dataList,
 | 
			
		||||
    select,
 | 
			
		||||
    hideVal,
 | 
			
		||||
    tableSize,
 | 
			
		||||
    pagination,
 | 
			
		||||
 | 
			
		||||
@ -5,6 +5,7 @@ const {
 | 
			
		||||
  loading,
 | 
			
		||||
  columns,
 | 
			
		||||
  dataList,
 | 
			
		||||
  select,
 | 
			
		||||
  hideVal,
 | 
			
		||||
  tableSize,
 | 
			
		||||
  pagination,
 | 
			
		||||
@ -20,6 +21,12 @@ const {
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-space class="float-right mb-4">
 | 
			
		||||
      <p class="text-sm">多选:</p>
 | 
			
		||||
      <el-radio-group v-model="select" size="small">
 | 
			
		||||
        <el-radio-button label="yes">是</el-radio-button>
 | 
			
		||||
        <el-radio-button label="no">否</el-radio-button>
 | 
			
		||||
      </el-radio-group>
 | 
			
		||||
      <el-divider direction="vertical" />
 | 
			
		||||
      <p class="text-sm">动态列:</p>
 | 
			
		||||
      <el-radio-group v-model="hideVal" size="small">
 | 
			
		||||
        <el-radio-button label="nohide">不隐藏</el-radio-button>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user