fix(biz,meta): 修改大图组件,boxSelectTree组件

This commit is contained in:
NICE CODE BY DEV 2024-04-18 14:54:43 +08:00
parent baab5ce1a0
commit c1c90fc76f
24 changed files with 180 additions and 27 deletions

View File

@ -14,7 +14,6 @@
], ],
"scripts": { "scripts": {
"add": "pnpm changeset add", "add": "pnpm changeset add",
"build": "pnpm --filter=@zhst/* run build",
"build:master": "dumi build", "build:master": "dumi build",
"build:watch": "father dev", "build:watch": "father dev",
"dev": "dumi dev", "dev": "dumi dev",

View File

@ -1,5 +1,27 @@
# @zhst/biz # @zhst/biz
## 0.13.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/hooks@0.9.0
- @zhst/func@0.10.0
- @zhst/meta@0.12.0
## 0.12.2
### Patch Changes
- 修改盒子组件顺序
- @zhst/func@0.9.3
- @zhst/hooks@0.8.12
- @zhst/meta@0.11.1
## 0.12.1 ## 0.12.1
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/biz", "name": "@zhst/biz",
"version": "0.12.1", "version": "0.13.0",
"description": "业务库", "description": "业务库",
"keywords": [ "keywords": [
"business", "business",

View File

@ -33,7 +33,7 @@ const BoxSelectTree: FC<BoxSelectTreeProps> = (props) => {
const items: TabsProps['items'] = [ const items: TabsProps['items'] = [
{ {
key: '1', key: '1',
label: <div style={{ textAlign:'center', width: '160px' }} ></div>, label: <div style={{ textAlign:'center', width: '160px' }} ></div>,
children: ( children: (
<BoxPanel <BoxPanel
searchInputProps={searchInputProps} searchInputProps={searchInputProps}
@ -57,16 +57,16 @@ const BoxSelectTree: FC<BoxSelectTreeProps> = (props) => {
}, },
{ {
key: '2', key: '2',
label: <div style={{ textAlign:'center', width: '160px' }} ></div>, label: <div style={{ textAlign:'center', width: '160px' }} ></div>,
children: ( children: (
<BoxPanel <BoxPanel
boxDataSource={boxDataSource}
searchInputProps={searchInputProps} searchInputProps={searchInputProps}
boxDataSource={boxDataSource}
treeProps={treeProps} treeProps={treeProps}
data={data} data={data}
onCreate={onCreate} onCreate={onCreate}
onBoxBatchDelete={onBoxBatchDelete}
onCreateSubmit={onCreateSubmit} onCreateSubmit={onCreateSubmit}
onBoxBatchDelete={onBoxBatchDelete}
onBoxDelete={onBoxDelete} onBoxDelete={onBoxDelete}
onSearch={onSearch} onSearch={onSearch}
onItemCheck={onItemCheck} onItemCheck={onItemCheck}

View File

@ -1,5 +1,23 @@
# @zhst/utils # @zhst/utils
## 0.10.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/request@0.10.0
## 0.9.3
### Patch Changes
- Updated dependencies
- @zhst/request@0.9.2
## 0.9.2 ## 0.9.2
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/func", "name": "@zhst/func",
"version": "0.9.2", "version": "0.10.0",
"description": "函数合集", "description": "函数合集",
"keywords": [ "keywords": [
"hooks" "hooks"

View File

@ -1,5 +1,22 @@
# @zhst/hooks # @zhst/hooks
## 0.9.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/func@0.10.0
## 0.8.12
### Patch Changes
- @zhst/func@0.9.3
## 0.8.11 ## 0.8.11
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/hooks", "name": "@zhst/hooks",
"version": "0.8.11", "version": "0.9.0",
"description": "hooks合集", "description": "hooks合集",
"keywords": [ "keywords": [
"hooks" "hooks"

View File

@ -1,5 +1,29 @@
# @zhst/material # @zhst/material
## 0.9.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/hooks@0.9.0
- @zhst/func@0.10.0
- @zhst/meta@0.12.0
- @zhst/biz@0.13.0
## 0.8.1
### Patch Changes
- Updated dependencies
- @zhst/biz@0.12.2
- @zhst/func@0.9.3
- @zhst/hooks@0.8.12
- @zhst/meta@0.11.1
## 0.8.0 ## 0.8.0
### Minor Changes ### Minor Changes

View File

@ -25,7 +25,7 @@ var AlgorithmTable = function AlgorithmTable(props) {
var _useToken = useToken(), var _useToken = useToken(),
token = _useToken.token; token = _useToken.token;
var columns = [{ var columns = [{
title: '模板名称', title: '算法名称',
dataIndex: 'templateName' dataIndex: 'templateName'
}, { }, {
title: '运行周期', title: '运行周期',

View File

@ -54,7 +54,7 @@ var AlgorithmTable = (props) => {
const { token } = useToken(); const { token } = useToken();
const columns = [ const columns = [
{ {
title: "模板名称", title: "算法名称",
dataIndex: "templateName" dataIndex: "templateName"
}, },
{ {

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/material", "name": "@zhst/material",
"version": "0.8.0", "version": "0.9.0",
"description": "物料库", "description": "物料库",
"keywords": [ "keywords": [
"business", "business",

View File

@ -46,7 +46,7 @@ const AlgorithmTable= <DataSource extends AnyObject = AnyObject>(
const columns: ProColumns<DataSource>[] = [ const columns: ProColumns<DataSource>[] = [
{ {
title: '模板名称', title: '算法名称',
dataIndex: 'templateName', dataIndex: 'templateName',
}, },
{ {

View File

@ -1,5 +1,26 @@
# @zhst/utils # @zhst/utils
## 0.12.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/hooks@0.9.0
- @zhst/func@0.10.0
- @zhst/meta@0.12.0
## 0.11.1
### Patch Changes
- @zhst/func@0.9.3
- @zhst/hooks@0.8.12
- @zhst/meta@0.11.1
## 0.11.0 ## 0.11.0
### Minor Changes ### Minor Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/meta", "name": "@zhst/meta",
"version": "0.11.0", "version": "0.12.0",
"description": "原子组件", "description": "原子组件",
"keywords": [ "keywords": [
"meta", "meta",

View File

@ -1,5 +1,23 @@
# @zhst/request # @zhst/request
## 0.10.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/func@0.10.0
## 0.9.2
### Patch Changes
- 修改盒子组件顺序
- @zhst/func@0.9.3
## 0.9.1 ## 0.9.1
### Patch Changes ### Patch Changes

View File

@ -7,6 +7,7 @@ export interface ReqConfigProps {
}; };
authorization?: string; authorization?: string;
showMsg?: boolean; showMsg?: boolean;
onError: (error?: any) => void;
} }
export declare const reqConfig: (config: ReqConfigProps) => { export declare const reqConfig: (config: ReqConfigProps) => {
timeout: number; timeout: number;
@ -17,6 +18,7 @@ export declare const reqConfig: (config: ReqConfigProps) => {
}; };
authorization?: string | undefined; authorization?: string | undefined;
showMsg?: boolean | undefined; showMsg?: boolean | undefined;
onError: (error?: any) => void;
requestInterceptors: (((url: any, options: any) => { requestInterceptors: (((url: any, options: any) => {
url: any; url: any;
options: any; options: any;

View File

@ -8,15 +8,19 @@ import { message } from 'antd';
export var reqConfig = function reqConfig(config) { export var reqConfig = function reqConfig(config) {
var _ref = config || {}, var _ref = config || {},
authorization = _ref.authorization, authorization = _ref.authorization,
showMsg = _ref.showMsg; showMsg = _ref.showMsg,
onError = _ref.onError;
return _objectSpread({ return _objectSpread({
timeout: 1000, timeout: 1000,
baseURL: location.origin, baseURL: location.origin,
// other axios options you want
errorConfig: { errorConfig: {
// @ts-ignore // @ts-ignore
errorHandler: function errorHandler(error, opts) { errorHandler: function errorHandler(error, opts) {
console.log('first', error, opts); if ([403, 401].includes(error.request.status)) {
message.error('登录过期,请重新登录');
onError === null || onError === void 0 || onError(error);
return;
}
// if (opts?.skipErrorHandler) throw error // if (opts?.skipErrorHandler) throw error
// try { // try {
// const { res } = ctx; // const { res } = ctx;
@ -53,7 +57,7 @@ export var reqConfig = function reqConfig(config) {
}, },
// @ts-ignore // @ts-ignore
errorThrower: function errorThrower(res) { errorThrower: function errorThrower(res) {
console.log('res', res); console.log('报错啦:', res);
} }
}, },
// 请求 // 请求

View File

@ -7,6 +7,7 @@ export interface ReqConfigProps {
}; };
authorization?: string; authorization?: string;
showMsg?: boolean; showMsg?: boolean;
onError: (error?: any) => void;
} }
export declare const reqConfig: (config: ReqConfigProps) => { export declare const reqConfig: (config: ReqConfigProps) => {
timeout: number; timeout: number;
@ -17,6 +18,7 @@ export declare const reqConfig: (config: ReqConfigProps) => {
}; };
authorization?: string | undefined; authorization?: string | undefined;
showMsg?: boolean | undefined; showMsg?: boolean | undefined;
onError: (error?: any) => void;
requestInterceptors: (((url: any, options: any) => { requestInterceptors: (((url: any, options: any) => {
url: any; url: any;
options: any; options: any;

View File

@ -26,20 +26,24 @@ var import_antd = require("antd");
var reqConfig = (config) => { var reqConfig = (config) => {
const { const {
authorization, authorization,
showMsg showMsg,
onError
} = config || {}; } = config || {};
return { return {
timeout: 1e3, timeout: 1e3,
baseURL: location.origin, baseURL: location.origin,
// other axios options you want
errorConfig: { errorConfig: {
// @ts-ignore // @ts-ignore
errorHandler(error, opts) { errorHandler(error, opts) {
console.log("first", error, opts); if ([403, 401].includes(error.request.status)) {
import_antd.message.error("登录过期,请重新登录");
onError == null ? void 0 : onError(error);
return;
}
}, },
// @ts-ignore // @ts-ignore
errorThrower(res) { errorThrower(res) {
console.log("res", res); console.log("报错啦:", res);
} }
}, },
// 请求 // 请求

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/request", "name": "@zhst/request",
"version": "0.9.1", "version": "0.10.0",
"description": "请求库", "description": "请求库",
"keywords": [ "keywords": [
"request", "request",

View File

@ -9,22 +9,27 @@ export interface ReqConfigProps {
} }
authorization?: string authorization?: string
showMsg?: boolean showMsg?: boolean
onError: (error?: any) => void
} }
export const reqConfig = (config: ReqConfigProps) => { export const reqConfig = (config: ReqConfigProps) => {
const { const {
authorization, authorization,
showMsg showMsg,
onError,
} = config || {} } = config || {}
return { return {
timeout: 1000, timeout: 1000,
baseURL: location.origin, baseURL: location.origin,
// other axios options you want
errorConfig: { errorConfig: {
// @ts-ignore // @ts-ignore
errorHandler(error: any, opts: any) { errorHandler(error: any, opts: any) {
console.log('first', error, opts); if ([403,401].includes(error.request.status)) {
message.error('登录过期,请重新登录')
onError?.(error)
return
}
// if (opts?.skipErrorHandler) throw error // if (opts?.skipErrorHandler) throw error
// try { // try {
// const { res } = ctx; // const { res } = ctx;
@ -61,7 +66,7 @@ export const reqConfig = (config: ReqConfigProps) => {
}, },
// @ts-ignore // @ts-ignore
errorThrower(res) { errorThrower(res) {
console.log('res', res); console.log('报错啦:', res);
}, },
}, },
// 请求 // 请求

View File

@ -1,5 +1,22 @@
# @zhst/slave # @zhst/slave
## 0.6.0
### Minor Changes
- 修改业务组件的 boxSelectTree
### Patch Changes
- Updated dependencies
- @zhst/func@0.10.0
## 0.5.2
### Patch Changes
- @zhst/func@0.9.3
## 0.5.1 ## 0.5.1
### Patch Changes ### Patch Changes

View File

@ -1,6 +1,6 @@
{ {
"name": "@zhst/slave", "name": "@zhst/slave",
"version": "0.5.1", "version": "0.6.0",
"description": "微前端子应用方法库", "description": "微前端子应用方法库",
"keywords": [ "keywords": [
"slave", "slave",