@aks-dev/easyui 1.2.19 → 1.2.28
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/components/Antd/Flex.d.ts.map +1 -1
- package/dist/components/Antd/Flex.js +16 -14
- package/dist/components/Antd/WhiteSpace.js +6 -6
- package/dist/components/Antd/WingBlank.js +6 -6
- package/dist/components/EchartsView/EchartsView.js +1 -1
- package/dist/components/EchartsView/helper.js +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Antd/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACT,SAAS,
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/components/Antd/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,SAAS,EACT,SAAS,EAGV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,KAAK,GAAG,aAAa,GAAG,QAAQ,GAAG,gBAAgB,CAAC;IAChE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACvE,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,SAAU,SAAQ,aAAa;IAC9C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAkBD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,SAAS,qBAgC5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TouchableOpacity, StyleSheet, } from "react-native";
|
|
1
|
+
import { TouchableOpacity, StyleSheet, View, } from "react-native";
|
|
2
2
|
import React from "react";
|
|
3
3
|
const justifyDict = {
|
|
4
4
|
start: "flex-start",
|
|
@@ -17,22 +17,24 @@ const alignDict = {
|
|
|
17
17
|
};
|
|
18
18
|
// 自定义 Flex 组件
|
|
19
19
|
export default function Flex(props) {
|
|
20
|
-
const { direction, justify, align, wrap, style, children, activeOpacity = 1, ...rest } = props;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
const { direction = "row", justify = "start", align = "center", wrap = "nowrap", style, children, activeOpacity = 1, ...rest } = props;
|
|
21
|
+
const flexStyle = {
|
|
22
|
+
flexDirection: direction,
|
|
23
|
+
justifyContent: justify && justifyDict[justify],
|
|
24
|
+
alignItems: align && alignDict[align],
|
|
25
|
+
flexWrap: wrap,
|
|
26
|
+
};
|
|
27
|
+
let Component = View;
|
|
28
|
+
const shouldWrapInTouchableComponent = rest.onPress || rest.onLongPress || rest.onPressIn || rest.onPressOut;
|
|
29
|
+
if (shouldWrapInTouchableComponent) {
|
|
30
|
+
Component = TouchableOpacity;
|
|
31
|
+
}
|
|
32
|
+
return (<Component activeOpacity={activeOpacity} style={[styles.flex, flexStyle, style]} {...rest}>
|
|
31
33
|
{children}
|
|
32
|
-
</
|
|
34
|
+
</Component>);
|
|
33
35
|
}
|
|
34
36
|
const styles = StyleSheet.create({
|
|
35
37
|
flex: {
|
|
36
|
-
|
|
38
|
+
// display: "flex", // RN 默认就是 flex,可省略
|
|
37
39
|
},
|
|
38
40
|
});
|
|
@@ -2,12 +2,12 @@ import { View } from "react-native";
|
|
|
2
2
|
export default function WhiteSpace({ size = "md", horizontal = false, style, }) {
|
|
3
3
|
// 内置间距
|
|
4
4
|
const spaceMap = {
|
|
5
|
-
xs:
|
|
6
|
-
sm:
|
|
7
|
-
md:
|
|
8
|
-
lg:
|
|
9
|
-
xl:
|
|
10
|
-
xxl:
|
|
5
|
+
xs: 3,
|
|
6
|
+
sm: 6,
|
|
7
|
+
md: 9,
|
|
8
|
+
lg: 15,
|
|
9
|
+
xl: 21,
|
|
10
|
+
xxl: 33,
|
|
11
11
|
};
|
|
12
12
|
const space = typeof size === "number" ? size : (spaceMap[size] ?? 12);
|
|
13
13
|
return (<View style={[
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { View } from "react-native";
|
|
2
|
-
export default function WingBlank({ size = "
|
|
2
|
+
export default function WingBlank({ size = "lg", style, children, }) {
|
|
3
3
|
const blankMap = {
|
|
4
|
-
xs:
|
|
5
|
-
sm:
|
|
6
|
-
md:
|
|
7
|
-
lg:
|
|
8
|
-
xl:
|
|
4
|
+
xs: 2,
|
|
5
|
+
sm: 5,
|
|
6
|
+
md: 8,
|
|
7
|
+
lg: 15,
|
|
8
|
+
xl: 28,
|
|
9
9
|
};
|
|
10
10
|
const padding = typeof size === "number" ? size : (blankMap[size] ?? 12);
|
|
11
11
|
return (<View style={[
|
|
@@ -32,7 +32,7 @@ export const getHtml = (props) => {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
</style>
|
|
35
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/echarts/
|
|
35
|
+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.4.3/echarts.min.js"></script>
|
|
36
36
|
</head>
|
|
37
37
|
|
|
38
38
|
<body style="background-color:${props.backgroundColor}">
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aks-dev/easyui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.28",
|
|
4
4
|
"description": "工具箱",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"import": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts"
|
|
9
|
-
}
|
|
9
|
+
},
|
|
10
|
+
"./screen/text-fit": "./dist/screen/text-fit.js"
|
|
10
11
|
},
|
|
11
12
|
"scripts": {
|
|
12
13
|
"test": "yarn run lint",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"@aks-dev/react-native-syan-image-picker": "*"
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"echarts": "
|
|
60
|
+
"echarts": "5.4.3",
|
|
60
61
|
"react-native-image-zoom-viewer": "^3.0.1",
|
|
61
62
|
"react-native-modal": "^14.0.0-rc.1",
|
|
62
63
|
"react-native-smart-refresh": "^1.1.6",
|