Skip to content

Commit 4da437d

Browse files
authored
Merge pull request vbenjs#1 from anncwb/main
pull 1
2 parents 877311f + 799a694 commit 4da437d

File tree

351 files changed

+9598
-5855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

351 files changed

+9598
-5855
lines changed

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
VITE_PORT = 3100
2+
13
# Whether to open mock
24
VITE_USE_MOCK = true
35

.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ VITE_PUBLIC_PATH = ./
88
VITE_DROP_CONSOLE = true
99

1010
# Whether to output gz file for packaging
11-
VITE_BUILD_GZIP = false
11+
VITE_BUILD_GZIP = true
1212

1313
# Basic interface address SPA
1414
VITE_GLOB_API_URL=/api

CHANGELOG.en_US.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,90 @@
1+
## 2.0.0-rc.15 (2020-12-31)
2+
3+
### ✨ Table destructive update
4+
5+
- Refactored editable cells and editable rows. See examples for details. The writing has changed. For editable tables.
6+
7+
- Form editing supports form validation
8+
9+
- Added the following configuration in the table column configuration
10+
11+
```bash
12+
{
13+
14+
# Whether to display columns by default. Those that are not displayed can be opened in the column configuration
15+
defaultHidden?: boolean;
16+
# Help text on the right side of the column header
17+
helpMessage?: string | string[];
18+
# Custom formatting Cell content. Support time/enumeration automatic conversion
19+
format?: CellFormat;
20+
21+
# Editable
22+
# Is it an editable cell
23+
edit?: boolean;
24+
# Is it an editable line
25+
editRow?: boolean;
26+
# Edit status.
27+
editable?: boolean;
28+
# Edit component
29+
editComponent?: ComponentType;
30+
# The parameters of the corresponding component
31+
editComponentProps?: Recordable;
32+
# Check
33+
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
34+
# Value enumeration conversion
35+
editValueMap?: (value: any) => string;
36+
# Trigger editing Zhenghang
37+
record.onEditRow?: () => void;
38+
}
39+
40+
```
41+
42+
### ✨ Table reconstruction
43+
44+
- Added `clickToRowSelect` attribute. Used to control whether the clicked row is checked or not
45+
- Monitor row click event
46+
- Add column drag and drop and column fix function for the table column configuration button.
47+
- Added `defaultHidden` attribute to table column configuration. Used to hide by default. You can configure the tick display in the table column
48+
- More powerful column configuration
49+
- useTable: Support for dynamically changing parameters. You can pass in `Ref` type and `Computed` type for dynamic changes
50+
- useTable: Added return function `getForm`. Can be used to manipulate forms in the form Fix known issues in the table
51+
52+
### ✨ Features
53+
54+
- Added `v-ripple` water ripple command
55+
- Added the left menu mixed mode
56+
- Add an example of markdown embedded in the form
57+
- Add an example of a page outside the main frame
58+
- `route.meta` added `currentActiveMenu`, `hideTab`, and `hideMenu` parameters to control the display and hide of the crumb-level menu on the detail page.
59+
- Added breadcrumb navigation example
60+
- form: Added `suffix` attribute to configure suffix content
61+
- form: Added remote drop-down `ApiSelect` and examples
62+
- form: Add `autoFocusFirstItem` configuration. Used to configure whether to focus on the first input box of the form
63+
- useForm: Support for dynamically changing parameters. You can pass in `Ref` type and `Computed` type for dynamic changes
64+
65+
### ⚡ Performance Improvements
66+
67+
- Optimize the scroll bar components of `modal` and `drawer`
68+
- table: remove the `isTreeTable` attribute
69+
- Import `less` files globally. No need to manually re-introduce the component
70+
71+
### 🎫 Chores
72+
73+
- Upgrade `ant-design-vue` to `2.0.0-rc.7`
74+
- Upgrade `vue` to `3.0.5`
75+
76+
### 🐛 Bug Fixes
77+
78+
- Fixed the issue of missing scroll bars in mixed mode
79+
- Fix the invalid configuration of environment variables and the logo address problem in history mode
80+
- Fix the calculation error of width and height caused by switching page of chart library
81+
- Fixed the issue of multi-language configuration `Locale.show` causing the configuration not to take effect
82+
- Fix routing type error
83+
- Fix the problem of invalid permissions when the menu is split
84+
- Iframe loads early when closing multi-tab pages
85+
- Fix known issues with `modal` and `drawer`
86+
- Fix the problem of mixing mode adaptation in the left menu
87+
188
## 2.0.0-rc.14 (2020-12-15)
289
390
### ✨ Features

