@kengic/vue 0.27.1-beta.5 → 0.27.1-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +2296 -2286
- package/dist/src/component/KgTable/KgTable.hooks.d.ts +10 -9
- package/dist/src/component/KgTable/KgTable.store.d.ts +0 -11
- package/dist/src/component/KgVar/KgVar.d.ts +1 -1
- package/dist/src/component/KgVar/KgVar.hooks.d.ts +9 -1
- package/dist/src/component/KgVar/KgVar.store.d.ts +10 -0
- package/dist/src/util/kg.util.d.ts +1 -1
- package/package.json +1 -1
- package/script/bump-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts +0 -3
- package/script/bump-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts +0 -3
- package/script/bump-to.ts +0 -38
- package/script/bump.ts +0 -35
- package/script/copy-to.luotao.smartfactory.product.wms.wms--dev-3.2.ts +0 -3
- package/script/copy-to.luotao.smartfactory.product.wms.wms-vue3--focus.ts +0 -3
- package/script/copy-to.luotao.smartfactory.tyre.haohua.gantry.was-java--main.ts +0 -3
- package/script/copy-to.ts +0 -23
- package/script/publish.ts +0 -30
@@ -1,8 +1,8 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import { VarGridConfig } from '../../api/WMS/models';
|
4
3
|
import { IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
5
4
|
import { IKgTableStore } from './KgTable.store';
|
5
|
+
import { IKgTableRow } from './KgTable.vm';
|
6
6
|
export interface IUseKgTable {
|
7
7
|
/**
|
8
8
|
* 列表数据.
|
@@ -100,14 +100,6 @@ export interface IUseKgTable {
|
|
100
100
|
pageSizeOption: ComputedRef<number>;
|
101
101
|
/** 所有分页选项. */
|
102
102
|
pageSizeOptions: ComputedRef<number[]>;
|
103
|
-
/**
|
104
|
-
* 修改「表格配置」的部分属性.
|
105
|
-
*
|
106
|
-
* @param param.properties 要修改的部分属性.
|
107
|
-
*/
|
108
|
-
patchVarGridConfig(param: {
|
109
|
-
properties: VarGridConfig;
|
110
|
-
}): Promise<void>;
|
111
103
|
/**
|
112
104
|
* <p>查询参数.</p>
|
113
105
|
* <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
|
@@ -120,6 +112,15 @@ export interface IUseKgTable {
|
|
120
112
|
/** 当前勾选的所有行. */
|
121
113
|
selectedRows: ComputedRef<ReturnType<IKgTableStore['getSelectedRows']>>;
|
122
114
|
setIsShowDescription(value: boolean): void;
|
115
|
+
/**
|
116
|
+
* 设置勾选的行.
|
117
|
+
*
|
118
|
+
* @param param
|
119
|
+
* @param param.selectedRows 勾选的行.
|
120
|
+
*/
|
121
|
+
setSelectedRows<T extends IKgTableRow = any>(param: {
|
122
|
+
selectedRows: Array<T>;
|
123
|
+
}): void;
|
123
124
|
/** 状态数据. */
|
124
125
|
store: IKgTableStore;
|
125
126
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Key } from 'ant-design-vue/lib/_util/type';
|
2
2
|
import { StoreDefinition } from 'pinia';
|
3
3
|
import { Ref } from 'vue';
|
4
|
-
import { VarGridConfig } from '../../api/WMS/models';
|
5
4
|
import { IKgTableEvent, IKgTableEventListenerParameter, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
|
6
5
|
import { IKgTableRow, IKgTableRowHeight } from './KgTable.vm';
|
7
6
|
export interface IUseKgTableStoreState {
|
@@ -109,16 +108,6 @@ export interface IUseKgTableStoreActions {
|
|
109
108
|
* @param parameter 事件参数.
|
110
109
|
*/
|
111
110
|
emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, parameter: T): Promise<boolean>;
|
112
|
-
/**
|
113
|
-
* 修改「表格配置」的部分属性.
|
114
|
-
*
|
115
|
-
* @param formID 界面标识.
|
116
|
-
* @param param
|
117
|
-
* @param param.properties 要修改的部分属性.
|
118
|
-
*/
|
119
|
-
patchVarGridConfig(formID: string | null | undefined, param: {
|
120
|
-
properties: VarGridConfig;
|
121
|
-
}): Promise<void>;
|
122
111
|
/**
|
123
112
|
* 刷新勾选的行. 表格列表数据变更之后, 需要同步到勾选的行.
|
124
113
|
* @param formID 界面标识.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { IRemoveEventListener } from '@kengic/core.core';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
|
-
import { VarButton, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarGridDetail, VarGridMasterDTO } from '../../api/WMS/models';
|
3
|
+
import { VarButton, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarGridConfig, VarGridDetail, VarGridMasterDTO } from '../../api/WMS/models';
|
4
4
|
import { KG__VAR_BUTTON__TYPE } from '../../const';
|
5
5
|
import { IUseKgButton } from '../KgButton';
|
6
6
|
import { IUseKgForm } from '../KgForm';
|
@@ -172,6 +172,14 @@ export declare type IUseKgVar = {
|
|
172
172
|
properties: VarButton;
|
173
173
|
varName: string | null | undefined;
|
174
174
|
}): Promise<void>;
|
175
|
+
/**
|
176
|
+
* 修改「表格配置」的部分属性.
|
177
|
+
*
|
178
|
+
* @param param.properties 要修改的部分属性.
|
179
|
+
*/
|
180
|
+
patchVarGridConfig(param: {
|
181
|
+
properties: VarGridConfig;
|
182
|
+
}): Promise<void>;
|
175
183
|
/**
|
176
184
|
* 修改「表格视图明细」的部分属性.
|
177
185
|
*
|
@@ -184,6 +184,16 @@ export interface IUseKgVarStoreActions {
|
|
184
184
|
properties: VarButton;
|
185
185
|
varName: string | null | undefined;
|
186
186
|
}): Promise<void>;
|
187
|
+
/**
|
188
|
+
* 修改「表格配置」的部分属性.
|
189
|
+
*
|
190
|
+
* @param formID 界面标识.
|
191
|
+
* @param param
|
192
|
+
* @param param.properties 要修改的部分属性.
|
193
|
+
*/
|
194
|
+
patchVarGridConfig(formID: string | null | undefined, param: {
|
195
|
+
properties: VarGridConfig;
|
196
|
+
}): Promise<void>;
|
187
197
|
/**
|
188
198
|
* 修改「表格视图明细」的部分属性.
|
189
199
|
*
|
package/package.json
CHANGED
package/script/bump-to.ts
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import chalk from 'chalk';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* 更新前端项目中包的版本号.
|
6
|
-
* 当我们升级了这些包的版本后, 可以使用该方法快速将新的版本号同步到前端项目中去.
|
7
|
-
*
|
8
|
-
* @param projectPath 前端项目目录.
|
9
|
-
* @param excludes 要排除的包.
|
10
|
-
*/
|
11
|
-
function bumpVersionToProjects(projectPath: string, excludes: Array<string> = []) {
|
12
|
-
// file:///D:/foo/...
|
13
|
-
const pkgPath = `${projectPath}/package.json`;
|
14
|
-
// D:/foo/...
|
15
|
-
const absolutePkgPath = pkgPath.replace('file:///', '');
|
16
|
-
|
17
|
-
import(pkgPath)
|
18
|
-
.then(({ default: json }) => {
|
19
|
-
Promise.all([import('../package.json')])
|
20
|
-
.then(([{ version, name, dependencies, devDependencies }]) => {
|
21
|
-
if (json.dependencies[name]) {
|
22
|
-
json.dependencies[name] = version;
|
23
|
-
}
|
24
|
-
|
25
|
-
fs.writeFileSync(absolutePkgPath, `${JSON.stringify(json, null, 2)}\n`, {});
|
26
|
-
console.log();
|
27
|
-
console.log(chalk.green(`版本更新成功`) + ' | ' + chalk.blueBright(version) + ' | ' + absolutePkgPath);
|
28
|
-
})
|
29
|
-
.catch((e) => {
|
30
|
-
console.log(e);
|
31
|
-
});
|
32
|
-
})
|
33
|
-
.catch((e) => {
|
34
|
-
console.error(e);
|
35
|
-
});
|
36
|
-
}
|
37
|
-
|
38
|
-
export { bumpVersionToProjects };
|
package/script/bump.ts
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import semver from 'semver';
|
3
|
-
|
4
|
-
//____________________________________________________________________________________________________
|
5
|
-
// 自动更新所有包的版本号
|
6
|
-
//____________________________________________________________________________________________________
|
7
|
-
|
8
|
-
import('../package.json').then(({ default: json }) => {
|
9
|
-
const type = process.argv[2];
|
10
|
-
let version = json.version;
|
11
|
-
|
12
|
-
switch (type) {
|
13
|
-
case 'major':
|
14
|
-
version = semver.inc(version, 'major');
|
15
|
-
break;
|
16
|
-
case 'minor':
|
17
|
-
version = semver.inc(version, 'minor');
|
18
|
-
break;
|
19
|
-
case 'patch':
|
20
|
-
version = semver.inc(version, 'patch');
|
21
|
-
break;
|
22
|
-
case 'beta':
|
23
|
-
version = semver.inc(version, 'prerelease', 'beta');
|
24
|
-
break;
|
25
|
-
default:
|
26
|
-
throw new Error('INVALID SEMVER TYPE');
|
27
|
-
}
|
28
|
-
|
29
|
-
import('../package.json').then(({ default: json }) => {
|
30
|
-
json.version = version;
|
31
|
-
fs.writeFileSync('./package.json', `${JSON.stringify(json, null, 4)}\n`, {});
|
32
|
-
});
|
33
|
-
});
|
34
|
-
|
35
|
-
export {};
|
package/script/copy-to.ts
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
import fs from 'fs';
|
2
|
-
import path from 'path';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* 开发时, 需要将打包后的文件复制到项目的 node_modules 目录下进行测试.
|
6
|
-
*
|
7
|
-
* @param projectPath 前端项目目录.
|
8
|
-
*/
|
9
|
-
function copyToProject(projectPath: string) {
|
10
|
-
const cacheDir = path.join(projectPath, '/node_modules/.vite/');
|
11
|
-
if (fs.existsSync(cacheDir)) {
|
12
|
-
fs.rmSync(cacheDir, { recursive: true, force: true });
|
13
|
-
}
|
14
|
-
|
15
|
-
const dir = path.join(projectPath, '/node_modules/@kengic/vue/dist/');
|
16
|
-
if (fs.existsSync(dir)) {
|
17
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
18
|
-
}
|
19
|
-
|
20
|
-
fs.cpSync('./dist/', dir, { recursive: true });
|
21
|
-
}
|
22
|
-
|
23
|
-
export { copyToProject };
|
package/script/publish.ts
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
import chalk from 'chalk';
|
2
|
-
import { execSync } from 'node:child_process';
|
3
|
-
import { name, version } from '../package.json';
|
4
|
-
|
5
|
-
/*
|
6
|
-
* 使用下面的脚本来简化打包发布流程.
|
7
|
-
*/
|
8
|
-
|
9
|
-
const PKGNAME = `${name}@${version}`;
|
10
|
-
|
11
|
-
//region 安装依赖
|
12
|
-
//____________________________________________________________________________________________________
|
13
|
-
console.log('');
|
14
|
-
execSync('npm cache clean -f', { cwd: './', stdio: 'ignore' });
|
15
|
-
execSync('pnpm install', { cwd: './', stdio: 'ignore' });
|
16
|
-
console.log(`${chalk.blueBright('INSTALL ')}| ${PKGNAME}`);
|
17
|
-
//endregion
|
18
|
-
|
19
|
-
//region 打包
|
20
|
-
//____________________________________________________________________________________________________
|
21
|
-
execSync('npm run build', { cwd: './', stdio: 'ignore' });
|
22
|
-
console.log(`${chalk.blueBright(' BUILD ')}| ${PKGNAME}`);
|
23
|
-
//endregion
|
24
|
-
|
25
|
-
//region 发布
|
26
|
-
//____________________________________________________________________________________________________
|
27
|
-
execSync('npm run publish:npm', { cwd: './', stdio: 'ignore' });
|
28
|
-
console.log(`${chalk.blueBright('PUBLISH ')}| ${PKGNAME}`);
|
29
|
-
console.log('');
|
30
|
-
//endregion
|