@nutui/nutui-react-taro 4.0.0-beta.3 → 4.0.0-beta.4
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/CHANGELOG.md +13 -6
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/empty/empty.d.ts +4 -11
- package/dist/cjs/packages/empty/empty.js +21 -18
- package/dist/cjs/packages/empty/index.d.ts +1 -1
- package/dist/cjs/packages/empty/style/empty.scss +97 -31
- package/dist/cjs/packages/empty/style/style.css +77 -32
- package/dist/cjs/packages/empty/style/style.harmony.css +77 -32
- package/dist/cjs/packages/empty/style-jmapp/empty.scss +97 -31
- package/dist/cjs/packages/empty/style-jmapp/style.css +77 -32
- package/dist/cjs/packages/empty/style-jrkf/empty.scss +97 -31
- package/dist/cjs/packages/empty/style-jrkf/style.css +77 -32
- package/dist/cjs/packages/rate/index.d.ts +1 -1
- package/dist/cjs/packages/rate/rate.js +54 -8
- package/dist/cjs/packages/rate/style/rate.scss +244 -76
- package/dist/cjs/packages/rate/style/style.css +198 -68
- package/dist/cjs/packages/rate/style/style.harmony.css +198 -68
- package/dist/cjs/packages/rate/style-jmapp/rate.scss +244 -76
- package/dist/cjs/packages/rate/style-jmapp/style.css +198 -68
- package/dist/cjs/packages/rate/style-jrkf/rate.scss +244 -76
- package/dist/cjs/packages/rate/style-jrkf/style.css +198 -68
- package/dist/cjs/packages/steps/style/style.css +1 -1
- package/dist/cjs/packages/steps/style/style.harmony.css +1 -1
- package/dist/cjs/types/spec/empty/base.d.ts +12 -8
- package/dist/cjs/types/spec/empty/base.js +28 -1
- package/dist/cjs/types/spec/rate/base.d.ts +3 -0
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/empty/empty.d.ts +4 -11
- package/dist/es/packages/empty/empty.js +21 -18
- package/dist/es/packages/empty/index.d.ts +1 -1
- package/dist/es/packages/empty/style/empty.scss +97 -31
- package/dist/es/packages/empty/style/style.css +77 -32
- package/dist/es/packages/empty/style/style.harmony.css +77 -32
- package/dist/es/packages/empty/style-jmapp/empty.scss +97 -31
- package/dist/es/packages/empty/style-jmapp/style.css +77 -32
- package/dist/es/packages/empty/style-jrkf/empty.scss +97 -31
- package/dist/es/packages/empty/style-jrkf/style.css +77 -32
- package/dist/es/packages/rate/index.d.ts +1 -1
- package/dist/es/packages/rate/rate.js +54 -8
- package/dist/es/packages/rate/style/rate.scss +244 -76
- package/dist/es/packages/rate/style/style.css +198 -68
- package/dist/es/packages/rate/style/style.harmony.css +198 -68
- package/dist/es/packages/rate/style-jmapp/rate.scss +244 -76
- package/dist/es/packages/rate/style-jmapp/style.css +198 -68
- package/dist/es/packages/rate/style-jrkf/rate.scss +244 -76
- package/dist/es/packages/rate/style-jrkf/style.css +198 -68
- package/dist/es/packages/steps/style/style.css +1 -1
- package/dist/es/packages/steps/style/style.harmony.css +1 -1
- package/dist/es/types/spec/empty/base.d.ts +15 -11
- package/dist/es/types/spec/empty/base.js +13 -1
- package/dist/es/types/spec/rate/base.d.ts +10 -1
- package/dist/nutui.react.umd.js +97 -34
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +32 -32
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +31 -31
- package/dist/style.css +1 -1
- package/dist/style.scss +49 -49
- package/dist/styles/variables-daojia.scss +25 -12
- package/dist/styles/variables-jmapp.scss +42 -17
- package/dist/styles/variables-jrkf.scss +24 -20
- package/dist/styles/variables.scss +32 -24
- package/package.json +1 -1
|
@@ -3,13 +3,17 @@ import { BaseProps } from '../../base/props';
|
|
|
3
3
|
import { SimpleValue, UIFill, UISize, UIType } from '../../base/atoms';
|
|
4
4
|
export interface EmptyAction {
|
|
5
5
|
text: ReactNode;
|
|
6
|
-
type
|
|
7
|
-
size
|
|
8
|
-
fill
|
|
9
|
-
disabled
|
|
10
|
-
onClick
|
|
6
|
+
type?: UIType;
|
|
7
|
+
size?: UISize;
|
|
8
|
+
fill?: UIFill;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
12
|
+
export type EmptyStatus = 'network' | 'comment' | 'search' | 'shop' | 'address' | 'order' | 'favor' | 'cart';
|
|
13
|
+
export type EmptySize = 'full' | 'half' | 'partial';
|
|
14
|
+
/** 内置缺省插图 URL;图片本体走 CDN 运行时加载,打进包内的仅为 URL 字符串 */
|
|
15
|
+
export declare const EMPTY_STATUS_IMAGES: Record<EmptyStatus, string>;
|
|
16
|
+
export declare const getEmptyStatusImage: (status: EmptyStatus) => string;
|
|
13
17
|
export interface BaseEmpty extends BaseProps {
|
|
14
18
|
/**
|
|
15
19
|
* 图片,支持传入图片 URL
|
|
@@ -28,15 +32,15 @@ export interface BaseEmpty extends BaseProps {
|
|
|
28
32
|
*/
|
|
29
33
|
description: ReactNode
|
|
30
34
|
/**
|
|
31
|
-
*
|
|
35
|
+
* 组件尺寸,对齐 JD APP V11.0 缺省状态规范
|
|
32
36
|
*/
|
|
33
|
-
size:
|
|
37
|
+
size: EmptySize
|
|
34
38
|
/**
|
|
35
|
-
*
|
|
39
|
+
* 内置缺省插图类型,与设计稿业务场景一一对应
|
|
36
40
|
*/
|
|
37
|
-
status:
|
|
41
|
+
status: EmptyStatus
|
|
38
42
|
/**
|
|
39
|
-
*
|
|
43
|
+
* 操作按钮列表,项内字段同 Button,支持 onClick
|
|
40
44
|
*/
|
|
41
45
|
actions: Array<EmptyAction>
|
|
42
46
|
}
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
export {
|
|
1
|
+
/** 内置缺省插图 URL;图片本体走 CDN 运行时加载,打进包内的仅为 URL 字符串 */ export var EMPTY_STATUS_IMAGES = {
|
|
2
|
+
network: 'https://img10.360buyimg.com/imagetools/jfs/t1/449411/36/15729/19102/6a30e810F36720c83/03e61e01e08ab731.png',
|
|
3
|
+
comment: 'https://img12.360buyimg.com/imagetools/jfs/t1/458866/29/4221/20560/6a30e810F02e0c676/03e61e01e02c0dab.png',
|
|
4
|
+
search: 'https://img12.360buyimg.com/imagetools/jfs/t1/453287/39/13487/21638/6a30e810Fc7b15ec6/03e61e01e0bf5f81.png',
|
|
5
|
+
shop: 'https://img11.360buyimg.com/imagetools/jfs/t1/447986/21/19304/24327/6a30e810F0a9c3aca/03e61e01dd8d09b1.png',
|
|
6
|
+
address: 'https://img12.360buyimg.com/imagetools/jfs/t1/446923/19/19328/23073/6a30e810F37ec221d/03e61e01e0e69357.png',
|
|
7
|
+
order: 'https://img11.360buyimg.com/imagetools/jfs/t1/455990/2/7107/24405/6a30e810Fcb5a39b1/03e61e01e0715a43.png',
|
|
8
|
+
favor: 'https://img12.360buyimg.com/imagetools/jfs/t1/458517/13/4983/22338/6a30e810F9d69ff57/03e61e01e092c3f9.png',
|
|
9
|
+
cart: 'https://img11.360buyimg.com/imagetools/jfs/t1/453149/9/10304/23216/6a30e810Ff6c0d230/03e61e01e0b41203.png'
|
|
10
|
+
};
|
|
11
|
+
export var getEmptyStatusImage = function(status) {
|
|
12
|
+
return EMPTY_STATUS_IMAGES[status] || EMPTY_STATUS_IMAGES.network;
|
|
13
|
+
};
|
|
@@ -2,12 +2,21 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { BasicComponent } from "../../../utils/typings";
|
|
3
3
|
import { UISize } from '../../base/atoms';
|
|
4
4
|
export type RateSize = Extract<UISize, 'large' | 'normal' | 'small'>;
|
|
5
|
+
export type RateDirection = 'horizontal' | 'vertical';
|
|
5
6
|
export interface BaseRate extends BasicComponent {
|
|
6
7
|
/**
|
|
7
8
|
* star 尺寸
|
|
8
9
|
*/
|
|
9
10
|
size: RateSize
|
|
10
11
|
/**
|
|
12
|
+
* 方向
|
|
13
|
+
*/
|
|
14
|
+
direction: RateDirection
|
|
15
|
+
/**
|
|
16
|
+
* 标签文字
|
|
17
|
+
*/
|
|
18
|
+
label: ReactNode | ReactNode[]
|
|
19
|
+
/**
|
|
11
20
|
* 展示评分
|
|
12
21
|
*/
|
|
13
22
|
showScore: boolean
|
|
@@ -48,7 +57,7 @@ export interface BaseRate extends BasicComponent {
|
|
|
48
57
|
*/
|
|
49
58
|
allowHalf: boolean
|
|
50
59
|
/**
|
|
51
|
-
* 是否允许滑动选择
|
|
60
|
+
* 是否允许滑动选择
|
|
52
61
|
*/
|
|
53
62
|
touchable: boolean
|
|
54
63
|
/**
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -14599,6 +14599,7 @@
|
|
|
14599
14599
|
Range.displayName = "NutRange";
|
|
14600
14600
|
var defaultProps$R = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
14601
14601
|
size: "normal",
|
|
14602
|
+
direction: "horizontal",
|
|
14602
14603
|
showScore: false,
|
|
14603
14604
|
count: 5,
|
|
14604
14605
|
min: 0,
|
|
@@ -14610,15 +14611,29 @@
|
|
|
14610
14611
|
touchable: false
|
|
14611
14612
|
});
|
|
14612
14613
|
var Rate = function(props) {
|
|
14613
|
-
var _$_object_spread = _object_spread({}, defaultProps$R, props), className = _$_object_spread.className, style = _$_object_spread.style, size = _$_object_spread.size, showScore = _$_object_spread.showScore, count = _$_object_spread.count, value2 = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, min = _$_object_spread.min, checkedIcon = _$_object_spread.checkedIcon, uncheckedIcon = _$_object_spread.uncheckedIcon, disabled = _$_object_spread.disabled, readOnly = _$_object_spread.readOnly, allowHalf = _$_object_spread.allowHalf, touchable = _$_object_spread.touchable, onChange = _$_object_spread.onChange, onTouchEnd = _$_object_spread.onTouchEnd;
|
|
14614
|
+
var _$_object_spread = _object_spread({}, defaultProps$R, props), className = _$_object_spread.className, style = _$_object_spread.style, size = _$_object_spread.size, direction = _$_object_spread.direction, label = _$_object_spread.label, showScore = _$_object_spread.showScore, count = _$_object_spread.count, value2 = _$_object_spread.value, defaultValue = _$_object_spread.defaultValue, min = _$_object_spread.min, checkedIcon = _$_object_spread.checkedIcon, uncheckedIcon = _$_object_spread.uncheckedIcon, disabled = _$_object_spread.disabled, readOnly = _$_object_spread.readOnly, allowHalf = _$_object_spread.allowHalf, touchable = _$_object_spread.touchable, onChange = _$_object_spread.onChange, onTouchEnd = _$_object_spread.onTouchEnd;
|
|
14614
14615
|
var classPrefix2 = "nut-rate";
|
|
14615
|
-
var
|
|
14616
|
+
var shouldAnimate = direction === "vertical" || size === "large";
|
|
14617
|
+
var _useState = _sliced_to_array(React.useState(-1), 2), animatingIndex = _useState[0], setAnimatingIndex = _useState[1];
|
|
14618
|
+
React.useEffect(function() {
|
|
14619
|
+
if (animatingIndex >= 0) {
|
|
14620
|
+
var timer = setTimeout(function() {
|
|
14621
|
+
return setAnimatingIndex(-1);
|
|
14622
|
+
}, 300);
|
|
14623
|
+
return function() {
|
|
14624
|
+
return clearTimeout(timer);
|
|
14625
|
+
};
|
|
14626
|
+
}
|
|
14627
|
+
}, [
|
|
14628
|
+
animatingIndex
|
|
14629
|
+
]);
|
|
14630
|
+
var _useState1 = _sliced_to_array(React.useState([
|
|
14616
14631
|
1,
|
|
14617
14632
|
2,
|
|
14618
14633
|
3,
|
|
14619
14634
|
4,
|
|
14620
14635
|
5
|
|
14621
|
-
]), 2), countArray =
|
|
14636
|
+
]), 2), countArray = _useState1[0], setCountArray = _useState1[1];
|
|
14622
14637
|
var _useRefs = _sliced_to_array(useRefs(), 2), refs = _useRefs[0], setRefs = _useRefs[1];
|
|
14623
14638
|
var rateRects = React.useRef([]);
|
|
14624
14639
|
var _usePropsValue = _sliced_to_array(usePropsValue({
|
|
@@ -14650,12 +14665,18 @@
|
|
|
14650
14665
|
value3 = index2;
|
|
14651
14666
|
}
|
|
14652
14667
|
value3 = Math.max(value3, min);
|
|
14668
|
+
if (shouldAnimate && value3 > score) {
|
|
14669
|
+
setAnimatingIndex(index2 - 1);
|
|
14670
|
+
}
|
|
14653
14671
|
setScore(value3);
|
|
14654
14672
|
};
|
|
14655
14673
|
var onHalfClick = function(event, n) {
|
|
14656
14674
|
event.preventDefault();
|
|
14657
14675
|
event.stopPropagation();
|
|
14658
14676
|
var value3 = Math.max(min, n - 0.5);
|
|
14677
|
+
if (shouldAnimate && value3 > score) {
|
|
14678
|
+
setAnimatingIndex(n - 1);
|
|
14679
|
+
}
|
|
14659
14680
|
setScore(value3);
|
|
14660
14681
|
};
|
|
14661
14682
|
var getScoreByPosition = function(x) {
|
|
@@ -14725,8 +14746,32 @@
|
|
|
14725
14746
|
onTouchEnd && onTouchEnd(e, Math.max(min, val2));
|
|
14726
14747
|
}
|
|
14727
14748
|
};
|
|
14749
|
+
var isArrayLabel = Array.isArray(label);
|
|
14750
|
+
var renderSingleLabel = function() {
|
|
14751
|
+
if (label == null || isArrayLabel) return null;
|
|
14752
|
+
return /* @__PURE__ */ React.createElement(components.Text, {
|
|
14753
|
+
className: classNames("".concat(classPrefix2, "-label"), "".concat(classPrefix2, "-label-").concat(size))
|
|
14754
|
+
}, label);
|
|
14755
|
+
};
|
|
14756
|
+
var renderArrayLabels = function() {
|
|
14757
|
+
if (!isArrayLabel) return null;
|
|
14758
|
+
return /* @__PURE__ */ React.createElement(components.View, {
|
|
14759
|
+
className: classNames("".concat(classPrefix2, "-labels"), "".concat(classPrefix2, "-labels-").concat(size))
|
|
14760
|
+
}, label.map(function(item, index2) {
|
|
14761
|
+
return /* @__PURE__ */ React.createElement(components.Text, {
|
|
14762
|
+
className: "".concat(classPrefix2, "-labels-item"),
|
|
14763
|
+
key: index2
|
|
14764
|
+
}, item);
|
|
14765
|
+
}));
|
|
14766
|
+
};
|
|
14767
|
+
var renderScore = function() {
|
|
14768
|
+
if (!showScore) return null;
|
|
14769
|
+
return /* @__PURE__ */ React.createElement(components.Text, {
|
|
14770
|
+
className: classNames("".concat(classPrefix2, "-score"), "".concat(classPrefix2, "-score-").concat(size), _define_property({}, "".concat(classPrefix2, "-score-disabled"), disabled))
|
|
14771
|
+
}, score.toFixed(1));
|
|
14772
|
+
};
|
|
14728
14773
|
return /* @__PURE__ */ React.createElement(components.View, {
|
|
14729
|
-
className: classNames(classPrefix2, {
|
|
14774
|
+
className: classNames(classPrefix2, "".concat(classPrefix2, "-").concat(direction), {
|
|
14730
14775
|
disabled,
|
|
14731
14776
|
readonly: readOnly
|
|
14732
14777
|
}, className),
|
|
@@ -14736,7 +14781,10 @@
|
|
|
14736
14781
|
onTouchMove: handleTouchMove,
|
|
14737
14782
|
onTouchEnd: handleTouchEnd,
|
|
14738
14783
|
onTouchCancel: handleTouchEnd
|
|
14784
|
+
}, direction === "horizontal" && renderSingleLabel(), /* @__PURE__ */ React.createElement(components.View, {
|
|
14785
|
+
className: "".concat(classPrefix2, "-list")
|
|
14739
14786
|
}, countArray.map(function(n, index2) {
|
|
14787
|
+
var _obj;
|
|
14740
14788
|
return /* @__PURE__ */ React.createElement(components.View, {
|
|
14741
14789
|
className: "".concat(classPrefix2, "-item ").concat(classPrefix2, "-item-").concat(size),
|
|
14742
14790
|
key: n,
|
|
@@ -14745,16 +14793,14 @@
|
|
|
14745
14793
|
return onClick(event, n);
|
|
14746
14794
|
}
|
|
14747
14795
|
}, /* @__PURE__ */ React.createElement(components.View, {
|
|
14748
|
-
className: classNames("".concat(classPrefix2, "-item-icon"),
|
|
14796
|
+
className: classNames("".concat(classPrefix2, "-item-icon"), (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-item-icon-disabled"), disabled || n > score), _define_property(_obj, "".concat(classPrefix2, "-item-icon-animate"), animatingIndex === index2), _obj))
|
|
14749
14797
|
}, renderIcon(n)), allowHalf && score > n - 1 && /* @__PURE__ */ React.createElement(components.View, {
|
|
14750
14798
|
className: classNames("".concat(classPrefix2, "-item-half"), "".concat(classPrefix2, "-item-icon"), "".concat(classPrefix2, "-item-icon-half")),
|
|
14751
14799
|
onClick: function(event) {
|
|
14752
14800
|
return onHalfClick(event, n);
|
|
14753
14801
|
}
|
|
14754
14802
|
}, renderIcon(n)));
|
|
14755
|
-
}),
|
|
14756
|
-
className: classNames("".concat(classPrefix2, "-score"), "".concat(classPrefix2, "-score-").concat(size), _define_property({}, "".concat(classPrefix2, "-score-disabled"), disabled))
|
|
14757
|
-
}, score.toFixed(1)) : null);
|
|
14803
|
+
})), direction === "horizontal" && renderScore(), direction === "vertical" && /* @__PURE__ */ React.createElement(React.Fragment, null, renderScore(), isArrayLabel ? renderArrayLabels() : renderSingleLabel()));
|
|
14758
14804
|
};
|
|
14759
14805
|
Rate.displayName = "NutRate";
|
|
14760
14806
|
var defaultProps$Q = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -16781,24 +16827,39 @@
|
|
|
16781
16827
|
}, children));
|
|
16782
16828
|
};
|
|
16783
16829
|
Drag.displayName = "NutDrag";
|
|
16784
|
-
var
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16830
|
+
var PriceColorEnum = /* @__PURE__ */ function(PriceColorEnum2) {
|
|
16831
|
+
PriceColorEnum2["Primary"] = "primary";
|
|
16832
|
+
PriceColorEnum2["Gray"] = "gray";
|
|
16833
|
+
PriceColorEnum2["Darkgray"] = "darkgray";
|
|
16834
|
+
return PriceColorEnum2;
|
|
16835
|
+
}({});
|
|
16836
|
+
var destroyList = [];
|
|
16837
|
+
var EMPTY_STATUS_IMAGES = {
|
|
16838
|
+
network: "https://img10.360buyimg.com/imagetools/jfs/t1/449411/36/15729/19102/6a30e810F36720c83/03e61e01e08ab731.png",
|
|
16839
|
+
comment: "https://img12.360buyimg.com/imagetools/jfs/t1/458866/29/4221/20560/6a30e810F02e0c676/03e61e01e02c0dab.png",
|
|
16840
|
+
search: "https://img12.360buyimg.com/imagetools/jfs/t1/453287/39/13487/21638/6a30e810Fc7b15ec6/03e61e01e0bf5f81.png",
|
|
16841
|
+
shop: "https://img11.360buyimg.com/imagetools/jfs/t1/447986/21/19304/24327/6a30e810F0a9c3aca/03e61e01dd8d09b1.png",
|
|
16842
|
+
address: "https://img12.360buyimg.com/imagetools/jfs/t1/446923/19/19328/23073/6a30e810F37ec221d/03e61e01e0e69357.png",
|
|
16843
|
+
order: "https://img11.360buyimg.com/imagetools/jfs/t1/455990/2/7107/24405/6a30e810Fcb5a39b1/03e61e01e0715a43.png",
|
|
16844
|
+
favor: "https://img12.360buyimg.com/imagetools/jfs/t1/458517/13/4983/22338/6a30e810F9d69ff57/03e61e01e092c3f9.png",
|
|
16845
|
+
cart: "https://img11.360buyimg.com/imagetools/jfs/t1/453149/9/10304/23216/6a30e810Ff6c0d230/03e61e01e0b41203.png"
|
|
16846
|
+
};
|
|
16847
|
+
var getEmptyStatusImage = function(status) {
|
|
16848
|
+
return EMPTY_STATUS_IMAGES[status] || EMPTY_STATUS_IMAGES.network;
|
|
16788
16849
|
};
|
|
16789
16850
|
var defaultProps$G = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
16790
16851
|
title: "",
|
|
16791
16852
|
description: "",
|
|
16792
16853
|
imageSize: "",
|
|
16793
|
-
size: "
|
|
16794
|
-
status: "
|
|
16854
|
+
size: "half",
|
|
16855
|
+
status: "network",
|
|
16795
16856
|
actions: []
|
|
16796
16857
|
});
|
|
16797
16858
|
var classPrefix$e = "nut-empty";
|
|
16798
16859
|
var Empty = function(props) {
|
|
16799
16860
|
var _$_object_spread = _object_spread({}, defaultProps$G, props), image = _$_object_spread.image, imageSize = _$_object_spread.imageSize, title = _$_object_spread.title, description = _$_object_spread.description, children = _$_object_spread.children, className = _$_object_spread.className, size = _$_object_spread.size, status = _$_object_spread.status, actions = _$_object_spread.actions, style = _$_object_spread.style;
|
|
16800
16861
|
var _useState = _sliced_to_array(React.useState({}), 2), imgStyle = _useState[0], setImgStyle = _useState[1];
|
|
16801
|
-
var imageUrl = image ||
|
|
16862
|
+
var imageUrl = image || getEmptyStatusImage(status);
|
|
16802
16863
|
var imageNode = typeof imageUrl === "string" ? /* @__PURE__ */ React.createElement(components.Image, {
|
|
16803
16864
|
style: {
|
|
16804
16865
|
width: "100%",
|
|
@@ -16825,19 +16886,26 @@
|
|
|
16825
16886
|
}, [
|
|
16826
16887
|
imageSize
|
|
16827
16888
|
]);
|
|
16828
|
-
var cls = classNames(classPrefix$e, className);
|
|
16829
|
-
|
|
16830
|
-
className:
|
|
16831
|
-
style
|
|
16832
|
-
}, /* @__PURE__ */ React.createElement(components.View, {
|
|
16833
|
-
className: "".concat(classPrefix$e, "-").concat(size),
|
|
16889
|
+
var cls = classNames(classPrefix$e, "".concat(classPrefix$e, "--").concat(size), className);
|
|
16890
|
+
var imageBlock = /* @__PURE__ */ React.createElement(components.View, {
|
|
16891
|
+
className: "".concat(classPrefix$e, "-image"),
|
|
16834
16892
|
style: imgStyle
|
|
16835
|
-
}, imageNode)
|
|
16893
|
+
}, imageNode);
|
|
16894
|
+
var titleBlock = typeof title === "string" && title ? /* @__PURE__ */ React.createElement(components.View, {
|
|
16836
16895
|
className: "".concat(classPrefix$e, "-title")
|
|
16837
|
-
}, title) : title
|
|
16896
|
+
}, title) : title;
|
|
16897
|
+
var descriptionBlock = typeof description === "string" ? /* @__PURE__ */ React.createElement(components.View, {
|
|
16838
16898
|
className: "".concat(classPrefix$e, "-description")
|
|
16839
|
-
}, description) : description
|
|
16840
|
-
|
|
16899
|
+
}, description) : description;
|
|
16900
|
+
return /* @__PURE__ */ React.createElement(components.View, {
|
|
16901
|
+
className: cls,
|
|
16902
|
+
style
|
|
16903
|
+
}, size === "partial" ? /* @__PURE__ */ React.createElement(components.View, {
|
|
16904
|
+
className: "".concat(classPrefix$e, "-partial-body")
|
|
16905
|
+
}, imageBlock, /* @__PURE__ */ React.createElement(components.View, {
|
|
16906
|
+
className: "".concat(classPrefix$e, "-content")
|
|
16907
|
+
}, titleBlock, descriptionBlock)) : /* @__PURE__ */ React.createElement(React.Fragment, null, imageBlock, titleBlock, descriptionBlock), actions.length ? /* @__PURE__ */ React.createElement(components.View, {
|
|
16908
|
+
className: "".concat(classPrefix$e, "-actions")
|
|
16841
16909
|
}, actions.map(function(action, index2) {
|
|
16842
16910
|
action.text;
|
|
16843
16911
|
var rest = _object_without_properties(action, [
|
|
@@ -18154,7 +18222,7 @@
|
|
|
18154
18222
|
var _$_object_spread = _object_spread({}, defaultProps$z, props), className = _$_object_spread.className, style = _$_object_spread.style, title = _$_object_spread.title, description = _$_object_spread.description, icon = _$_object_spread.icon, status = _$_object_spread.status, actions = _$_object_spread.actions, children = _$_object_spread.children;
|
|
18155
18223
|
var classPrefix2 = "nut-resultpage";
|
|
18156
18224
|
var cls = classNames(classPrefix2, className);
|
|
18157
|
-
var
|
|
18225
|
+
var defaultStatus = {
|
|
18158
18226
|
success: /* @__PURE__ */ React.createElement(IconSVG$6, {
|
|
18159
18227
|
color: "var(--nutui-color-success, #0acc2a)"
|
|
18160
18228
|
}),
|
|
@@ -18176,7 +18244,7 @@
|
|
|
18176
18244
|
style
|
|
18177
18245
|
}, /* @__PURE__ */ React.createElement(components.View, {
|
|
18178
18246
|
className: "".concat(classPrefix2, "-icon")
|
|
18179
|
-
}, icon ||
|
|
18247
|
+
}, icon || defaultStatus[status]), typeof title === "string" && title ? /* @__PURE__ */ React.createElement(components.View, {
|
|
18180
18248
|
className: "".concat(classPrefix2, "-title")
|
|
18181
18249
|
}, title) : title, typeof description === "string" && description ? /* @__PURE__ */ React.createElement(components.Text, {
|
|
18182
18250
|
numberOfLines: 2,
|
|
@@ -41078,13 +41146,6 @@
|
|
|
41078
41146
|
}, pageCount)));
|
|
41079
41147
|
};
|
|
41080
41148
|
Pagination.displayName = "NutPagination";
|
|
41081
|
-
var PriceColorEnum = /* @__PURE__ */ function(PriceColorEnum2) {
|
|
41082
|
-
PriceColorEnum2["Primary"] = "primary";
|
|
41083
|
-
PriceColorEnum2["Gray"] = "gray";
|
|
41084
|
-
PriceColorEnum2["Darkgray"] = "darkgray";
|
|
41085
|
-
return PriceColorEnum2;
|
|
41086
|
-
}({});
|
|
41087
|
-
var destroyList = [];
|
|
41088
41149
|
var CJK = /[\u4E00-\u9FFF]/;
|
|
41089
41150
|
var RE_NUM = /\d+(?:\.\d+)?/g;
|
|
41090
41151
|
function hasNoExtractablePrice(s) {
|
|
@@ -43543,6 +43604,7 @@
|
|
|
43543
43604
|
exports.Dialog = BaseDialog;
|
|
43544
43605
|
exports.Divider = Divider;
|
|
43545
43606
|
exports.Drag = Drag;
|
|
43607
|
+
exports.EMPTY_STATUS_IMAGES = EMPTY_STATUS_IMAGES;
|
|
43546
43608
|
exports.Elevator = Elevator;
|
|
43547
43609
|
exports.Ellipsis = Ellipsis;
|
|
43548
43610
|
exports.Empty = Empty;
|
|
@@ -43634,6 +43696,7 @@
|
|
|
43634
43696
|
exports.getDaysStatus = getDaysStatus;
|
|
43635
43697
|
exports.getDefaultConfig = getDefaultConfig;
|
|
43636
43698
|
exports.getDeviceInfo = getDeviceInfo;
|
|
43699
|
+
exports.getEmptyStatusImage = getEmptyStatusImage;
|
|
43637
43700
|
exports.getPreMonthDates = getPreMonthDates;
|
|
43638
43701
|
exports.getRect = getRect;
|
|
43639
43702
|
exports.getRectById = getRectById;
|