CHANGELOG.zh_CN.md

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,90 @@
1-
## Wip
1+
## 2.0.0-rc.15 (2020-12-31)
2+
3+
### ✨ 表格破坏性更新
4+
5+
- 重构了可编辑单元格及可编辑行。具体看示例。写法已改变。针对可编辑表格。
6+
7+
- 表格编辑支持表单校验
8+
9+
- 在表格列配置增加了以下配置
10+
11+
```bash
12+
{
13+
14+
# 默认是否显示列。不显示的可以在列配置打开
15+
defaultHidden?: boolean;
16+
# 列头右侧帮助文本
17+
helpMessage?: string | string[];
18+
# 自定义格式化 单元格内容。 支持时间/枚举自动转化
19+
format?: CellFormat;
20+
21+
# Editable
22+
# 是否是可编辑单元格
23+
edit?: boolean;
24+
# 是否是可编辑行
25+
editRow?: boolean;
26+
# 编辑状态。
27+
editable?: boolean;
28+
# 编辑组件
29+
editComponent?: ComponentType;
30+
# 所对应组件的参数
31+
editComponentProps?: Recordable;
32+
# 校验
33+
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
34+
# 值枚举转化
35+
editValueMap?: (value: any) => string;
36+
# 触发编辑正航
37+
record.onEditRow?: () => void;
38+
}
39+
40+
```
41+
42+
### ✨ 表格重构
43+
44+
- 新增`clickToRowSelect`属性。用于控制点击行是否选中勾选框
45+
- 监听行点击事件
46+
- 表格列配置按钮增加 列拖拽,列固定功能。
47+
- 表格列配置新增`defaultHidden` 属性。用于默认隐藏。可在表格列配置勾选显示
48+
- 更强大的列配置
49+
- useTable:支持动态改变参数。可以传入`Ref`类型与`Computed`类型进行动态更改
50+
- useTable:新增返回 `getForm`函数。可以用于操作表格内的表单
51+
- 修复表格已知的问题
52+
53+
### ✨ Features
54+
55+
- 新增 `v-ripple`水波纹指令
56+
- 新增左侧菜单混合模式
57+
- 新增 markdown 嵌入表单内示例
58+
- 新增主框架外页面示例
59+
- `route.meta` 新增`currentActiveMenu`,`hideTab`,`hideMenu`参数 用于控制详情页面包屑级菜单显示隐藏。
60+
- 新增面包屑导航示例
61+
- form: 新增`suffix`属性,用于配置后缀内容
62+
- form: 新增远程下拉`ApiSelect`及示例
63+
- form: 新增`autoFocusFirstItem`配置。用于配置是否聚焦表单第一个输入框
64+
- useForm: 支持动态改变参数。可以传入`Ref`类型与`Computed`类型进行动态更改
65+
66+
### ⚡ Performance Improvements
67+
68+
- 优化`modal`与`drawer`滚动条组件
69+
- table: 移除 `isTreeTable`属性
70+
- 全局引入`less`文件。无需手动在组件再次引入
71+
72+
### 🎫 Chores
73+
74+
- 升级`ant-design-vue`到`2.0.0-rc.7`
75+
- 升级`vue`到`3.0.5`
276
377
### 🐛 Bug Fixes
478
579
- 修复混合模式下滚动条丢失问题
80+
- 修复环境变量配置失效以及 history 模式下 logo 地址问题
81+
- 修复图表库切换页面导致宽高计算错误
82+
- 修复多语言配置 `Locale.show`导致配置不生效
83+
- 修复路由类型错误
84+
- 修复菜单分割时权限失效问题
85+
- 关闭多标签页时 iframe 提前加载
86+
- 修复`modal`与`drawer`已知问题
87+
- 修复左侧菜单混合模式适配问题
688
789
## 2.0.0-rc.14 (2020-12-15)
890

