clxx 2.1.8 → 3.0.0
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/AGENTS.md +2 -1
- package/README.md +147 -22
- package/build/Alert/Wrapper.js +4 -3
- package/build/Alert/style.js +11 -7
- package/build/AutoGrid/index.js +21 -15
- package/build/CarouselNotice/index.d.ts +19 -11
- package/build/CarouselNotice/index.js +80 -74
- package/build/CarouselNotice/style.js +14 -4
- package/build/CitySelect/index.js +30 -55
- package/build/CitySelect/style.js +22 -56
- package/build/Clickable/index.js +7 -0
- package/build/Container/index.d.ts +12 -4
- package/build/Container/index.js +94 -89
- package/build/Countdowner/index.js +4 -2
- package/build/DatePicker/Column.d.ts +9 -0
- package/build/DatePicker/Column.js +330 -0
- package/build/DatePicker/index.d.ts +32 -0
- package/build/DatePicker/index.js +230 -0
- package/build/DatePicker/style.d.ts +6 -0
- package/build/DatePicker/style.js +130 -0
- package/build/Dialog/Wrapper.d.ts +0 -1
- package/build/Dialog/Wrapper.js +22 -12
- package/build/Dialog/index.d.ts +7 -1
- package/build/Dialog/index.js +57 -32
- package/build/Dialog/style.js +6 -2
- package/build/Effect/useInterval.js +6 -3
- package/build/Fixed/index.js +13 -22
- package/build/Flex/FlexItem.d.ts +11 -0
- package/build/Flex/FlexItem.js +26 -0
- package/build/Flex/index.d.ts +2 -10
- package/build/Flex/index.js +12 -22
- package/build/Indicator/index.d.ts +9 -6
- package/build/Indicator/index.js +34 -37
- package/build/Indicator/style.d.ts +4 -3
- package/build/Indicator/style.js +8 -13
- package/build/Loading/Wrapper.js +2 -1
- package/build/Loading/style.js +9 -12
- package/build/Overlay/index.js +6 -1
- package/build/RegionPicker/data.d.ts +6 -0
- package/build/RegionPicker/data.js +14486 -0
- package/build/RegionPicker/index.d.ts +33 -0
- package/build/RegionPicker/index.js +205 -0
- package/build/RegionPicker/style.d.ts +4 -0
- package/build/RegionPicker/style.js +187 -0
- package/build/SafeArea/index.js +14 -17
- package/build/ScrollView/index.d.ts +23 -11
- package/build/ScrollView/index.js +132 -118
- package/build/ScrollView/style.d.ts +1 -1
- package/build/ScrollView/style.js +33 -22
- package/build/Toast/Toast.d.ts +0 -1
- package/build/Toast/Toast.js +6 -4
- package/build/Toast/style.d.ts +3 -7
- package/build/Toast/style.js +33 -41
- package/build/index.d.ts +3 -0
- package/build/index.js +7 -1
- package/build/utils/color.d.ts +5 -0
- package/build/utils/color.js +18 -0
- package/build/utils/dom.js +4 -3
- package/build/utils/theme.d.ts +2 -0
- package/build/utils/theme.js +7 -0
- package/package.json +1 -1
- package/test/src/date-picker/index.jsx +119 -0
- package/test/src/index/index.jsx +2 -0
- package/test/src/index.jsx +1 -0
- package/test/src/loading/index.jsx +2 -2
- package/test/src/region-picker/index.jsx +120 -0
- package/test/src/scrollview/BasicSection.jsx +56 -0
- package/test/src/scrollview/CustomLoadingSection.jsx +53 -0
- package/test/src/scrollview/HeightModeSection.jsx +42 -0
- package/test/src/scrollview/ImperativeSection.jsx +56 -0
- package/test/src/scrollview/NotScrollableSection.jsx +32 -0
- package/test/src/scrollview/PerfSection.jsx +34 -0
- package/test/src/scrollview/index.css +92 -8
- package/test/src/scrollview/index.jsx +13 -45
|
@@ -1,52 +1,20 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import BasicSection from "./BasicSection";
|
|
3
|
+
import ImperativeSection from "./ImperativeSection";
|
|
4
|
+
import CustomLoadingSection from "./CustomLoadingSection";
|
|
5
|
+
import NotScrollableSection from "./NotScrollableSection";
|
|
6
|
+
import PerfSection from "./PerfSection";
|
|
7
|
+
import HeightModeSection from "./HeightModeSection";
|
|
4
8
|
|
|
5
9
|
export default function Index() {
|
|
6
|
-
const [list, setList] = useState([1]);
|
|
7
|
-
const isLoading = useRef(false);
|
|
8
|
-
const [showLoading, setShowLoading] = useState(true);
|
|
9
|
-
|
|
10
|
-
const loadMore = async () => {
|
|
11
|
-
if (!showLoading) return;
|
|
12
|
-
|
|
13
|
-
isLoading.current = true;
|
|
14
|
-
return new Promise((resolve) => {
|
|
15
|
-
window.setTimeout(() => {
|
|
16
|
-
const num = list.length + 1;
|
|
17
|
-
list.push(num);
|
|
18
|
-
setList([...list]);
|
|
19
|
-
resolve();
|
|
20
|
-
isLoading.current = false;
|
|
21
|
-
if (num > 5) {
|
|
22
|
-
setShowLoading(false);
|
|
23
|
-
}
|
|
24
|
-
}, 800);
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
|
|
28
10
|
return (
|
|
29
|
-
<div className="
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!isLoading.current) {
|
|
37
|
-
loadMore();
|
|
38
|
-
}
|
|
39
|
-
}}
|
|
40
|
-
showLoading={showLoading}
|
|
41
|
-
>
|
|
42
|
-
{list.map((item, index) => {
|
|
43
|
-
return (
|
|
44
|
-
<div className="content" key={index}>
|
|
45
|
-
{item}
|
|
46
|
-
</div>
|
|
47
|
-
);
|
|
48
|
-
})}
|
|
49
|
-
</ScrollView>
|
|
11
|
+
<div className="scrollview-demo">
|
|
12
|
+
<BasicSection />
|
|
13
|
+
<ImperativeSection />
|
|
14
|
+
<CustomLoadingSection />
|
|
15
|
+
<NotScrollableSection />
|
|
16
|
+
<PerfSection />
|
|
17
|
+
<HeightModeSection />
|
|
50
18
|
</div>
|
|
51
19
|
);
|
|
52
20
|
}
|