clxx 2.0.8 → 2.0.9
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/README.md +34 -1
- package/build/index.d.ts +32 -32
- package/build/index.js +32 -32
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
# v2.0.
|
|
1
|
+
# v2.0.8
|
|
2
2
|
|
|
3
|
+
## 功能函数
|
|
4
|
+
|
|
5
|
+
- [`ago`](./src/Ago/index.tsx):显示多久以前
|
|
6
|
+
- [`calendarTable`](./src/utils/calendarTable.ts):创建一个月历视图的原始数据表
|
|
7
|
+
- [`Countdown`](./src/utils/Countdown.ts):倒计时器,最大可以到天
|
|
8
|
+
- [`createApp`](./src/utils/createApp.tsx):创建一个带路由的 APP 对象,这是个非常实用的功能函数
|
|
9
|
+
- [`defaultScroll`](./src/utils/defaultScroll.ts):禁用和启用默认滚动
|
|
10
|
+
- [`createPortalDOM`](./src/utils/dom.tsx):任意位置创建一个 DOM 节点,用来挂载和卸载 React 组件
|
|
11
|
+
- [`is`](./src/utils/is.ts):一些简单的环境判断
|
|
12
|
+
- [`jsonp`](./src/utils/jsonp.ts):发送一个 jsonp 请求
|
|
13
|
+
- [`GET,POST`](./src/utils/request.ts):ajax 请求的简单封装
|
|
14
|
+
- [`Tick`](./src/utils/tick.ts):嘀嗒器,每帧都会执行
|
|
15
|
+
- [`uniqKey`](./src/utils/uniqKey.ts):生成一个全局唯一的 key
|
|
16
|
+
- [`waitUntil`](./src/utils/wait.ts):执行某种检测,直接条件为真或者超时才返回
|
|
17
|
+
|
|
18
|
+
## 基础组件
|
|
19
|
+
|
|
20
|
+
- [`<Ago>`](./src/Ago/index.tsx):显示多久以前
|
|
21
|
+
- [`<AutoGrid>`](./src/AutoGrid/index.tsx):里面的对象会自动网格排列
|
|
22
|
+
- [`<CarouselNotice>`](./src/CarouselNotice/index.tsx):滚动走马灯
|
|
23
|
+
- [`<Clickable>`](./src/Clickable/index.tsx):一个可点击的对象
|
|
24
|
+
- [`<Container>`](./src/Container/index.tsx):这是一个全局容器,主要设置移动端环境,自适应等逻辑
|
|
25
|
+
- [`<Countdowner>`](./src/Countdowner/index.tsx):倒计时器
|
|
26
|
+
- [`<Row>|<RowStart>|<RowEnd>|<RowBetween>|<RowCenter>|<RowAround>|<RowEvenly>`](./src/Flex/Row.tsx):水平弹性布局
|
|
27
|
+
- [`<Col>|<ColStart>|<ColEnd>|<ColBetween>|<ColCenter>|<ColAround>|<ColEvenly>`](./src/Flex/Col.tsx):垂直弹性布局
|
|
28
|
+
- [`<Indicator>`](./src/Indicator/index.tsx):转动的菊花,用来作为Loading组件的一部分
|
|
29
|
+
- [`<Overlay>`](./src/Overlay/index.tsx):一个全屏覆盖框,会覆盖可操作区域
|
|
30
|
+
- [`<SafeArea>`](./src/SafeArea/index.tsx):这个组件会自动剔除手机的非操作区域
|
|
31
|
+
- [`<ScrollView>`](./src/ScrollView/index.tsx):滚动容器,自带原生滚动条
|
|
32
|
+
- [`showDialog`](./src/Dialog/index.tsx):函数式调用,显示一个弹框组件
|
|
33
|
+
- [`showAlert`](./src/Alert/index.tsx):函数式调用,模拟`window.alert`,但UI可定制
|
|
34
|
+
- [`showToast|showUniqToast`](./src/Toast/index.tsx):函数式调用,显示一个Toast组件
|
|
35
|
+
- [`showLoading|showLoadingAtLeast`](./src/Loading/index.tsx):函数式调用,显示一个Loading组件
|
package/build/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export { Tick } from
|
|
2
|
-
export { setContextValue, getContextValue } from
|
|
3
|
-
export { jsonp } from
|
|
4
|
-
export { uniqKey } from
|
|
5
|
-
export { ago } from
|
|
6
|
-
export { GET, POST, sendJSON, sugarSend, sendRequest, buildUrlByOption, registerHostAlias } from
|
|
7
|
-
export { calendarTable } from
|
|
8
|
-
export { Countdown } from
|
|
9
|
-
export { defaultScroll } from
|
|
10
|
-
export { is } from
|
|
11
|
-
export { waitFor, waitUntil } from
|
|
12
|
-
export { normalizeUnit, splitValue } from
|
|
13
|
-
export { createApp, history, getHistory } from
|
|
14
|
-
export { useInterval } from
|
|
15
|
-
export { useTick } from
|
|
16
|
-
export { Ago } from
|
|
17
|
-
export { Container } from
|
|
18
|
-
export { Flex, FlexItem } from
|
|
19
|
-
export { Row, RowAround, RowBetween, RowCenter, RowEnd, RowEvenly, RowStart } from
|
|
20
|
-
export { Col, ColAround, ColBetween, ColCenter, ColEnd, ColEvenly, ColStart } from
|
|
21
|
-
export { Countdowner } from
|
|
22
|
-
export { Overlay } from
|
|
23
|
-
export { showToast, showUniqToast } from
|
|
24
|
-
export { showDialog } from
|
|
25
|
-
export { Clickable } from
|
|
26
|
-
export { Indicator } from
|
|
27
|
-
export { showLoading, showLoadingAtLeast } from
|
|
28
|
-
export { SafeArea } from
|
|
29
|
-
export { AutoGrid } from
|
|
30
|
-
export { showAlert } from
|
|
31
|
-
export { ScrollView } from
|
|
32
|
-
export { CarouselNotice } from
|
|
1
|
+
export { Tick } from './utils/tick';
|
|
2
|
+
export { setContextValue, getContextValue } from './context';
|
|
3
|
+
export { jsonp } from './utils/jsonp';
|
|
4
|
+
export { uniqKey } from './utils/uniqKey';
|
|
5
|
+
export { ago } from './utils/ago';
|
|
6
|
+
export { GET, POST, sendJSON, sugarSend, sendRequest, buildUrlByOption, registerHostAlias, } from './utils/request';
|
|
7
|
+
export { calendarTable } from './utils/calendarTable';
|
|
8
|
+
export { Countdown } from './utils/Countdown';
|
|
9
|
+
export { defaultScroll } from './utils/defaultScroll';
|
|
10
|
+
export { is } from './utils/is';
|
|
11
|
+
export { waitFor, waitUntil } from './utils/wait';
|
|
12
|
+
export { normalizeUnit, splitValue, adaptive } from './utils/cssUtil';
|
|
13
|
+
export { createApp, history, getHistory } from './utils/createApp';
|
|
14
|
+
export { useInterval } from './Effect/useInterval';
|
|
15
|
+
export { useTick } from './Effect/useTick';
|
|
16
|
+
export { Ago } from './Ago';
|
|
17
|
+
export { Container } from './Container';
|
|
18
|
+
export { Flex, FlexItem } from './Flex';
|
|
19
|
+
export { Row, RowAround, RowBetween, RowCenter, RowEnd, RowEvenly, RowStart, } from './Flex/Row';
|
|
20
|
+
export { Col, ColAround, ColBetween, ColCenter, ColEnd, ColEvenly, ColStart, } from './Flex/Col';
|
|
21
|
+
export { Countdowner } from './Countdowner';
|
|
22
|
+
export { Overlay } from './Overlay';
|
|
23
|
+
export { showToast, showUniqToast } from './Toast';
|
|
24
|
+
export { showDialog } from './Dialog';
|
|
25
|
+
export { Clickable } from './Clickable';
|
|
26
|
+
export { Indicator } from './Indicator';
|
|
27
|
+
export { showLoading, showLoadingAtLeast } from './Loading';
|
|
28
|
+
export { SafeArea } from './SafeArea';
|
|
29
|
+
export { AutoGrid } from './AutoGrid';
|
|
30
|
+
export { showAlert } from './Alert';
|
|
31
|
+
export { ScrollView } from './ScrollView';
|
|
32
|
+
export { CarouselNotice } from './CarouselNotice';
|
package/build/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export { Tick } from
|
|
2
|
-
export { setContextValue, getContextValue } from
|
|
3
|
-
export { jsonp } from
|
|
4
|
-
export { uniqKey } from
|
|
5
|
-
export { ago } from
|
|
6
|
-
export { GET, POST, sendJSON, sugarSend, sendRequest, buildUrlByOption, registerHostAlias } from
|
|
7
|
-
export { calendarTable } from
|
|
8
|
-
export { Countdown } from
|
|
9
|
-
export { defaultScroll } from
|
|
10
|
-
export { is } from
|
|
11
|
-
export { waitFor, waitUntil } from
|
|
12
|
-
export { normalizeUnit, splitValue } from
|
|
13
|
-
export { createApp, history, getHistory } from
|
|
14
|
-
export { useInterval } from
|
|
15
|
-
export { useTick } from
|
|
16
|
-
export { Ago } from
|
|
17
|
-
export { Container } from
|
|
18
|
-
export { Flex, FlexItem } from
|
|
19
|
-
export { Row, RowAround, RowBetween, RowCenter, RowEnd, RowEvenly, RowStart } from
|
|
20
|
-
export { Col, ColAround, ColBetween, ColCenter, ColEnd, ColEvenly, ColStart } from
|
|
21
|
-
export { Countdowner } from
|
|
22
|
-
export { Overlay } from
|
|
23
|
-
export { showToast, showUniqToast } from
|
|
24
|
-
export { showDialog } from
|
|
25
|
-
export { Clickable } from
|
|
26
|
-
export { Indicator } from
|
|
27
|
-
export { showLoading, showLoadingAtLeast } from
|
|
28
|
-
export { SafeArea } from
|
|
29
|
-
export { AutoGrid } from
|
|
30
|
-
export { showAlert } from
|
|
31
|
-
export { ScrollView } from
|
|
32
|
-
export { CarouselNotice } from
|
|
1
|
+
export { Tick } from './utils/tick';
|
|
2
|
+
export { setContextValue, getContextValue } from './context';
|
|
3
|
+
export { jsonp } from './utils/jsonp';
|
|
4
|
+
export { uniqKey } from './utils/uniqKey';
|
|
5
|
+
export { ago } from './utils/ago';
|
|
6
|
+
export { GET, POST, sendJSON, sugarSend, sendRequest, buildUrlByOption, registerHostAlias, } from './utils/request';
|
|
7
|
+
export { calendarTable } from './utils/calendarTable';
|
|
8
|
+
export { Countdown } from './utils/Countdown';
|
|
9
|
+
export { defaultScroll } from './utils/defaultScroll';
|
|
10
|
+
export { is } from './utils/is';
|
|
11
|
+
export { waitFor, waitUntil } from './utils/wait';
|
|
12
|
+
export { normalizeUnit, splitValue, adaptive } from './utils/cssUtil';
|
|
13
|
+
export { createApp, history, getHistory } from './utils/createApp';
|
|
14
|
+
export { useInterval } from './Effect/useInterval';
|
|
15
|
+
export { useTick } from './Effect/useTick';
|
|
16
|
+
export { Ago } from './Ago';
|
|
17
|
+
export { Container } from './Container';
|
|
18
|
+
export { Flex, FlexItem } from './Flex';
|
|
19
|
+
export { Row, RowAround, RowBetween, RowCenter, RowEnd, RowEvenly, RowStart, } from './Flex/Row';
|
|
20
|
+
export { Col, ColAround, ColBetween, ColCenter, ColEnd, ColEvenly, ColStart, } from './Flex/Col';
|
|
21
|
+
export { Countdowner } from './Countdowner';
|
|
22
|
+
export { Overlay } from './Overlay';
|
|
23
|
+
export { showToast, showUniqToast } from './Toast';
|
|
24
|
+
export { showDialog } from './Dialog';
|
|
25
|
+
export { Clickable } from './Clickable';
|
|
26
|
+
export { Indicator } from './Indicator';
|
|
27
|
+
export { showLoading, showLoadingAtLeast } from './Loading';
|
|
28
|
+
export { SafeArea } from './SafeArea';
|
|
29
|
+
export { AutoGrid } from './AutoGrid';
|
|
30
|
+
export { showAlert } from './Alert';
|
|
31
|
+
export { ScrollView } from './ScrollView';
|
|
32
|
+
export { CarouselNotice } from './CarouselNotice';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clxx",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Basic JS library for mobile devices",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"module": "./build/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "tsc -w --pretty",
|
|
12
|
-
"build": "rm -rfv ./build && tsc"
|
|
12
|
+
"build": "rm -rfv ./build && tsc",
|
|
13
|
+
"pub": "npm run build && npm publish"
|
|
13
14
|
},
|
|
14
15
|
"repository": {
|
|
15
16
|
"type": "git",
|