build/script/buildConf.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import { GLOB_CONFIG_FILE_NAME } from '../constant';
55
import fs, { writeFileSync } from 'fs-extra';
66

7-
import viteConfig from '../../vite.config';
87
import { errorConsole, successConsole, getCwdPath, getEnvConfig } from '../utils';
98
import { getShortName } from '../getShortName';
109

@@ -17,7 +16,7 @@ function createConfig(
1716
) {
1817
try {
1918
const windowConf = `window.${configName}`;
20-
const outDir = viteConfig.outDir || 'dist';
19+
const outDir = 'dist';
2120
// Ensure that the variable will not be modified
2221
const configStr = `${windowConf}=${JSON.stringify(config)};
2322

build/script/postBuild.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
11
// #!/usr/bin/env node
22

3-
import { sh } from 'tasksfile';
4-
53
import { argv } from 'yargs';
64
import { runBuildConfig } from './buildConf';
7-
// import { runUpdateHtml } from './updateHtml';
85
import { errorConsole, successConsole } from '../utils';
96
import { startGzipStyle } from '../vite/plugin/gzip/compress';
107

11-
export const runBuild = async (preview = false) => {
8+
export const runBuild = async () => {
129
try {
1310
const argvList = argv._;
14-
if (preview) {
15-
let cmd = `cross-env NODE_ENV=production vite build`;
16-
await sh(cmd, {
17-
async: true,
18-
nopipe: true,
19-
});
20-
}
2111

2212
// Generate configuration file
2313
if (!argvList.includes('no-conf')) {
2414
await runBuildConfig();
2515
}
2616
// await runUpdateHtml();
27-
if (!preview) {
28-
await startGzipStyle();
29-
}
17+
await startGzipStyle();
3018
successConsole('Vite Build successfully!');
3119
} catch (error) {
3220
errorConsole('Vite Build Error\n' + error);

build/script/preserve.ts

Lines changed: 0 additions & 74 deletions
This file was deleted.

build/script/preview.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@ import Koa from 'koa';
44
import staticServer from 'koa-static';
55
import portfinder from 'portfinder';
66
import { resolve } from 'path';
7-
import viteConfig from '../../vite.config';
87
import { getIPAddress } from '../utils';
9-
// import { runBuild } from './postBuild';
10-
11-
// const BUILD = 1;
12-
// const NO_BUILD = 2;
138

149
// start server
1510
const startApp = () => {
1611
const port = 9680;
1712
portfinder.basePort = port;
1813
const app = new Koa();
1914

20-
app.use(staticServer(resolve(process.cwd(), viteConfig.outDir || 'dist')));
15+
app.use(staticServer(resolve(process.cwd(), 'dist')));
2116

2217
portfinder.getPort(async (err, port) => {
2318
if (err) {
@@ -35,25 +30,4 @@ const startApp = () => {
3530
});
3631
};
3732

38-
// export const runPreview = async () => {
39-
// // const prompt = inquirer.prompt({
40-
// // type: 'list',
41-
// // message: 'Please select a preview method',
42-
// // name: 'type',
43-
// // choices: [
44-
// // {
45-
// // name: 'Preview after packaging',
46-
// // value: BUILD,
47-
// // },
48-
// // {
49-
// // name: `No packaging, preview directly (need to have dist file after packaging)`,
50-
// // value: NO_BUILD,
51-
// // },
52-
// // ],
53-
// // });
54-
// const { type } = await prompt;
55-
// if (type === BUILD) {
56-
// await runBuild(true);
57-
// }
58-
// };
5933
startApp();

0 commit comments

Comments
 (0)