@nutui/nutui-react-taro 3.0.0-beta.5 → 3.0.0-beta.6
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/cjs/packages/actionsheet/actionsheet.js +6 -3
- package/dist/cjs/packages/actionsheet/style/actionsheet.scss +10 -4
- package/dist/cjs/packages/actionsheet/style/style.css +14 -6
- package/dist/cjs/packages/address/style/style.css +4 -3
- package/dist/cjs/packages/animate/style/style.css +4 -0
- package/dist/cjs/packages/animatingnumbers/style/style.css +4 -0
- package/dist/cjs/packages/audio/style/style.css +4 -0
- package/dist/cjs/packages/avatar/style/style.css +4 -0
- package/dist/cjs/packages/avatarcropper/style/style.css +4 -0
- package/dist/cjs/packages/avatargroup/style/style.css +4 -0
- package/dist/cjs/packages/backtop/style/style.css +4 -0
- package/dist/cjs/packages/badge/style/style.css +4 -0
- package/dist/cjs/packages/barrage/style/style.css +4 -0
- package/dist/cjs/packages/button/style/style.css +4 -0
- package/dist/cjs/packages/calendar/style/style.css +4 -3
- package/dist/cjs/packages/calendarcard/style/calendarcard.scss +1 -1
- package/dist/cjs/packages/calendarcard/style/style.css +4 -0
- package/dist/cjs/packages/calendaritem/style/style.css +4 -0
- package/dist/cjs/packages/card/style/style.css +4 -0
- package/dist/cjs/packages/cascader/style/style.css +4 -3
- package/dist/cjs/packages/cell/style/style.css +4 -0
- package/dist/cjs/packages/cellgroup/style/style.css +4 -0
- package/dist/cjs/packages/checkbox/style/style.css +4 -0
- package/dist/cjs/packages/checkboxgroup/style/style.css +4 -0
- package/dist/cjs/packages/circleprogress/style/style.css +4 -0
- package/dist/cjs/packages/col/style/style.css +4 -0
- package/dist/cjs/packages/collapse/style/style.css +4 -0
- package/dist/cjs/packages/collapseitem/style/style.css +4 -0
- package/dist/cjs/packages/configprovider/style/style.css +4 -0
- package/dist/cjs/packages/configprovider/types.d.ts +1 -1
- package/dist/cjs/packages/countdown/style/style.css +4 -0
- package/dist/cjs/packages/countup/style/style.css +4 -0
- package/dist/cjs/packages/datepicker/style/style.css +4 -3
- package/dist/cjs/packages/dialog/style/style.css +4 -0
- package/dist/cjs/packages/divider/style/style.css +4 -0
- package/dist/cjs/packages/drag/style/style.css +4 -0
- package/dist/cjs/packages/elevator/elevator.js +5 -3
- package/dist/cjs/packages/elevator/style/style.css +4 -0
- package/dist/cjs/packages/ellipsis/style/style.css +4 -0
- package/dist/cjs/packages/empty/empty.js +1 -1
- package/dist/cjs/packages/empty/style/empty.scss +9 -5
- package/dist/cjs/packages/empty/style/style.css +16 -7
- package/dist/cjs/packages/fixednav/style/style.css +4 -0
- package/dist/cjs/packages/form/style/style.css +4 -0
- package/dist/cjs/packages/formitem/style/style.css +4 -0
- package/dist/cjs/packages/grid/style/style.css +4 -0
- package/dist/cjs/packages/griditem/style/style.css +4 -0
- package/dist/cjs/packages/hoverbutton/hoverbutton.js +2 -1
- package/dist/cjs/packages/hoverbutton/style/style.css +37 -12
- package/dist/cjs/packages/hoverbutton/utils.d.ts +1 -0
- package/dist/cjs/packages/hoverbutton/utils.js +11 -0
- package/dist/cjs/packages/hoverbuttonitem/hoverbuttonitem.js +16 -8
- package/dist/cjs/packages/hoverbuttonitem/style/hoverbuttonitem.scss +25 -0
- package/dist/cjs/packages/hoverbuttonitem/style/style.css +33 -8
- package/dist/cjs/packages/hoverbuttonitem/utils.d.ts +2 -0
- package/dist/cjs/packages/hoverbuttonitem/utils.js +18 -0
- package/dist/cjs/packages/image/style/style.css +4 -0
- package/dist/cjs/packages/imagepreview/imagepreview.js +8 -7
- package/dist/cjs/packages/imagepreview/style/imagepreview.scss +7 -0
- package/dist/cjs/packages/imagepreview/style/style.css +12 -3
- package/dist/cjs/packages/indicator/style/style.css +4 -0
- package/dist/cjs/packages/infiniteloading/style/style.css +4 -0
- package/dist/cjs/packages/input/style/style.css +4 -0
- package/dist/cjs/packages/inputnumber/style/style.css +4 -0
- package/dist/cjs/packages/layout/style/style.css +4 -0
- package/dist/cjs/packages/loading/style/style.css +4 -0
- package/dist/cjs/packages/menu/style/style.css +4 -0
- package/dist/cjs/packages/menuitem/style/style.css +4 -0
- package/dist/cjs/packages/navbar/style/style.css +4 -0
- package/dist/cjs/packages/noticebar/style/style.css +4 -0
- package/dist/cjs/packages/notify/style/style.css +4 -0
- package/dist/cjs/packages/numberkeyboard/style/style.css +4 -3
- package/dist/cjs/packages/nutui.react.build.d.ts +3 -1
- package/dist/cjs/packages/nutui.react.build.js +40 -36
- package/dist/cjs/packages/nutui.react.d.ts +4 -1
- package/dist/cjs/packages/nutui.react.js +41 -36
- package/dist/cjs/packages/nutui.react.scss.d.ts +1 -0
- package/dist/cjs/packages/nutui.react.scss.js +1 -0
- package/dist/cjs/packages/overlay/style/style.css +4 -0
- package/dist/cjs/packages/pagination/style/style.css +4 -0
- package/dist/cjs/packages/picker/style/style.css +4 -3
- package/dist/cjs/packages/popover/style/style.css +4 -3
- package/dist/cjs/packages/popup/style/popup.scss +0 -3
- package/dist/cjs/packages/popup/style/style.css +4 -3
- package/dist/cjs/packages/price/style/style.css +4 -0
- package/dist/cjs/packages/progress/style/style.css +4 -0
- package/dist/cjs/packages/pulltorefresh/style/style.css +4 -0
- package/dist/cjs/packages/radio/style/style.css +4 -0
- package/dist/cjs/packages/radiogroup/style/style.css +4 -0
- package/dist/cjs/packages/range/style/style.css +4 -0
- package/dist/cjs/packages/rate/index.d.ts +1 -1
- package/dist/cjs/packages/rate/rate.d.ts +2 -16
- package/dist/cjs/packages/rate/rate.js +7 -3
- package/dist/cjs/packages/rate/style/rate.scss +94 -8
- package/dist/cjs/packages/rate/style/style.css +86 -8
- package/dist/cjs/packages/rate/types.d.ts +18 -0
- package/dist/cjs/packages/rate/types.js +4 -0
- package/dist/cjs/packages/resultpage/style/style.css +4 -0
- package/dist/cjs/packages/row/style/style.css +4 -0
- package/dist/cjs/packages/safearea/style/style.css +4 -0
- package/dist/cjs/packages/searchbar/style/style.css +4 -0
- package/dist/cjs/packages/segmented/index.d.ts +3 -0
- package/dist/cjs/packages/segmented/index.js +12 -0
- package/dist/cjs/packages/segmented/segmented.d.ts +3 -0
- package/dist/cjs/packages/segmented/segmented.js +76 -0
- package/dist/cjs/packages/segmented/style/css.js +1 -0
- package/dist/cjs/packages/segmented/style/index.js +1 -0
- package/dist/cjs/packages/segmented/style/segmented.scss +38 -0
- package/dist/cjs/packages/segmented/style/style.css +42 -0
- package/dist/cjs/packages/segmented/types.d.ts +15 -0
- package/dist/cjs/packages/segmented/types.js +4 -0
- package/dist/cjs/packages/shortpassword/style/style.css +4 -3
- package/dist/cjs/packages/sidenavbar/style/style.css +4 -3
- package/dist/cjs/packages/sidenavbaritem/style/style.css +4 -0
- package/dist/cjs/packages/signature/style/style.css +4 -0
- package/dist/cjs/packages/skeleton/style/style.css +4 -0
- package/dist/cjs/packages/space/style/style.css +4 -0
- package/dist/cjs/packages/step/style/style.css +4 -0
- package/dist/cjs/packages/steps/style/style.css +4 -0
- package/dist/cjs/packages/sticky/style/style.css +4 -0
- package/dist/cjs/packages/subsidenavbar/style/style.css +4 -0
- package/dist/cjs/packages/swipe/style/style.css +4 -0
- package/dist/cjs/packages/swiper/style/style.css +4 -0
- package/dist/cjs/packages/swiperitem/style/style.css +4 -0
- package/dist/cjs/packages/switch/style/style.css +50 -30
- package/dist/cjs/packages/switch/style/switch.scss +44 -28
- package/dist/cjs/packages/switch/switch.d.ts +2 -2
- package/dist/cjs/packages/switch/switch.js +3 -11
- package/dist/cjs/packages/tabbar/style/style.css +4 -0
- package/dist/cjs/packages/tabbaritem/style/style.css +4 -0
- package/dist/cjs/packages/table/style/style.css +4 -0
- package/dist/cjs/packages/tabpane/style/style.css +4 -0
- package/dist/cjs/packages/tabs/style/style.css +4 -0
- package/dist/cjs/packages/tag/style/style.css +4 -0
- package/dist/cjs/packages/textarea/style/style.css +4 -0
- package/dist/cjs/packages/timedetail/style/style.css +6 -0
- package/dist/cjs/packages/timedetail/style/timedetail.scss +2 -0
- package/dist/cjs/packages/timeselect/style/style.css +6 -3
- package/dist/cjs/packages/toast/style/style.css +17 -10
- package/dist/cjs/packages/toast/style/toast.scss +14 -8
- package/dist/cjs/packages/toast/toast.d.ts +0 -5
- package/dist/cjs/packages/toast/toast.js +10 -24
- package/dist/cjs/packages/tour/style/style.css +4 -3
- package/dist/cjs/packages/trendarrow/style/style.css +4 -0
- package/dist/cjs/packages/uploader/style/style.css +4 -0
- package/dist/cjs/packages/video/style/style.css +4 -0
- package/dist/cjs/packages/virtuallist/style/style.css +4 -0
- package/dist/cjs/packages/watermark/style/style.css +4 -0
- package/dist/es/packages/actionsheet/actionsheet.d.ts +7 -35
- package/dist/es/packages/actionsheet/actionsheet.js +6 -3
- package/dist/es/packages/actionsheet/style/actionsheet.scss +10 -4
- package/dist/es/packages/actionsheet/style/style.css +14 -6
- package/dist/es/packages/address/style/style.css +4 -3
- package/dist/es/packages/animate/style/style.css +4 -0
- package/dist/es/packages/animatingnumbers/style/style.css +4 -0
- package/dist/es/packages/audio/style/style.css +4 -0
- package/dist/es/packages/avatar/style/style.css +4 -0
- package/dist/es/packages/avatarcropper/style/style.css +4 -0
- package/dist/es/packages/avatargroup/style/style.css +4 -0
- package/dist/es/packages/backtop/style/style.css +4 -0
- package/dist/es/packages/badge/style/style.css +4 -0
- package/dist/es/packages/barrage/style/style.css +4 -0
- package/dist/es/packages/button/style/style.css +4 -0
- package/dist/es/packages/calendar/style/style.css +4 -3
- package/dist/es/packages/calendarcard/style/calendarcard.scss +1 -1
- package/dist/es/packages/calendarcard/style/style.css +4 -0
- package/dist/es/packages/calendaritem/style/style.css +4 -0
- package/dist/es/packages/card/style/style.css +4 -0
- package/dist/es/packages/cascader/style/style.css +4 -3
- package/dist/es/packages/cell/style/style.css +4 -0
- package/dist/es/packages/cellgroup/style/style.css +4 -0
- package/dist/es/packages/checkbox/style/style.css +4 -0
- package/dist/es/packages/checkboxgroup/style/style.css +4 -0
- package/dist/es/packages/circleprogress/style/style.css +4 -0
- package/dist/es/packages/col/style/style.css +4 -0
- package/dist/es/packages/collapse/style/style.css +4 -0
- package/dist/es/packages/collapseitem/style/style.css +4 -0
- package/dist/es/packages/configprovider/style/style.css +4 -0
- package/dist/es/packages/configprovider/types.d.ts +1 -1
- package/dist/es/packages/countdown/style/style.css +4 -0
- package/dist/es/packages/countup/style/style.css +4 -0
- package/dist/es/packages/datepicker/style/style.css +4 -3
- package/dist/es/packages/dialog/style/style.css +4 -0
- package/dist/es/packages/divider/style/style.css +4 -0
- package/dist/es/packages/drag/style/style.css +4 -0
- package/dist/es/packages/elevator/elevator.d.ts +9 -45
- package/dist/es/packages/elevator/elevator.js +7 -5
- package/dist/es/packages/elevator/style/style.css +4 -0
- package/dist/es/packages/ellipsis/style/style.css +4 -0
- package/dist/es/packages/empty/empty.js +1 -1
- package/dist/es/packages/empty/style/empty.scss +9 -5
- package/dist/es/packages/empty/style/style.css +16 -7
- package/dist/es/packages/fixednav/style/style.css +4 -0
- package/dist/es/packages/form/style/style.css +4 -0
- package/dist/es/packages/formitem/style/style.css +4 -0
- package/dist/es/packages/grid/style/style.css +4 -0
- package/dist/es/packages/griditem/style/style.css +4 -0
- package/dist/es/packages/hoverbutton/hoverbutton.js +2 -1
- package/dist/es/packages/hoverbutton/style/style.css +37 -12
- package/dist/es/packages/hoverbutton/utils.d.ts +1 -0
- package/dist/es/packages/hoverbutton/utils.js +1 -0
- package/dist/es/packages/hoverbuttonitem/hoverbuttonitem.js +17 -9
- package/dist/es/packages/hoverbuttonitem/style/hoverbuttonitem.scss +25 -0
- package/dist/es/packages/hoverbuttonitem/style/style.css +33 -8
- package/dist/es/packages/hoverbuttonitem/utils.d.ts +2 -0
- package/dist/es/packages/hoverbuttonitem/utils.js +7 -0
- package/dist/es/packages/image/style/style.css +4 -0
- package/dist/es/packages/imagepreview/imagepreview.js +4 -3
- package/dist/es/packages/imagepreview/style/imagepreview.scss +7 -0
- package/dist/es/packages/imagepreview/style/style.css +12 -3
- package/dist/es/packages/indicator/style/style.css +4 -0
- package/dist/es/packages/infiniteloading/style/style.css +4 -0
- package/dist/es/packages/input/style/style.css +4 -0
- package/dist/es/packages/inputnumber/style/style.css +4 -0
- package/dist/es/packages/layout/style/style.css +4 -0
- package/dist/es/packages/loading/style/style.css +4 -0
- package/dist/es/packages/menu/style/style.css +4 -0
- package/dist/es/packages/menuitem/style/style.css +4 -0
- package/dist/es/packages/navbar/style/style.css +4 -0
- package/dist/es/packages/noticebar/style/style.css +4 -0
- package/dist/es/packages/notify/style/style.css +4 -0
- package/dist/es/packages/numberkeyboard/style/style.css +4 -3
- package/dist/es/packages/nutui.react.build.d.ts +3 -1
- package/dist/es/packages/nutui.react.build.js +3 -1
- package/dist/es/packages/overlay/style/style.css +4 -0
- package/dist/es/packages/pagination/style/style.css +4 -0
- package/dist/es/packages/picker/style/style.css +4 -3
- package/dist/es/packages/popover/style/style.css +4 -3
- package/dist/es/packages/popup/style/popup.scss +0 -3
- package/dist/es/packages/popup/style/style.css +4 -3
- package/dist/es/packages/price/style/style.css +4 -0
- package/dist/es/packages/progress/style/style.css +4 -0
- package/dist/es/packages/pulltorefresh/style/style.css +4 -0
- package/dist/es/packages/radio/style/style.css +4 -0
- package/dist/es/packages/radiogroup/style/style.css +4 -0
- package/dist/es/packages/range/style/style.css +4 -0
- package/dist/es/packages/rate/index.d.ts +1 -1
- package/dist/es/packages/rate/rate.d.ts +2 -16
- package/dist/es/packages/rate/rate.js +8 -4
- package/dist/es/packages/rate/style/rate.scss +94 -8
- package/dist/es/packages/rate/style/style.css +86 -8
- package/dist/es/packages/rate/types.d.ts +18 -0
- package/dist/es/packages/rate/types.js +1 -0
- package/dist/es/packages/resultpage/style/style.css +4 -0
- package/dist/es/packages/row/style/style.css +4 -0
- package/dist/es/packages/safearea/style/style.css +4 -0
- package/dist/es/packages/searchbar/style/style.css +4 -0
- package/dist/es/packages/segmented/index.d.ts +3 -0
- package/dist/es/packages/segmented/index.js +2 -0
- package/dist/es/packages/segmented/segmented.d.ts +3 -0
- package/dist/es/packages/segmented/segmented.js +64 -0
- package/dist/es/packages/segmented/style/css.js +1 -0
- package/dist/es/packages/segmented/style/index.js +1 -0
- package/dist/es/packages/segmented/style/segmented.scss +38 -0
- package/dist/es/packages/segmented/style/style.css +42 -0
- package/dist/es/packages/segmented/types.d.ts +15 -0
- package/dist/es/packages/segmented/types.js +1 -0
- package/dist/es/packages/shortpassword/style/style.css +4 -3
- package/dist/es/packages/sidenavbar/style/style.css +4 -3
- package/dist/es/packages/sidenavbaritem/style/style.css +4 -0
- package/dist/es/packages/signature/style/style.css +4 -0
- package/dist/es/packages/skeleton/style/style.css +4 -0
- package/dist/es/packages/space/style/style.css +4 -0
- package/dist/es/packages/step/style/style.css +4 -0
- package/dist/es/packages/steps/style/style.css +4 -0
- package/dist/es/packages/sticky/style/style.css +4 -0
- package/dist/es/packages/subsidenavbar/style/style.css +4 -0
- package/dist/es/packages/swipe/style/style.css +4 -0
- package/dist/es/packages/swiper/style/style.css +4 -0
- package/dist/es/packages/swiperitem/style/style.css +4 -0
- package/dist/es/packages/switch/style/style.css +50 -30
- package/dist/es/packages/switch/style/switch.scss +44 -28
- package/dist/es/packages/switch/switch.d.ts +2 -2
- package/dist/es/packages/switch/switch.js +3 -11
- package/dist/es/packages/tabbar/style/style.css +4 -0
- package/dist/es/packages/tabbaritem/style/style.css +4 -0
- package/dist/es/packages/table/style/style.css +4 -0
- package/dist/es/packages/tabpane/style/style.css +4 -0
- package/dist/es/packages/tabs/style/style.css +4 -0
- package/dist/es/packages/tag/style/style.css +4 -0
- package/dist/es/packages/textarea/style/style.css +4 -0
- package/dist/es/packages/timedetail/style/style.css +6 -0
- package/dist/es/packages/timedetail/style/timedetail.scss +2 -0
- package/dist/es/packages/timeselect/style/style.css +6 -3
- package/dist/es/packages/timeselect/timeselect.d.ts +9 -45
- package/dist/es/packages/toast/style/style.css +17 -10
- package/dist/es/packages/toast/style/toast.scss +14 -8
- package/dist/es/packages/toast/toast.d.ts +0 -5
- package/dist/es/packages/toast/toast.js +10 -24
- package/dist/es/packages/tour/style/style.css +4 -3
- package/dist/es/packages/trendarrow/style/style.css +4 -0
- package/dist/es/packages/uploader/style/style.css +4 -0
- package/dist/es/packages/video/style/style.css +4 -0
- package/dist/es/packages/virtuallist/style/style.css +4 -0
- package/dist/es/packages/watermark/style/style.css +4 -0
- package/dist/nutui.react.umd.js +293 -237
- package/dist/style.css +1 -1
- package/dist/styles/theme-dark.scss +103 -94
- package/dist/styles/theme-default.scss +95 -90
- package/dist/styles/variables.scss +98 -53
- package/package.json +1 -1
|
@@ -2,51 +2,15 @@ import React, { FunctionComponent } from 'react';
|
|
|
2
2
|
import { BasicComponent } from "../../utils/typings";
|
|
3
3
|
export declare const elevatorContext: React.Context<ElevatorData>;
|
|
4
4
|
export interface ElevatorProps extends BasicComponent {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
floorKey: string
|
|
15
|
-
/**
|
|
16
|
-
* 索引列表
|
|
17
|
-
* @default [{id: 0, name: ''}]
|
|
18
|
-
*/
|
|
19
|
-
list: any[]
|
|
20
|
-
/**
|
|
21
|
-
* 索引是否吸顶
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
sticky: boolean
|
|
25
|
-
/**
|
|
26
|
-
* 右侧锚点的上下间距
|
|
27
|
-
* @default 23
|
|
28
|
-
*/
|
|
29
|
-
spaceHeight: number
|
|
30
|
-
/**
|
|
31
|
-
* 左侧索引的高度
|
|
32
|
-
* @default 35
|
|
33
|
-
*/
|
|
34
|
-
titleHeight: number
|
|
35
|
-
/**
|
|
36
|
-
* 展示右侧导航
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
showKeys: boolean
|
|
40
|
-
/**
|
|
41
|
-
* 点击内容
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
onItemClick: (key: string, item: ElevatorData) => void
|
|
45
|
-
/**
|
|
46
|
-
* 点击索引
|
|
47
|
-
* @default false
|
|
48
|
-
*/
|
|
49
|
-
onIndexClick: (key: string) => void
|
|
5
|
+
height: number | string;
|
|
6
|
+
floorKey: string;
|
|
7
|
+
list: any[];
|
|
8
|
+
sticky: boolean;
|
|
9
|
+
spaceHeight: number;
|
|
10
|
+
titleHeight: number;
|
|
11
|
+
showKeys: boolean;
|
|
12
|
+
onItemClick: (key: string, item: ElevatorData) => void;
|
|
13
|
+
onIndexClick: (key: string) => void;
|
|
50
14
|
}
|
|
51
15
|
interface ElevatorData {
|
|
52
16
|
name: string;
|
|
@@ -4,11 +4,12 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
4
4
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
5
5
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
6
6
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
7
|
-
import React, {
|
|
8
|
-
import Taro, {
|
|
7
|
+
import React, { createContext, useEffect, useRef, useState } from "react";
|
|
8
|
+
import Taro, { createSelectorQuery, nextTick } from "@tarojs/taro";
|
|
9
9
|
import { ScrollView, View } from "@tarojs/components";
|
|
10
10
|
import classNames from "classnames";
|
|
11
11
|
import { ComponentDefaults } from "../../utils/typings";
|
|
12
|
+
import useUuid from "../../utils/use-uuid";
|
|
12
13
|
export var elevatorContext = /*#__PURE__*/ createContext({});
|
|
13
14
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
14
15
|
height: '200px',
|
|
@@ -35,6 +36,7 @@ export var Elevator = function(props) {
|
|
|
35
36
|
"onIndexClick",
|
|
36
37
|
"children"
|
|
37
38
|
]);
|
|
39
|
+
var uuid = useUuid();
|
|
38
40
|
var classPrefix = 'nut-elevator';
|
|
39
41
|
var listview = useRef(null);
|
|
40
42
|
var initData = {
|
|
@@ -69,7 +71,7 @@ export var Elevator = function(props) {
|
|
|
69
71
|
state.current.listHeight.push(height);
|
|
70
72
|
for(var i = 0; i < state.current.listGroup.length; i++){
|
|
71
73
|
var query = createSelectorQuery();
|
|
72
|
-
query.selectAll(".".concat(
|
|
74
|
+
query.selectAll(".".concat(classPrefix, "-").concat(uuid, " .nut-elevator-item-").concat(i)).boundingClientRect();
|
|
73
75
|
// eslint-disable-next-line no-loop-func
|
|
74
76
|
query.exec(function(res) {
|
|
75
77
|
if (res[0][0]) height += res[0][0].height;
|
|
@@ -129,7 +131,7 @@ export var Elevator = function(props) {
|
|
|
129
131
|
};
|
|
130
132
|
var setListGroup = function() {
|
|
131
133
|
if (listview.current) {
|
|
132
|
-
createSelectorQuery().selectAll(".".concat(
|
|
134
|
+
createSelectorQuery().selectAll(".".concat(classPrefix, "-").concat(uuid, " .nut-elevator-list-item")).node(function(el) {
|
|
133
135
|
state.current.listGroup = _to_consumable_array(Object.keys(el));
|
|
134
136
|
calculateHeight();
|
|
135
137
|
}).exec();
|
|
@@ -167,7 +169,7 @@ export var Elevator = function(props) {
|
|
|
167
169
|
]);
|
|
168
170
|
var _obj;
|
|
169
171
|
return /*#__PURE__*/ React.createElement("div", _object_spread({
|
|
170
|
-
className: "".concat(classPrefix, " ").concat(className),
|
|
172
|
+
className: "".concat(classPrefix, " ").concat(className, " ").concat(classPrefix, "-").concat(uuid),
|
|
171
173
|
style: style
|
|
172
174
|
}, rest), /*#__PURE__*/ React.createElement(View, {
|
|
173
175
|
className: "".concat(classPrefix, "-list"),
|
|
@@ -65,7 +65,7 @@ export var Empty = function(props) {
|
|
|
65
65
|
}, title) : title, typeof description === 'string' ? /*#__PURE__*/ React.createElement(View, {
|
|
66
66
|
className: "".concat(classPrefix, "-description")
|
|
67
67
|
}, description) : description, actions.length ? /*#__PURE__*/ React.createElement(View, {
|
|
68
|
-
className: "".concat(classPrefix, "-actions")
|
|
68
|
+
className: "".concat(classPrefix, "-actions-").concat(size)
|
|
69
69
|
}, actions.map(function(action, index) {
|
|
70
70
|
var text = action.text, rest = _object_without_properties(action, [
|
|
71
71
|
"text"
|
|
@@ -32,20 +32,24 @@
|
|
|
32
32
|
|
|
33
33
|
&-title {
|
|
34
34
|
margin-top: $empty-title-margin-top;
|
|
35
|
+
font-weight: $font-weight-bold;
|
|
35
36
|
margin-bottom: $empty-title-margin-bottom;
|
|
36
37
|
color: $color-title;
|
|
37
|
-
font-size: $font-size-
|
|
38
|
+
font-size: $font-size-l;
|
|
38
39
|
line-height: $empty-title-line-height;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
&-description {
|
|
42
|
-
|
|
43
|
-
color: $color-text-help;
|
|
43
|
+
color: $color-text;
|
|
44
44
|
font-size: $font-size-s;
|
|
45
45
|
line-height: $empty-description-line-height;
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
&-actions-base {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
margin-top: 24px;
|
|
51
|
+
}
|
|
52
|
+
&-actions-small {
|
|
49
53
|
display: flex;
|
|
50
54
|
flex-direction: row;
|
|
51
55
|
margin-top: 16px;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/* #ifdef harmony */
|
|
2
|
+
/* #endif */
|
|
3
|
+
/* #ifndef harmony */
|
|
4
|
+
/* #endif */
|
|
1
5
|
.nut-empty {
|
|
2
6
|
box-sizing: border-box;
|
|
3
7
|
width: 100%;
|
|
@@ -28,18 +32,23 @@
|
|
|
28
32
|
}
|
|
29
33
|
.nut-empty-title {
|
|
30
34
|
margin-top: var(--nutui-empty-title-margin-top, 0px);
|
|
31
|
-
|
|
35
|
+
font-weight: var(--nutui-font-weight-bold, 600);
|
|
36
|
+
margin-bottom: var(--nutui-empty-title-margin-bottom, 12px);
|
|
32
37
|
color: var(--nutui-color-title, #1a1a1a);
|
|
33
|
-
font-size: var(--nutui-font-size-
|
|
34
|
-
line-height: var(--nutui-empty-title-line-height, var(--nutui-font-size-
|
|
38
|
+
font-size: var(--nutui-font-size-l, 16px);
|
|
39
|
+
line-height: var(--nutui-empty-title-line-height, var(--nutui-font-size-l, 16px));
|
|
35
40
|
}
|
|
36
41
|
.nut-empty-description {
|
|
37
|
-
|
|
38
|
-
color: var(--nutui-color-text-help, #888b94);
|
|
42
|
+
color: var(--nutui-color-text, #505259);
|
|
39
43
|
font-size: var(--nutui-font-size-s, 12px);
|
|
40
|
-
line-height: var(--nutui-empty-description-line-height, 1
|
|
44
|
+
line-height: var(--nutui-empty-description-line-height, 1);
|
|
41
45
|
}
|
|
42
|
-
.nut-empty-actions {
|
|
46
|
+
.nut-empty-actions-base {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
margin-top: 24px;
|
|
50
|
+
}
|
|
51
|
+
.nut-empty-actions-small {
|
|
43
52
|
display: flex;
|
|
44
53
|
flex-direction: row;
|
|
45
54
|
margin-top: 16px;
|
|
@@ -9,6 +9,7 @@ import { useRtl } from "../configprovider/index";
|
|
|
9
9
|
import HoverButtonItem from "../hoverbuttonitem/index";
|
|
10
10
|
import SafeArea from "../safearea/index";
|
|
11
11
|
import pxTransform from "../../utils/px-transform";
|
|
12
|
+
import { UI_BOTTOM_DISTANCE } from "./utils";
|
|
12
13
|
var defaultProps = _object_spread({}, ComponentDefaults);
|
|
13
14
|
var classPrefix = 'nut-hoverbutton';
|
|
14
15
|
export var HoverButton = function(props) {
|
|
@@ -16,7 +17,7 @@ export var HoverButton = function(props) {
|
|
|
16
17
|
var rtl = useRtl();
|
|
17
18
|
var baseStyle = _object_spread({}, style);
|
|
18
19
|
if (tabbarHeight) {
|
|
19
|
-
baseStyle.bottom = pxTransform(tabbarHeight +
|
|
20
|
+
baseStyle.bottom = pxTransform(tabbarHeight + UI_BOTTOM_DISTANCE);
|
|
20
21
|
}
|
|
21
22
|
if (typeof zIndex !== 'undefined') {
|
|
22
23
|
baseStyle.zIndex = zIndex;
|
|
@@ -1,45 +1,70 @@
|
|
|
1
|
+
/* #ifdef harmony */
|
|
2
|
+
/* #endif */
|
|
3
|
+
/* #ifndef harmony */
|
|
4
|
+
/* #endif */
|
|
1
5
|
.nut-hoverbutton-item-container {
|
|
2
6
|
width: 40px;
|
|
3
7
|
height: 40px;
|
|
4
8
|
border-radius: 20px;
|
|
5
|
-
border: 1px solid var(--nutui-hoverbutton-item-border-color,
|
|
6
|
-
background-color: var(--nutui-hoverbutton-item-background, var(--nutui-
|
|
9
|
+
border: 1px solid var(--nutui-hoverbutton-item-border-color, rgba(0, 0, 0, 0.12));
|
|
10
|
+
background-color: var(--nutui-hoverbutton-item-background, var(--nutui-white-12));
|
|
7
11
|
}
|
|
8
12
|
.nut-hoverbutton-item-container:active, .nut-hoverbutton-item-container-active {
|
|
9
|
-
background-color: var(--nutui-hoverbutton-item-background-active,
|
|
13
|
+
background-color: var(--nutui-hoverbutton-item-background-active, rgba(247, 248, 252, 0.9));
|
|
10
14
|
}
|
|
11
15
|
.nut-hoverbutton-item-container-harmony {
|
|
12
|
-
margin-bottom: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-
|
|
16
|
+
margin-bottom: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-base, 8px));
|
|
13
17
|
}
|
|
14
18
|
.nut-hoverbutton-item-container-harmony:last-child {
|
|
15
19
|
margin-bottom: 0;
|
|
16
20
|
}
|
|
21
|
+
.nut-hoverbutton-item-container-icontext {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
.nut-hoverbutton-item-container-icontext .nut-icon {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 14px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
}
|
|
17
32
|
.nut-hoverbutton-item-icon {
|
|
18
33
|
width: 20px;
|
|
19
34
|
height: 20px;
|
|
20
35
|
margin: 9px;
|
|
21
|
-
color: var(--nutui-hoverbutton-item-icon-color, var(--nutui-
|
|
22
|
-
fill: var(--nutui-hoverbutton-item-icon-color, var(--nutui-
|
|
36
|
+
color: var(--nutui-hoverbutton-item-icon-color, var(--nutui-color-title, #1a1a1a));
|
|
37
|
+
fill: var(--nutui-hoverbutton-item-icon-color, var(--nutui-color-title, #1a1a1a));
|
|
23
38
|
}
|
|
24
39
|
.nut-hoverbutton-item-icon .nut-icon {
|
|
25
40
|
display: block;
|
|
26
41
|
width: 20px;
|
|
27
42
|
height: 20px;
|
|
43
|
+
font-size: 20px;
|
|
28
44
|
}
|
|
29
45
|
.nut-hoverbutton-item-container:active .nut-hoverbutton-item-icon {
|
|
30
|
-
color: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-
|
|
31
|
-
fill: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-
|
|
46
|
+
color: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-color-title, #1a1a1a));
|
|
47
|
+
fill: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-color-title, #1a1a1a));
|
|
48
|
+
}
|
|
49
|
+
.nut-hoverbutton-item-text-icon {
|
|
50
|
+
width: 14px;
|
|
51
|
+
height: 5px;
|
|
52
|
+
}
|
|
53
|
+
.nut-hoverbutton-item-text {
|
|
54
|
+
font-size: 10px;
|
|
55
|
+
margin-top: 5px;
|
|
56
|
+
line-height: 9px;
|
|
32
57
|
}
|
|
33
58
|
|
|
34
59
|
.nut-hoverbutton {
|
|
35
60
|
display: flex;
|
|
36
61
|
flex-direction: column;
|
|
37
|
-
gap: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-
|
|
62
|
+
gap: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-base, 8px));
|
|
38
63
|
}
|
|
39
64
|
.nut-hoverbutton-container {
|
|
40
65
|
position: fixed;
|
|
41
|
-
right: var(--nutui-hoverbutton-position-right, var(--nutui-spacing-
|
|
42
|
-
bottom: var(--nutui-hoverbutton-position-bottom,
|
|
66
|
+
right: var(--nutui-hoverbutton-position-right, var(--nutui-spacing-base, 8px));
|
|
67
|
+
bottom: var(--nutui-hoverbutton-position-bottom, 60px);
|
|
43
68
|
z-index: 10;
|
|
44
69
|
}
|
|
45
70
|
.nut-hoverbutton-container-rn {
|
|
@@ -49,5 +74,5 @@
|
|
|
49
74
|
[dir=rtl] .nut-hoverbutton-container,
|
|
50
75
|
.nut-hoverbutton-container-rtl {
|
|
51
76
|
right: auto;
|
|
52
|
-
left: var(--nutui-hoverbutton-position-right, var(--nutui-spacing-
|
|
77
|
+
left: var(--nutui-hoverbutton-position-right, var(--nutui-spacing-base, 8px));
|
|
53
78
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UI_BOTTOM_DISTANCE = 60;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var UI_BOTTOM_DISTANCE = 60;
|
|
@@ -2,11 +2,12 @@ import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
4
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useMemo, useState } from "react";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import { View } from "@tarojs/components";
|
|
8
8
|
import { ComponentDefaults } from "../../utils/typings";
|
|
9
9
|
import { harmony, harmonyAndRn } from "../../utils/platform-taro";
|
|
10
|
+
import { getIcon } from "./utils";
|
|
10
11
|
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
11
12
|
icon: null,
|
|
12
13
|
onClick: function(value) {}
|
|
@@ -15,7 +16,7 @@ var classPrefix = 'nut-hoverbutton-item';
|
|
|
15
16
|
var isHarmony = harmony();
|
|
16
17
|
var isNative = harmonyAndRn();
|
|
17
18
|
export var HoverButtonItem = function(props) {
|
|
18
|
-
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, icon = _$_object_spread.icon, onClick = _$_object_spread.onClick;
|
|
19
|
+
var _$_object_spread = _object_spread({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, icon = _$_object_spread.icon, onClick = _$_object_spread.onClick, children = _$_object_spread.children;
|
|
19
20
|
var _useState = _sliced_to_array(useState(false), 2), isTouchStart = _useState[0], setTouchStart = _useState[1];
|
|
20
21
|
// @TODO 待添加暗黑模式及样式变量功能
|
|
21
22
|
var nativeProps = useMemo(function() {
|
|
@@ -34,22 +35,29 @@ export var HoverButtonItem = function(props) {
|
|
|
34
35
|
var handleActiveEnd = function(event) {
|
|
35
36
|
isNative && setTouchStart(false);
|
|
36
37
|
};
|
|
38
|
+
var renderBody = function() {
|
|
39
|
+
if (icon && !children) return /*#__PURE__*/ React.createElement(View, {
|
|
40
|
+
className: "".concat(classPrefix, "-icon")
|
|
41
|
+
}, getIcon(icon));
|
|
42
|
+
if (icon && children) {
|
|
43
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(View, {
|
|
44
|
+
className: classNames(_define_property({}, "".concat(classPrefix, "-text-icon"), true))
|
|
45
|
+
}), getIcon(icon), /*#__PURE__*/ React.createElement(View, {
|
|
46
|
+
className: classNames(_define_property({}, "".concat(classPrefix, "-text"), true))
|
|
47
|
+
}, children));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
37
50
|
var _obj;
|
|
38
51
|
return /*#__PURE__*/ React.createElement(View, {
|
|
39
52
|
className: classNames([
|
|
40
53
|
"".concat(classPrefix, "-container"),
|
|
41
54
|
className
|
|
42
|
-
], (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-container-active"), isNative && isTouchStart), _define_property(_obj, "".concat(classPrefix, "-container-harmony"), isHarmony), _obj)),
|
|
55
|
+
], (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-container-active"), isNative && isTouchStart), _define_property(_obj, "".concat(classPrefix, "-container-harmony"), isHarmony), _define_property(_obj, "".concat(classPrefix, "-container-icontext"), icon && children), _obj)),
|
|
43
56
|
style: style,
|
|
44
57
|
onTouchStart: handleActiveStart,
|
|
45
58
|
onTouchEnd: handleActiveEnd,
|
|
46
59
|
onTouchCancel: handleActiveEnd,
|
|
47
60
|
onClick: handleClick
|
|
48
|
-
},
|
|
49
|
-
className: "".concat(classPrefix, "-icon")
|
|
50
|
-
}, /*#__PURE__*/ React.cloneElement(icon, _object_spread({
|
|
51
|
-
className: 'nut-icon',
|
|
52
|
-
size: 20
|
|
53
|
-
}, nativeProps))));
|
|
61
|
+
}, renderBody());
|
|
54
62
|
};
|
|
55
63
|
HoverButtonItem.displayName = 'NutHoverButtonItem';
|
|
@@ -18,6 +18,19 @@
|
|
|
18
18
|
margin-bottom: 0;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
&-icontext {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
|
|
27
|
+
.nut-icon {
|
|
28
|
+
display: block;
|
|
29
|
+
width: 14px;
|
|
30
|
+
height: 14px;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
21
34
|
}
|
|
22
35
|
|
|
23
36
|
&-icon {
|
|
@@ -31,6 +44,7 @@
|
|
|
31
44
|
display: block;
|
|
32
45
|
width: 20px;
|
|
33
46
|
height: 20px;
|
|
47
|
+
font-size: 20px;
|
|
34
48
|
}
|
|
35
49
|
}
|
|
36
50
|
|
|
@@ -38,4 +52,15 @@
|
|
|
38
52
|
color: $hoverbutton-item-icon-color-active;
|
|
39
53
|
fill: $hoverbutton-item-icon-color-active;
|
|
40
54
|
}
|
|
55
|
+
|
|
56
|
+
&-text-icon {
|
|
57
|
+
width: 14px;
|
|
58
|
+
height: 5px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-text {
|
|
62
|
+
font-size: 10px;
|
|
63
|
+
margin-top: 5px;
|
|
64
|
+
line-height: 9px;
|
|
65
|
+
}
|
|
41
66
|
}
|
|
@@ -1,32 +1,57 @@
|
|
|
1
|
+
/* #ifdef harmony */
|
|
2
|
+
/* #endif */
|
|
3
|
+
/* #ifndef harmony */
|
|
4
|
+
/* #endif */
|
|
1
5
|
.nut-hoverbutton-item-container {
|
|
2
6
|
width: 40px;
|
|
3
7
|
height: 40px;
|
|
4
8
|
border-radius: 20px;
|
|
5
|
-
border: 1px solid var(--nutui-hoverbutton-item-border-color,
|
|
6
|
-
background-color: var(--nutui-hoverbutton-item-background, var(--nutui-
|
|
9
|
+
border: 1px solid var(--nutui-hoverbutton-item-border-color, rgba(0, 0, 0, 0.12));
|
|
10
|
+
background-color: var(--nutui-hoverbutton-item-background, var(--nutui-white-12));
|
|
7
11
|
}
|
|
8
12
|
.nut-hoverbutton-item-container:active, .nut-hoverbutton-item-container-active {
|
|
9
|
-
background-color: var(--nutui-hoverbutton-item-background-active,
|
|
13
|
+
background-color: var(--nutui-hoverbutton-item-background-active, rgba(247, 248, 252, 0.9));
|
|
10
14
|
}
|
|
11
15
|
.nut-hoverbutton-item-container-harmony {
|
|
12
|
-
margin-bottom: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-
|
|
16
|
+
margin-bottom: var(--nutui-hoverbutton-spacing, var(--nutui-spacing-base, 8px));
|
|
13
17
|
}
|
|
14
18
|
.nut-hoverbutton-item-container-harmony:last-child {
|
|
15
19
|
margin-bottom: 0;
|
|
16
20
|
}
|
|
21
|
+
.nut-hoverbutton-item-container-icontext {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
}
|
|
26
|
+
.nut-hoverbutton-item-container-icontext .nut-icon {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 14px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
}
|
|
17
32
|
.nut-hoverbutton-item-icon {
|
|
18
33
|
width: 20px;
|
|
19
34
|
height: 20px;
|
|
20
35
|
margin: 9px;
|
|
21
|
-
color: var(--nutui-hoverbutton-item-icon-color, var(--nutui-
|
|
22
|
-
fill: var(--nutui-hoverbutton-item-icon-color, var(--nutui-
|
|
36
|
+
color: var(--nutui-hoverbutton-item-icon-color, var(--nutui-color-title, #1a1a1a));
|
|
37
|
+
fill: var(--nutui-hoverbutton-item-icon-color, var(--nutui-color-title, #1a1a1a));
|
|
23
38
|
}
|
|
24
39
|
.nut-hoverbutton-item-icon .nut-icon {
|
|
25
40
|
display: block;
|
|
26
41
|
width: 20px;
|
|
27
42
|
height: 20px;
|
|
43
|
+
font-size: 20px;
|
|
28
44
|
}
|
|
29
45
|
.nut-hoverbutton-item-container:active .nut-hoverbutton-item-icon {
|
|
30
|
-
color: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-
|
|
31
|
-
fill: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-
|
|
46
|
+
color: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-color-title, #1a1a1a));
|
|
47
|
+
fill: var(--nutui-hoverbutton-item-icon-color-active, var(--nutui-color-title, #1a1a1a));
|
|
48
|
+
}
|
|
49
|
+
.nut-hoverbutton-item-text-icon {
|
|
50
|
+
width: 14px;
|
|
51
|
+
height: 5px;
|
|
52
|
+
}
|
|
53
|
+
.nut-hoverbutton-item-text {
|
|
54
|
+
font-size: 10px;
|
|
55
|
+
margin-top: 5px;
|
|
56
|
+
line-height: 9px;
|
|
32
57
|
}
|
|
@@ -3,10 +3,11 @@ import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
|
3
3
|
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
4
4
|
import React, { useEffect, useState, useRef } from "react";
|
|
5
5
|
import Taro from "@tarojs/taro";
|
|
6
|
-
import { Video as TaroVideo,
|
|
6
|
+
import { Video as TaroVideo, View } from "@tarojs/components";
|
|
7
7
|
import classNames from "classnames";
|
|
8
8
|
import { Close } from "@nutui/icons-react-taro";
|
|
9
9
|
import Popup from "../popup/index";
|
|
10
|
+
import Image from "../image/index";
|
|
10
11
|
import Swiper from "../swiper/index";
|
|
11
12
|
import SwiperItem from "../swiperitem/index";
|
|
12
13
|
import { ComponentDefaults } from "../../utils/typings";
|
|
@@ -242,7 +243,7 @@ export var ImagePreview = function(props) {
|
|
|
242
243
|
return /*#__PURE__*/ React.createElement(SwiperItem, {
|
|
243
244
|
key: index,
|
|
244
245
|
className: "nut-imagepreview-swiper-item"
|
|
245
|
-
},
|
|
246
|
+
}, /*#__PURE__*/ React.createElement(Image, _object_spread({
|
|
246
247
|
src: src,
|
|
247
248
|
mode: "widthFix",
|
|
248
249
|
onClick: closeOnImg,
|
|
@@ -251,7 +252,7 @@ export var ImagePreview = function(props) {
|
|
|
251
252
|
}
|
|
252
253
|
}, Taro.getEnv() !== 'WEB' && {
|
|
253
254
|
showMenuByLongpress: showMenuByLongpress
|
|
254
|
-
}))
|
|
255
|
+
})));
|
|
255
256
|
}
|
|
256
257
|
return null;
|
|
257
258
|
}))), pagination ? /*#__PURE__*/ React.createElement(View, {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
+
/* #ifdef harmony */
|
|
3
|
+
/* #endif */
|
|
4
|
+
/* #ifndef harmony */
|
|
5
|
+
/* #endif */
|
|
2
6
|
.nut-overlay {
|
|
3
7
|
/* #ifdef rn */
|
|
4
8
|
position: absolute;
|
|
@@ -146,9 +150,6 @@
|
|
|
146
150
|
bottom: 0;
|
|
147
151
|
left: 0;
|
|
148
152
|
width: 100%;
|
|
149
|
-
/* #ifdef rn */
|
|
150
|
-
height: 300px;
|
|
151
|
-
/* #endif */
|
|
152
153
|
}
|
|
153
154
|
.nut-popup-bottom.nut-popup-round {
|
|
154
155
|
border-radius: var(--nutui-popup-border-radius, 24px) var(--nutui-popup-border-radius, 24px) 0 0;
|
|
@@ -673,6 +674,14 @@
|
|
|
673
674
|
justify-content: center;
|
|
674
675
|
height: 100%;
|
|
675
676
|
}
|
|
677
|
+
.nut-imagepreview-swiper .nut-imagepreview-swiper-item .nut-image,
|
|
678
|
+
.nut-imagepreview-swiper .nut-imagepreview-swiper-item .nut-video,
|
|
679
|
+
.nut-imagepreview-swiper .nut-swiper-item .nut-image,
|
|
680
|
+
.nut-imagepreview-swiper .nut-swiper-item .nut-video {
|
|
681
|
+
display: flex;
|
|
682
|
+
justify-content: center;
|
|
683
|
+
align-items: center;
|
|
684
|
+
}
|
|
676
685
|
.nut-imagepreview-swiper .nut-imagepreview-swiper-item .nut-image-preview-box,
|
|
677
686
|
.nut-imagepreview-swiper .nut-swiper-item .nut-image-preview-box {
|
|
678
687
|
width: 100%;
|