@kmkf-fe-packages/basic-components 0.6.3-alpha.44 → 0.6.3-alpha.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apaas/ApaasAddress/index.d.ts +1 -2
- package/dist/apaas/ApaasCascader/index.d.ts +1 -2
- package/dist/apaas/ApaasCheckbox/index.d.ts +1 -2
- package/dist/apaas/ApaasDate/index.d.ts +1 -2
- package/dist/apaas/ApaasInput/index.d.ts +1 -2
- package/dist/apaas/ApaasInputNumber/index.d.ts +1 -2
- package/dist/apaas/ApaasMultipleSelect/index.d.ts +1 -2
- package/dist/apaas/ApaasSelect/index.d.ts +1 -2
- package/dist/apaas/ApaasTextArea/index.d.ts +1 -2
- package/dist/apaas/ApaasUpload/index.d.ts +1 -2
- package/dist/apaas/ApaasUploadAsync/index.d.ts +1 -2
- package/dist/apaas/hoc/withFormItem.d.ts +1 -1
- package/dist/basics/FormItem/index.d.ts +1 -2
- package/dist/business/AliPay/index.d.ts +1 -2
- package/dist/business/BuyerNick/index.d.ts +1 -2
- package/dist/business/ChooseBaby/index.d.ts +1 -2
- package/dist/business/ExpressLogistics/index.d.ts +1 -2
- package/dist/business/Invoice/index.d.ts +1 -2
- package/dist/business/LogisticsInterception/index.d.ts +1 -2
- package/dist/business/Payment/index.d.ts +1 -2
- package/dist/business/Remark/index.d.ts +1 -2
- package/dist/business/ShopName/index.d.ts +1 -2
- package/dist/business/Status/index.d.ts +1 -10
- package/dist/business/Supplier/index.d.ts +1 -2
- package/dist/business/TBGoodId/index.d.ts +1 -2
- package/dist/business/TBGoodSerial/index.d.ts +1 -2
- package/dist/business/TradeId/index.d.ts +1 -2
- package/dist/common/ExpressCompany/index.d.ts +1 -2
- package/dist/common/Goods/goodModel.d.ts +1 -2
- package/dist/common/Goods/index.d.ts +1 -2
- package/dist/common/GoodsTable/goodModel.d.ts +1 -2
- package/dist/common/Logistics/index.d.ts +1 -2
- package/dist/config/utils.d.ts +1 -0
- package/dist/index.esm.js +69 -16
- package/dist/index.js +69 -16
- package/dist/jst/Goods/index.d.ts +1 -2
- package/dist/jst/ItemList/index.d.ts +1 -2
- package/package.json +3 -3
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface Option {
|
|
3
2
|
value: string | number;
|
|
4
3
|
label: string;
|
|
@@ -10,5 +9,5 @@ interface ProvinceType {
|
|
|
10
9
|
disabled: boolean;
|
|
11
10
|
onChange: (value: any, selectedOptions: any) => void;
|
|
12
11
|
}
|
|
13
|
-
declare const Province: (props: Partial<ProvinceType>) =>
|
|
12
|
+
declare const Province: (props: Partial<ProvinceType>) => JSX.Element;
|
|
14
13
|
export default Province;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { CheckboxGroupProps, CheckboxValueType } from 'antd/es/checkbox/Group';
|
|
3
2
|
type OptionsType = {
|
|
4
3
|
label: string;
|
|
@@ -18,5 +17,5 @@ export interface ApaasCheckboxProps extends Omit<CheckboxGroupProps, 'onChange'
|
|
|
18
17
|
value?: CheckboxValue;
|
|
19
18
|
[key: string]: any;
|
|
20
19
|
}
|
|
21
|
-
declare function ApaasCheckbox(props: ApaasCheckboxProps):
|
|
20
|
+
declare function ApaasCheckbox(props: ApaasCheckboxProps): JSX.Element;
|
|
22
21
|
export default ApaasCheckbox;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare const DateType: ["DATE", "DATE_TIME", "DATE_RANGE", "DATE_TIME_RANGE"];
|
|
3
2
|
export declare type ButtonType = typeof DateType[number];
|
|
4
3
|
export interface ApaasDate {
|
|
5
4
|
dateType?: ButtonType;
|
|
6
5
|
[propName: string]: any;
|
|
7
6
|
}
|
|
8
|
-
declare const ApaasDate: (props: ApaasDate) =>
|
|
7
|
+
declare const ApaasDate: (props: ApaasDate) => JSX.Element;
|
|
9
8
|
export default ApaasDate;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { InputProps } from 'antd';
|
|
3
2
|
export interface ApaasInputProps extends InputProps {
|
|
4
3
|
isNumber?: boolean;
|
|
5
4
|
replaceWarn?: boolean;
|
|
6
5
|
}
|
|
7
|
-
declare function ApaasInput(props: ApaasInputProps):
|
|
6
|
+
declare function ApaasInput(props: ApaasInputProps): JSX.Element;
|
|
8
7
|
export default ApaasInput;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ApaasSelectProps } from '../ApaasSelect/index';
|
|
3
|
-
declare function ApaasMultipleSelect(props: ApaasSelectProps):
|
|
2
|
+
declare function ApaasMultipleSelect(props: ApaasSelectProps): JSX.Element;
|
|
4
3
|
export default ApaasMultipleSelect;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { SelectProps } from 'antd';
|
|
3
2
|
type OptionsType = {
|
|
4
3
|
label: string;
|
|
@@ -9,5 +8,5 @@ export interface ApaasSelectProps extends SelectProps<string[]> {
|
|
|
9
8
|
options?: OptionsType[];
|
|
10
9
|
[propName: string]: any;
|
|
11
10
|
}
|
|
12
|
-
declare function ApaasSelect(props: ApaasSelectProps):
|
|
11
|
+
declare function ApaasSelect(props: ApaasSelectProps): JSX.Element;
|
|
13
12
|
export default ApaasSelect;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { TextAreaProps } from 'antd/es/input';
|
|
3
2
|
export interface ITextAreaProps {
|
|
4
3
|
minRows?: number;
|
|
5
4
|
maxRows?: number;
|
|
6
5
|
}
|
|
7
|
-
declare function ApaasTextArea(props: TextAreaProps & ITextAreaProps):
|
|
6
|
+
declare function ApaasTextArea(props: TextAreaProps & ITextAreaProps): JSX.Element;
|
|
8
7
|
export default ApaasTextArea;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { UploadProps } from 'antd';
|
|
3
2
|
declare type UploadValue = string[];
|
|
4
3
|
export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'> {
|
|
@@ -10,5 +9,5 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
|
|
|
10
9
|
onChange?: (value: UploadValue) => void;
|
|
11
10
|
value?: UploadValue;
|
|
12
11
|
}
|
|
13
|
-
declare const ApaasUpload: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, ...resetProps }: ApaasUploadProps) =>
|
|
12
|
+
declare const ApaasUpload: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, ...resetProps }: ApaasUploadProps) => JSX.Element;
|
|
14
13
|
export default ApaasUpload;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { UploadProps } from 'antd';
|
|
3
2
|
declare type UploadValue = string[];
|
|
4
3
|
export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'> {
|
|
@@ -13,5 +12,5 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
|
|
|
13
12
|
hostUrl?: string;
|
|
14
13
|
actionUrl?: string;
|
|
15
14
|
}
|
|
16
|
-
declare const ApaasUploadAsync: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, uniqueKey, hostUrl, actionUrl, ...resetProps }: ApaasUploadProps) =>
|
|
15
|
+
declare const ApaasUploadAsync: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, uniqueKey, hostUrl, actionUrl, ...resetProps }: ApaasUploadProps) => JSX.Element;
|
|
17
16
|
export default ApaasUploadAsync;
|
|
@@ -9,4 +9,4 @@ export interface WithFormItemProps {
|
|
|
9
9
|
initialValue?: string;
|
|
10
10
|
[prop: string]: any;
|
|
11
11
|
}
|
|
12
|
-
export default function withFormItem(WrappedComponent: React.ComponentType<WithFormItemProps>): (props: WithFormItemProps) =>
|
|
12
|
+
export default function withFormItem(WrappedComponent: React.ComponentType<WithFormItemProps>): (props: WithFormItemProps) => JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface AliPayValueType {
|
|
3
2
|
name?: string;
|
|
4
3
|
user?: string;
|
|
@@ -10,5 +9,5 @@ interface AliPayProps {
|
|
|
10
9
|
onChange: (value: AliPayValueType) => void;
|
|
11
10
|
onBlur?: (value: string, type: string) => void;
|
|
12
11
|
}
|
|
13
|
-
declare const AliPay: (props: Partial<AliPayProps>) =>
|
|
12
|
+
declare const AliPay: (props: Partial<AliPayProps>) => JSX.Element;
|
|
14
13
|
export default AliPay;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface BuyerNickValueType {
|
|
3
2
|
buyerNick?: string;
|
|
4
3
|
buyerOpenUid?: string;
|
|
@@ -11,5 +10,5 @@ interface BuyerNickProps {
|
|
|
11
10
|
onChange: (value: BuyerNickValueType) => void;
|
|
12
11
|
onBlur: (value: string, type: string) => void;
|
|
13
12
|
}
|
|
14
|
-
declare const BuyerNick: (props: Partial<BuyerNickProps>) =>
|
|
13
|
+
declare const BuyerNick: (props: Partial<BuyerNickProps>) => JSX.Element;
|
|
15
14
|
export default BuyerNick;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { LogisticsType } from '../../common/Logistics/index.d';
|
|
3
|
-
declare const ExpressLogistics: (props: Partial<LogisticsType>) =>
|
|
2
|
+
declare const ExpressLogistics: (props: Partial<LogisticsType>) => JSX.Element;
|
|
4
3
|
export default ExpressLogistics;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './index.less';
|
|
3
2
|
export interface InvoiceValueType {
|
|
4
3
|
ordinaryTaitou: string;
|
|
@@ -11,5 +10,5 @@ export interface InvoiceProps {
|
|
|
11
10
|
disabled?: boolean;
|
|
12
11
|
onChange: (value: InvoiceValueType) => void;
|
|
13
12
|
}
|
|
14
|
-
declare const Invoice: (props: Partial<InvoiceProps>) =>
|
|
13
|
+
declare const Invoice: (props: Partial<InvoiceProps>) => JSX.Element;
|
|
15
14
|
export default Invoice;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface LogisticsInterceptionValueType {
|
|
3
2
|
interceptCompany: string;
|
|
4
3
|
interceptCode: string;
|
|
@@ -19,5 +18,5 @@ interface LogisticsInterceptionProps {
|
|
|
19
18
|
isEditing: boolean;
|
|
20
19
|
onChange: (value: Partial<LogisticsInterceptionValueType>) => void;
|
|
21
20
|
}
|
|
22
|
-
declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) =>
|
|
21
|
+
declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => JSX.Element;
|
|
23
22
|
export default LogisticsInterception;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export interface PaymentProps {
|
|
3
2
|
value: any;
|
|
4
3
|
zhiFubaoRequired: boolean;
|
|
@@ -11,5 +10,5 @@ export interface PaymentProps {
|
|
|
11
10
|
onSearch: (value: any) => void;
|
|
12
11
|
onBlur: (value: any, type: string) => void;
|
|
13
12
|
}
|
|
14
|
-
declare const Payment: (props: Partial<PaymentProps>) =>
|
|
13
|
+
declare const Payment: (props: Partial<PaymentProps>) => JSX.Element;
|
|
15
14
|
export default Payment;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface ValueType {
|
|
3
2
|
remark?: string;
|
|
4
3
|
flag?: number;
|
|
@@ -9,5 +8,5 @@ interface RemarkType {
|
|
|
9
8
|
value: ValueType;
|
|
10
9
|
onChange: (value: ValueType) => void;
|
|
11
10
|
}
|
|
12
|
-
declare const RemarkInput: (props: Partial<RemarkType>) =>
|
|
11
|
+
declare const RemarkInput: (props: Partial<RemarkType>) => JSX.Element;
|
|
13
12
|
export default RemarkInput;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface ShopNameType {
|
|
3
2
|
value: number;
|
|
4
3
|
onChange: (value: number) => void;
|
|
5
4
|
disabled: boolean;
|
|
6
5
|
style: any;
|
|
7
6
|
}
|
|
8
|
-
declare const ShopNameSelect: (props: Partial<ShopNameType>) =>
|
|
7
|
+
declare const ShopNameSelect: (props: Partial<ShopNameType>) => JSX.Element;
|
|
9
8
|
export default ShopNameSelect;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* props
|
|
3
|
-
* isUseCustomStatus true/false 是否自定义文案
|
|
4
|
-
* customStatusText 自定义文案内容
|
|
5
|
-
* isSelectStyle true/false 是否为下拉框
|
|
6
|
-
* require true/false 是否必填
|
|
7
|
-
* originCustomer和isEditing 当状态组件处于编辑状态下,工单状态从未处理切换到已处理时候,我们需要将客服重置为初始值
|
|
8
|
-
*/
|
|
9
|
-
import React from 'react';
|
|
10
1
|
export interface StatusProps {
|
|
11
2
|
shopId: string;
|
|
12
3
|
customStatusText: string;
|
|
@@ -21,5 +12,5 @@ export interface StatusProps {
|
|
|
21
12
|
required: boolean;
|
|
22
13
|
onChange: (value: any) => void;
|
|
23
14
|
}
|
|
24
|
-
declare const Status: (props: StatusProps) =>
|
|
15
|
+
declare const Status: (props: StatusProps) => JSX.Element;
|
|
25
16
|
export default Status;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { InputProps } from 'antd';
|
|
3
2
|
interface TradeIdProps extends InputProps {
|
|
4
3
|
value: string;
|
|
@@ -7,5 +6,5 @@ interface TradeIdProps extends InputProps {
|
|
|
7
6
|
disabled?: boolean;
|
|
8
7
|
onSearch: (value: any) => void;
|
|
9
8
|
}
|
|
10
|
-
declare function TradeId(props: Partial<TradeIdProps>):
|
|
9
|
+
declare function TradeId(props: Partial<TradeIdProps>): JSX.Element;
|
|
11
10
|
export default TradeId;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
type ExpressCompanyProps = {
|
|
3
2
|
options: any[];
|
|
4
3
|
value: string;
|
|
5
4
|
onChange: (v: string) => void;
|
|
6
5
|
};
|
|
7
|
-
declare const ExpressCompany: (props: ExpressCompanyProps) =>
|
|
6
|
+
declare const ExpressCompany: (props: ExpressCompanyProps) => JSX.Element;
|
|
8
7
|
export default ExpressCompany;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './index.less';
|
|
3
2
|
interface GoodModelProps {
|
|
4
3
|
visible: boolean;
|
|
@@ -12,5 +11,5 @@ interface GoodModelProps {
|
|
|
12
11
|
onSubmit: (...args: any[]) => any;
|
|
13
12
|
onCancel: (...args: any[]) => any;
|
|
14
13
|
}
|
|
15
|
-
declare const GoodsModal: (props: GoodModelProps) =>
|
|
14
|
+
declare const GoodsModal: (props: GoodModelProps) => JSX.Element;
|
|
16
15
|
export default GoodsModal;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './index.less';
|
|
3
2
|
export interface GoodsProps {
|
|
4
3
|
value?: GoodsValues;
|
|
@@ -34,5 +33,5 @@ export interface IEditState {
|
|
|
34
33
|
itemId?: string | null;
|
|
35
34
|
supplierName: string | null;
|
|
36
35
|
}
|
|
37
|
-
declare const Goods: (props: Partial<GoodsProps>) =>
|
|
36
|
+
declare const Goods: (props: Partial<GoodsProps>) => JSX.Element;
|
|
38
37
|
export default Goods;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './index.less';
|
|
3
2
|
interface GoodModelProps {
|
|
4
3
|
visible: boolean;
|
|
@@ -10,5 +9,5 @@ interface GoodModelProps {
|
|
|
10
9
|
onSubmit: (...args: any[]) => any;
|
|
11
10
|
onCancel: (...args: any[]) => any;
|
|
12
11
|
}
|
|
13
|
-
declare const GoodsModal: (props: GoodModelProps) =>
|
|
12
|
+
declare const GoodsModal: (props: GoodModelProps) => JSX.Element;
|
|
14
13
|
export default GoodsModal;
|
package/dist/config/utils.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -2,7 +2,6 @@ import React, { useRef, useState, useEffect, useMemo, forwardRef, useImperativeH
|
|
|
2
2
|
import { Cascader, DatePicker, Input, InputNumber, Select, Upload, Image, message, Radio, Space, Spin, Checkbox, Row, Col, Slider, Rate, Form, Tabs, Modal, Button, ConfigProvider, Pagination, Popover } from 'antd';
|
|
3
3
|
import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
|
|
4
4
|
import request, { extend } from 'umi-request';
|
|
5
|
-
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
6
5
|
import zhCN from 'antd/lib/locale/zh_CN';
|
|
7
6
|
|
|
8
7
|
function _iterableToArrayLimit(arr, i) {
|
|
@@ -855,6 +854,37 @@ function ApaasRadio(props) {
|
|
|
855
854
|
}))));
|
|
856
855
|
}
|
|
857
856
|
|
|
857
|
+
/*
|
|
858
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
859
|
+
* @Date: 2022-09-20 14:29:14
|
|
860
|
+
* @LastEditors: litian
|
|
861
|
+
* @LastEditTime: 2022-09-27 13:49:32
|
|
862
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/config/utils.ts
|
|
863
|
+
* @Description:
|
|
864
|
+
*
|
|
865
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
866
|
+
*/
|
|
867
|
+
//组装地址
|
|
868
|
+
var toTree = function toTree() {
|
|
869
|
+
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
870
|
+
var parId = arguments.length > 1 ? arguments[1] : undefined;
|
|
871
|
+
var len = list === null || list === void 0 ? void 0 : list.length;
|
|
872
|
+
function loop(parId) {
|
|
873
|
+
var res = [];
|
|
874
|
+
for (var i = 0; i < len; i++) {
|
|
875
|
+
var item = list[i];
|
|
876
|
+
if (item.parentId === Number(parId)) {
|
|
877
|
+
item.children = loop(item.id);
|
|
878
|
+
res.push(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
879
|
+
label: item.name,
|
|
880
|
+
value: item.id
|
|
881
|
+
}));
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
return res;
|
|
885
|
+
}
|
|
886
|
+
return loop(parId);
|
|
887
|
+
};
|
|
858
888
|
var keepDecimals = function keepDecimals(value) {
|
|
859
889
|
value = value.replace(/[^\d.]/g, ''); //清除"数字"和"."以外的字符
|
|
860
890
|
value = value.replace(/^\./g, ''); //验证第一个字符是数字
|
|
@@ -1332,7 +1362,18 @@ function ApaasRate(props) {
|
|
|
1332
1362
|
}));
|
|
1333
1363
|
}
|
|
1334
1364
|
|
|
1335
|
-
|
|
1365
|
+
/*
|
|
1366
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
1367
|
+
* @Date: 2022-09-13 11:06:09
|
|
1368
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
1369
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
1370
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
1371
|
+
* @Description:
|
|
1372
|
+
*
|
|
1373
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
1374
|
+
*/
|
|
1375
|
+
var extendRequest = extend({});
|
|
1376
|
+
|
|
1336
1377
|
var Province = function Province(props) {
|
|
1337
1378
|
var _useState = useState([]),
|
|
1338
1379
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1341,11 +1382,35 @@ var Province = function Province(props) {
|
|
|
1341
1382
|
var isFirst = useRef(false);
|
|
1342
1383
|
var initPageSource = /*#__PURE__*/function () {
|
|
1343
1384
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
1385
|
+
var apaasAddress, apaasSaveTime, isExpire, _yield$request, list, arr;
|
|
1344
1386
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1345
1387
|
while (1) switch (_context.prev = _context.next) {
|
|
1346
1388
|
case 0:
|
|
1347
|
-
|
|
1348
|
-
|
|
1389
|
+
apaasAddress = window.localStorage.getItem('apaasAddress');
|
|
1390
|
+
apaasSaveTime = window.localStorage.getItem('apaasSaveTime'); //判断是否过期 缓存7天
|
|
1391
|
+
isExpire = apaasSaveTime ? Number(apaasSaveTime) + 7 * 3600 * 24 * 1000 < new Date().getTime() : true;
|
|
1392
|
+
if (!(apaasAddress && !isExpire)) {
|
|
1393
|
+
_context.next = 6;
|
|
1394
|
+
break;
|
|
1395
|
+
}
|
|
1396
|
+
setOptions(JSON.parse(apaasAddress));
|
|
1397
|
+
return _context.abrupt("return");
|
|
1398
|
+
case 6:
|
|
1399
|
+
_context.next = 8;
|
|
1400
|
+
return extendRequest('/qy/gdfw/template/queryAreas', {
|
|
1401
|
+
method: 'get',
|
|
1402
|
+
params: {
|
|
1403
|
+
apiName: 'queryAreas'
|
|
1404
|
+
}
|
|
1405
|
+
});
|
|
1406
|
+
case 8:
|
|
1407
|
+
_yield$request = _context.sent;
|
|
1408
|
+
list = _yield$request.data;
|
|
1409
|
+
arr = toTree(list, 0);
|
|
1410
|
+
setOptions(arr[0].children);
|
|
1411
|
+
window.localStorage.setItem('apaasAddress', JSON.stringify(arr[0].children));
|
|
1412
|
+
window.localStorage.setItem('apaasSaveTime', new Date().getTime().toString());
|
|
1413
|
+
case 14:
|
|
1349
1414
|
case "end":
|
|
1350
1415
|
return _context.stop();
|
|
1351
1416
|
}
|
|
@@ -1648,18 +1713,6 @@ var AliPay = function AliPay(props) {
|
|
|
1648
1713
|
})));
|
|
1649
1714
|
};
|
|
1650
1715
|
|
|
1651
|
-
/*
|
|
1652
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
1653
|
-
* @Date: 2022-09-13 11:06:09
|
|
1654
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
1655
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
1656
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
1657
|
-
* @Description:
|
|
1658
|
-
*
|
|
1659
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
1660
|
-
*/
|
|
1661
|
-
var extendRequest = extend({});
|
|
1662
|
-
|
|
1663
1716
|
var css_248z$4 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
1664
1717
|
styleInject(css_248z$4);
|
|
1665
1718
|
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,6 @@ var React = require('react');
|
|
|
6
6
|
var antd = require('antd');
|
|
7
7
|
var icons = require('@ant-design/icons');
|
|
8
8
|
var request = require('umi-request');
|
|
9
|
-
var kmkfUtils = require('@kmkf-fe-packages/kmkf-utils');
|
|
10
9
|
var zhCN = require('antd/lib/locale/zh_CN');
|
|
11
10
|
|
|
12
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -865,6 +864,37 @@ function ApaasRadio(props) {
|
|
|
865
864
|
}))));
|
|
866
865
|
}
|
|
867
866
|
|
|
867
|
+
/*
|
|
868
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
869
|
+
* @Date: 2022-09-20 14:29:14
|
|
870
|
+
* @LastEditors: litian
|
|
871
|
+
* @LastEditTime: 2022-09-27 13:49:32
|
|
872
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/config/utils.ts
|
|
873
|
+
* @Description:
|
|
874
|
+
*
|
|
875
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
876
|
+
*/
|
|
877
|
+
//组装地址
|
|
878
|
+
var toTree = function toTree() {
|
|
879
|
+
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
880
|
+
var parId = arguments.length > 1 ? arguments[1] : undefined;
|
|
881
|
+
var len = list === null || list === void 0 ? void 0 : list.length;
|
|
882
|
+
function loop(parId) {
|
|
883
|
+
var res = [];
|
|
884
|
+
for (var i = 0; i < len; i++) {
|
|
885
|
+
var item = list[i];
|
|
886
|
+
if (item.parentId === Number(parId)) {
|
|
887
|
+
item.children = loop(item.id);
|
|
888
|
+
res.push(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
889
|
+
label: item.name,
|
|
890
|
+
value: item.id
|
|
891
|
+
}));
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
return res;
|
|
895
|
+
}
|
|
896
|
+
return loop(parId);
|
|
897
|
+
};
|
|
868
898
|
var keepDecimals = function keepDecimals(value) {
|
|
869
899
|
value = value.replace(/[^\d.]/g, ''); //清除"数字"和"."以外的字符
|
|
870
900
|
value = value.replace(/^\./g, ''); //验证第一个字符是数字
|
|
@@ -1342,7 +1372,18 @@ function ApaasRate(props) {
|
|
|
1342
1372
|
}));
|
|
1343
1373
|
}
|
|
1344
1374
|
|
|
1345
|
-
|
|
1375
|
+
/*
|
|
1376
|
+
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
1377
|
+
* @Date: 2022-09-13 11:06:09
|
|
1378
|
+
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
1379
|
+
* @LastEditTime: 2022-11-04 15:55:10
|
|
1380
|
+
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
1381
|
+
* @Description:
|
|
1382
|
+
*
|
|
1383
|
+
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
1384
|
+
*/
|
|
1385
|
+
var extendRequest = request.extend({});
|
|
1386
|
+
|
|
1346
1387
|
var Province = function Province(props) {
|
|
1347
1388
|
var _useState = React.useState([]),
|
|
1348
1389
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1351,11 +1392,35 @@ var Province = function Province(props) {
|
|
|
1351
1392
|
var isFirst = React.useRef(false);
|
|
1352
1393
|
var initPageSource = /*#__PURE__*/function () {
|
|
1353
1394
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
1395
|
+
var apaasAddress, apaasSaveTime, isExpire, _yield$request, list, arr;
|
|
1354
1396
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
1355
1397
|
while (1) switch (_context.prev = _context.next) {
|
|
1356
1398
|
case 0:
|
|
1357
|
-
|
|
1358
|
-
|
|
1399
|
+
apaasAddress = window.localStorage.getItem('apaasAddress');
|
|
1400
|
+
apaasSaveTime = window.localStorage.getItem('apaasSaveTime'); //判断是否过期 缓存7天
|
|
1401
|
+
isExpire = apaasSaveTime ? Number(apaasSaveTime) + 7 * 3600 * 24 * 1000 < new Date().getTime() : true;
|
|
1402
|
+
if (!(apaasAddress && !isExpire)) {
|
|
1403
|
+
_context.next = 6;
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
setOptions(JSON.parse(apaasAddress));
|
|
1407
|
+
return _context.abrupt("return");
|
|
1408
|
+
case 6:
|
|
1409
|
+
_context.next = 8;
|
|
1410
|
+
return extendRequest('/qy/gdfw/template/queryAreas', {
|
|
1411
|
+
method: 'get',
|
|
1412
|
+
params: {
|
|
1413
|
+
apiName: 'queryAreas'
|
|
1414
|
+
}
|
|
1415
|
+
});
|
|
1416
|
+
case 8:
|
|
1417
|
+
_yield$request = _context.sent;
|
|
1418
|
+
list = _yield$request.data;
|
|
1419
|
+
arr = toTree(list, 0);
|
|
1420
|
+
setOptions(arr[0].children);
|
|
1421
|
+
window.localStorage.setItem('apaasAddress', JSON.stringify(arr[0].children));
|
|
1422
|
+
window.localStorage.setItem('apaasSaveTime', new Date().getTime().toString());
|
|
1423
|
+
case 14:
|
|
1359
1424
|
case "end":
|
|
1360
1425
|
return _context.stop();
|
|
1361
1426
|
}
|
|
@@ -1658,18 +1723,6 @@ var AliPay = function AliPay(props) {
|
|
|
1658
1723
|
})));
|
|
1659
1724
|
};
|
|
1660
1725
|
|
|
1661
|
-
/*
|
|
1662
|
-
* @Author: wangzhenggui jianjia.wzg@raycloud.com
|
|
1663
|
-
* @Date: 2022-09-13 11:06:09
|
|
1664
|
-
* @LastEditors: wangzhenggui jianjia.wzg@raycloud.com
|
|
1665
|
-
* @LastEditTime: 2022-11-04 15:55:10
|
|
1666
|
-
* @FilePath: /raycloud-apaas-fe-setup/packages/apaas-react-basics-widgets/src/common/request.ts
|
|
1667
|
-
* @Description:
|
|
1668
|
-
*
|
|
1669
|
-
* Copyright (c) 2022 by wangzhenggui jianjia.wzg@raycloud.com, All Rights Reserved.
|
|
1670
|
-
*/
|
|
1671
|
-
var extendRequest = request.extend({});
|
|
1672
|
-
|
|
1673
1726
|
var css_248z$4 = ".goodsBox {\n display: flex;\n flex-wrap: wrap;\n}\n.goodsBox .goodBox-Img {\n width: 80px;\n margin: 0 10px 10px 0;\n}\n.goodsBox .right-context {\n font-size: 12px;\n}\n.goodsBox .right-context .ant-input {\n font-size: 12px;\n width: 80px;\n height: 20px;\n padding-left: 5px;\n padding-right: 5px;\n}\n.goodsBox .right-context .ant-input.id-textarea {\n width: 80px;\n resize: none;\n height: 45px;\n}\n.goodsBox.goodsBox-item-horizontal--box {\n flex-direction: row;\n width: auto;\n}\n.goods-imgBox {\n position: relative;\n width: 80px;\n height: 80px;\n border-radius: 4px;\n border: 1px solid #f2f3f5;\n margin: 0 10px 10px 0;\n text-align: center;\n background-color: #f2f3f5;\n}\n.goods-imgBox .add-btn {\n color: #86909c;\n}\n.goods-imgBox .text {\n color: #86909c;\n}\n.icon-close {\n position: absolute;\n top: -5px;\n right: -5px;\n width: 13px;\n height: 13px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n z-index: 3;\n background-color: #fff;\n cursor: pointer;\n}\n.img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goods-title {\n margin: 0 0 10px 5px;\n color: #4e5969;\n}\n.searchBox {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n margin-bottom: 10px;\n}\n.searchBox .search {\n width: 150px;\n margin-left: 6px;\n}\n.deg90 {\n transform: rotate(90deg);\n}\n.goodsMain {\n display: flex;\n flex-wrap: wrap;\n height: 400px;\n overflow-y: auto;\n margin-bottom: 10px;\n}\n.goodsMain .goodItem {\n width: 142px;\n height: 184px;\n padding: 7px;\n margin: 0 16px 16px 0;\n border-radius: 4px;\n background: #ffffff;\n box-sizing: border-box;\n /* 主题色/常规 */\n border: 1px solid #c9cdd4;\n}\n.goodsMain .goodItem .goodImg {\n width: 128px;\n height: 128px;\n border-radius: 4px;\n overflow: hidden;\n}\n.goodsMain .goodItem .goodImg img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.goodsMain .goodItem .goodText {\n text-align: center;\n font-size: 12px;\n color: #4e5969;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.goodsMain .goodItem .goodPrice {\n text-align: center;\n font-size: 14px;\n color: #1d2129;\n}\n.goodsMain .goodItem.active {\n border: 1px solid #1b5bf3;\n}\n@media screen and (max-width: 500px) {\n .goodsMain {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 8px;\n height: 300px;\n }\n .goodsMain .goodItem {\n height: 126px;\n width: 83px;\n padding: 4px;\n margin: 0;\n border-radius: 4px;\n background: #FFFFFF;\n box-sizing: border-box;\n border: 1px solid rgba(0, 0, 0, 0.15);\n }\n .goodsMain .goodItem .goodImg {\n width: 98%;\n height: 77px;\n }\n .goodsMain .goodItem .goodText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .goodsMain .goodItem.active {\n border: 1px solid #3089dc;\n }\n .searchBox {\n display: flex;\n flex-wrap: wrap;\n justify-content: initial;\n }\n .searchBox .classify {\n width: 120px;\n }\n .goodModal .ant-modal-body {\n padding: 8px;\n }\n}\n.goods-uploaded-count {\n color: #ff3638;\n}\n.footer {\n display: flex;\n justify-content: flex-end;\n}\n.right-context {\n display: flex;\n flex-direction: column;\n}\n.right-context .info-row {\n width: 80px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 2px;\n cursor: pointer;\n background: #f2f3f5;\n margin-bottom: 4px;\n}\n.right-context .info-row > div {\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n overflow: hidden;\n word-break: break-all;\n}\n.sphPagination {\n display: flex;\n align-items: center;\n}\n.sphPagination .shpBtn {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 0 8px;\n height: 32px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n cursor: pointer;\n margin: 0 8px;\n}\n.sphPagination .shpBtn.unCursor {\n color: #eee;\n cursor: not-allowed;\n}\n";
|
|
1674
1727
|
styleInject(css_248z$4);
|
|
1675
1728
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface JstGoodsProps {
|
|
3
2
|
value: any[];
|
|
4
3
|
type: number;
|
|
@@ -7,5 +6,5 @@ interface JstGoodsProps {
|
|
|
7
6
|
onChange: (val: any[]) => void;
|
|
8
7
|
showField: string;
|
|
9
8
|
}
|
|
10
|
-
declare const jstGoods: (props: Partial<JstGoodsProps>) =>
|
|
9
|
+
declare const jstGoods: (props: Partial<JstGoodsProps>) => JSX.Element;
|
|
11
10
|
export default jstGoods;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import './index.less';
|
|
3
2
|
export interface GoodsProps {
|
|
4
3
|
value: any[];
|
|
@@ -16,5 +15,5 @@ export interface GoodsItem {
|
|
|
16
15
|
price: string;
|
|
17
16
|
[key: string]: any;
|
|
18
17
|
}
|
|
19
|
-
declare const ItemList: (props: Partial<GoodsProps>) =>
|
|
18
|
+
declare const ItemList: (props: Partial<GoodsProps>) => JSX.Element;
|
|
20
19
|
export default ItemList;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/basic-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.47",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.
|
|
22
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.47",
|
|
23
23
|
"umi-request": "^1.4.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "de3581c3b39bce27541b2e0ee33e376be31aea90"
|
|
46
46
|
}
|