Skip to content

Commit

Permalink
Merge branch 'main' into gavin/v4-dev
Browse files Browse the repository at this point in the history
* main: (224 commits)
  fix:修复气泡确认框的底部按钮换行的问题 (vbenjs#3413)
  style: tabs bottom double line fix (vbenjs#3415)
  feat(IconPicker): IconPicker could allowClear and readonly for form (vbenjs#3414)
  fix(FormTable): Invert select bug (vbenjs#3412)
  chore: 自定义组件默认rule校验默认触发逻辑为blur
  chore(ApiRadioGroup): 移除多余的change事件
  fix(ApiSelect): 修复监听不到params的变动
  fix(BasicForm->ApiRadioGroup): when options click, duplicate requests. resolve vbenjs#3387
  Revert "feat: table搜索表单值发生改变可以触发reload (vbenjs#3378)" (vbenjs#3407)
  fix(BasicTable): ColumnSetting mistake when use setColumns (vbenjs#3408)
  fix: navigator.clipboard 兼容问题 vbenjs#3372 (vbenjs#3403)
  feat: ColumnSetting and SizeSetting persist (vbenjs#3398)
  fix(BasicDrawer): remove toRaw props (vbenjs#3399)
  feat(hooks): useWatermark添加水印防篡改功能(vbenjs#3395) (vbenjs#3397)
  fix: table height calc when fullcontent and footer visible change (vbenjs#3392)
  fix(BasicTable): table表格宽度自适应,隐藏的列导致宽度增加 (vbenjs#3388)
  fix: 使用suffix时,label没有垂直居中 (vbenjs#3384)
  feat: table搜索表单值发生改变可以触发reload (vbenjs#3378)
  feat(treeTable): add function collapseRows and demo (vbenjs#3375)
  perf(BasicTree): 外部获取treeData不必通过treeDataRef.value (vbenjs#3353)
  ...

# Conflicts:
#	internal/eslint-config/.eslintignore
#	internal/stylelint-config/.eslintignore
#	internal/vite-config/.eslintignore
#	package.json
#	pnpm-lock.yaml
#	src/locales/lang/en/sys.ts
#	src/locales/lang/zh-CN/sys.ts
#	src/store/modules/user.ts
#	src/views/demo/feat/session-timeout/index.vue
  • Loading branch information
gavinZhang001 committed Dec 14, 2023
2 parents f77e30f + d502e1d commit 1d87733
Show file tree
Hide file tree
Showing 670 changed files with 18,256 additions and 31,556 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ dist
.local
/bin
Dockerfile
package.json
39 changes: 39 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [main, thin]
pull_request:
branches: [main, thin]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Run type:check
run: pnpm run type:check

- name: Build
run: pnpm build
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"mrmlnc.vscode-less",
"lokalise.i18n-ally",
"antfu.iconify",
"antfu.unocss",
"mikestead.dotenv",
"heybourn.headwind"
"vue.vscode-typescript-vue-plugin"
]
}
60 changes: 31 additions & 29 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"stylelint.enable": true,
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
"path-intellisense.mappings": {
"/@/": "${workspaceRoot}/src"
"@/": "${workspaceRoot}/src"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down Expand Up @@ -91,50 +91,51 @@
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
}
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": ["src/locales/lang"],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.enabledParsers": ["json"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"],
"cSpell.words": [
"vben",
"antd",
"antv",
"brotli",
"browserslist",
"tailwindcss",
"codemirror",
"commitlint",
"cropperjs",
"echarts",
"esnext",
"antv",
"tinymce",
"qrcode",
"sider",
"esno",
"iconify",
"INTLIFY",
"lintstagedrc",
"logicflow",
"mockjs",
"nprogress",
"pinia",
"pnpm",
"qrcode",
"sider",
"nprogress",
"INTLIFY",
"stylelint",
"esno",
"vitejs",
"sortablejs",
"mockjs",
"codemirror",
"iconify",
"commitlint",
"stylelint",
"tailwindcss",
"tinymce",
"unocss",
"unref",
"vben",
"vditor",
"echarts",
"cropperjs",
"logicflow",
"Vite",
"vitejs",
"vueuse",
"zxcvbn",
"lintstagedrc",
"brotli",
"tailwindcss",
"sider",
"pnpm",
"antd"
"zxcvbn"
],
"vetur.format.scriptInitialIndent": true,
"vetur.format.styleInitialIndent": true,
Expand Down Expand Up @@ -168,5 +169,6 @@
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,README*,.npmrc,.browserslistrc",
".eslintrc.js": ".eslintignore,.prettierignore,.stylelintignore,.commitlintrc.js,.prettierrc.js,.stylelintrc.js"
},
"terminal.integrated.scrollback": 10000
"terminal.integrated.scrollback": 10000,
"nuxt.isNuxtApp": false
}
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,15 @@ Support modern browsers, not IE

## Maintainer

[@Vben](https://github.com/anncwb)
[@Vben](https://github.com/anncwb) [@Jinmao](https://github.com/jinmao88)

## Donate
## Thanks

If you think this project is helpful to you, you can help the author buy a cup of coffee to show your support!
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" alt="JetBrains Logo (Main) logo." height="120">

![donate](https://anncwb.github.io/anncwb/images/sponsor.png)
## Star History Chart

<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a>

## Discord

- [github discussions](https://github.com/anncwb/vue-vben-admin/discussions)
- [Discord](https://discord.gg/8GuAdwDhj6)
[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)

## License

Expand Down
14 changes: 7 additions & 7 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,22 @@ docker run --name vue-vben-admin -d -p 6666:80 -e VG_BASE_URL=http://localhost:

## 维护者

[@Vben](https://github.com/anncwb)
[@Vben](https://github.com/anncwb) [@Jinmao](https://github.com/jinmao88)

## 捐赠
## 感谢

如果你觉得这个项目对你有帮助,你可以帮作者买一杯咖啡表示支持!

![donate](https://anncwb.github.io/anncwb/images/sponsor.png)

<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a>
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" alt="JetBrains Logo (Main) logo." height='120'>

## 交流

`Vue-vben-Admin` 是完全开源免费的项目,在帮助开发者更方便地进行中大型管理系统开发,同时也提供 QQ 交流群使用问题欢迎在群内提问。

- QQ 群 `569291866`

## Star 历史

[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date)

## License

[MIT © Vben-2020](./LICENSE)
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<body>
<div id="app">
<style>
html {
/* same as ant-design-vue/dist/reset.css setting, avoid the title line-height changed */
line-height: 1.15;
}

html[data-theme='dark'] .app-loading {
background-color: #2c344a;
}
Expand Down
8 changes: 8 additions & 0 deletions internal/eslint-config/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
dist
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json
8 changes: 8 additions & 0 deletions internal/stylelint-config/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
dist
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json
8 changes: 8 additions & 0 deletions internal/vite-config/.eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
dist
*.sh
node_modules
*.md
*.woff
*.ttf
.turbo
dist
package.json
4 changes: 2 additions & 2 deletions internal/vite-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@vitejs/plugin-vue": "^4.2.3",
"@gz/eslint-config": "workspace:*",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"ant-design-vue": "^3.2.20",
"ant-design-vue": "^4.0.6",
"dayjs": "^1.11.9",
"dotenv": "^16.3.1",
"fs-extra": "^11.1.1",
Expand All @@ -39,7 +39,7 @@
"pkg-types": "^1.0.3",
"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.63.6",
"unocss": "^0.53.4",
"unocss": "0.53.4",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^3.1.0",
"vite-plugin-html": "^3.2.0",
Expand Down
10 changes: 0 additions & 10 deletions internal/vite-config/src/config/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
find: 'vue-i18n',
replacement: 'vue-i18n/dist/vue-i18n.cjs.js',
},
// /@/xxxx => src/xxxx
{
find: /\/@\//,
replacement: pathResolve('src') + '/',
},
// /#/xxxx => types/xxxx
{
find: /\/#\//,
replacement: pathResolve('types') + '/',
},
// @/xxxx => src/xxxx
{
find: /@\//,
Expand Down
7 changes: 1 addition & 6 deletions internal/vite-config/src/config/common.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { presetTypography, presetUno } from 'unocss';
import UnoCSS from 'unocss/vite';
import { type UserConfig } from 'vite';

Expand All @@ -17,11 +16,7 @@ const commonConfig: (mode: string) => UserConfig = (mode) => ({
maxParallelFileOps: 3,
},
},
plugins: [
UnoCSS({
presets: [presetUno(), presetTypography()],
}),
],
plugins: [UnoCSS()],
});

export { commonConfig };
7 changes: 6 additions & 1 deletion internal/vite-config/src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ function getConfFiles() {
* @param match prefix
* @param confFiles ext
*/
export async function getEnvConfig(match = 'VITE_GLOB_', confFiles = getConfFiles()) {
export async function getEnvConfig(
match = 'VITE_GLOB_',
confFiles = getConfFiles(),
): Promise<{
[key: string]: string;
}> {
let envConfig = {};

for (const confFile of confFiles) {
Expand Down
10 changes: 9 additions & 1 deletion internal/vite-config/src/utils/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ function createContentHash(content: string, hashLSize = 12) {
const hash = createHash('sha256').update(content);
return hash.digest('hex').slice(0, hashLSize);
}
function strToHex(str: string) {
const result: string[] = [];
for (let i = 0; i < str.length; ++i) {
const hex = str.charCodeAt(i).toString(16);
result.push(('000' + hex).slice(-4));
}
return result.join('').toUpperCase();
}

export { createContentHash };
export { createContentHash, strToHex };
16 changes: 9 additions & 7 deletions internal/vite-config/src/utils/modifyVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { resolve } from 'node:path';

import { generate } from '@ant-design/colors';
// @ts-ignore: typo
import { getThemeVariables } from 'ant-design-vue/dist/theme';
/* import { getThemeVariables } from 'ant-design-vue/dist/theme'; */
import { theme } from 'ant-design-vue/lib';
import convertLegacyToken from 'ant-design-vue/lib/theme/convertLegacyToken';

const { defaultAlgorithm, defaultSeed } = theme;
const primaryColor = '#0960bd';

function generateAntColors(color: string, theme: 'default' | 'dark' = 'default') {
Expand All @@ -18,18 +21,18 @@ function generateAntColors(color: string, theme: 'default' | 'dark' = 'default')
export function generateModifyVars() {
const palettes = generateAntColors(primaryColor);
const primary = palettes[5];

const primaryColorObj: Record<string, string> = {};

for (let index = 0; index < 10; index++) {
primaryColorObj[`primary-${index + 1}`] = palettes[index];
}

const modifyVars = getThemeVariables();
// const modifyVars = getThemeVariables();
const mapToken = defaultAlgorithm(defaultSeed);
const v3Token = convertLegacyToken(mapToken);
return {
...modifyVars,
...v3Token,
// reference: Avoid repeated references
hack: `${modifyVars.hack} @import (reference) "${resolve('src/design/config.less')}";`,
hack: `true; @import (reference) "${resolve('src/design/config.less')}";`,
'primary-color': primary,
...primaryColorObj,
'info-color': primary,
Expand All @@ -40,6 +43,5 @@ export function generateModifyVars() {
'font-size-base': '14px', // Main font size
'border-radius-base': '2px', // Component/float fillet
'link-color': primary, // Link color
'app-content-background': '#fafafa', // Link color
};
}
2 changes: 1 addition & 1 deletion mock/_util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Interface data format used to return a unified format
import { ResultEnum } from '/@/enums/httpEnum';
import { ResultEnum } from '@/enums/httpEnum';

export function resultSuccess<T = Recordable>(result: T, { message = 'ok' } = {}) {
return {
Expand Down
1 change: 1 addition & 0 deletions mock/demo/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const accountList = (() => {
role: '@first',
createTime: '@datetime',
remark: '@cword(10,20)',
'dept|0-2': 1,
'status|1': ['0', '1'],
});
}
Expand Down
Loading

0 comments on commit 1d87733

Please sign in to comment.