@aks-dev/easyui 1.2.0 → 1.2.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/EchartsView/helper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../src/components/EchartsView/helper.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,OAAO,GAAI,OAAO;IAAE,eAAe,EAAE,GAAG,CAAA;CAAE,WAoCtD,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,WAiBnC,CAAC"}
|
|
@@ -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/6.0.0/echarts.min.js"></script>
|
|
36
36
|
</head>
|
|
37
37
|
|
|
38
38
|
<body style="background-color:${props.backgroundColor}">
|
|
@@ -50,15 +50,18 @@ export const getHtml = (props) => {
|
|
|
50
50
|
export const toString = (obj) => {
|
|
51
51
|
let result = JSON.stringify(obj, function (key, val) {
|
|
52
52
|
// 对function进行特殊处理
|
|
53
|
-
if (typeof val ===
|
|
53
|
+
if (typeof val === "function") {
|
|
54
54
|
return `~ha~${val}~ha~`;
|
|
55
55
|
}
|
|
56
56
|
return val;
|
|
57
57
|
});
|
|
58
58
|
// 再进行还原
|
|
59
59
|
do {
|
|
60
|
-
result = result
|
|
61
|
-
|
|
60
|
+
result = result
|
|
61
|
+
.replace('\"~ha~', "")
|
|
62
|
+
.replace('~ha~\"', "")
|
|
63
|
+
.replace(/\\\"/g, '"'); //最后一个replace将release模式中莫名生成的\"转换成"
|
|
64
|
+
} while (result.indexOf("~ha~") >= 0);
|
|
62
65
|
return result;
|
|
63
66
|
};
|
|
64
67
|
///.replace(/\\n/g, '')
|
|
@@ -9,6 +9,7 @@ import * as React from "react";
|
|
|
9
9
|
import { Image, View, StyleSheet, Keyboard, TouchableOpacity, Text, } from "react-native";
|
|
10
10
|
import { px2dp } from "../../screen/px2dp";
|
|
11
11
|
import { px2sp } from "../../screen/px2sp";
|
|
12
|
+
import SYImagePicker from "@aks-dev/react-native-syan-image-picker";
|
|
12
13
|
let icon_add_image = require("./assets/icon_add_image.png");
|
|
13
14
|
let icon_del_image = require("./assets/icon_del_image.png");
|
|
14
15
|
const MutiPictureView = (props) => {
|
|
@@ -22,46 +23,41 @@ const MutiPictureView = (props) => {
|
|
|
22
23
|
if (!images) {
|
|
23
24
|
throw new Error("viewModel没有定义photos字段");
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// console.log("打开相机失败");
|
|
61
|
-
// }
|
|
62
|
-
// },
|
|
63
|
-
// );
|
|
64
|
-
// }
|
|
26
|
+
if (type == "showImagePicker") {
|
|
27
|
+
SYImagePicker.showImagePicker({
|
|
28
|
+
imageCount: maxCount - (viewModel.photos?.length || 0),
|
|
29
|
+
isCrop: false,
|
|
30
|
+
isRecordSelected: false,
|
|
31
|
+
quality: 20,
|
|
32
|
+
}, (err, photos) => {
|
|
33
|
+
if (!err) {
|
|
34
|
+
let imgs = photos.map((it) => {
|
|
35
|
+
return { uri: it.uri };
|
|
36
|
+
});
|
|
37
|
+
images = images.concat(imgs);
|
|
38
|
+
setViewModel({ photos: images });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (type == "openCamera") {
|
|
43
|
+
SYImagePicker.openCamera({
|
|
44
|
+
imageCount: maxCount - (viewModel.photos?.length || 0),
|
|
45
|
+
isCrop: false,
|
|
46
|
+
isRecordSelected: false,
|
|
47
|
+
quality: 20,
|
|
48
|
+
}, (err, photos) => {
|
|
49
|
+
if (!err) {
|
|
50
|
+
let imgs = photos.map((it) => {
|
|
51
|
+
return { uri: it.uri };
|
|
52
|
+
});
|
|
53
|
+
images = images.concat(imgs);
|
|
54
|
+
setViewModel({ photos: images });
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
console.log("打开相机失败");
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
65
61
|
};
|
|
66
62
|
const deletePhoto = (index) => {
|
|
67
63
|
Keyboard.dismiss();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aks-dev/easyui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "工具箱",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -51,7 +51,8 @@
|
|
|
51
51
|
"react-native": "*",
|
|
52
52
|
"react-native-permissions": "*",
|
|
53
53
|
"react-native-vision-camera": "*",
|
|
54
|
-
"react-native-webview": "*"
|
|
54
|
+
"react-native-webview": "*",
|
|
55
|
+
"@aks-dev/react-native-syan-image-picker": "*"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"echarts": "^6.0.0",
|
|
@@ -66,7 +67,8 @@
|
|
|
66
67
|
"react-native": "^0.84.1",
|
|
67
68
|
"react-native-permissions": "^5.5.1",
|
|
68
69
|
"react-native-vision-camera": "^4.7.3",
|
|
69
|
-
"react-native-webview": "^13.16.1"
|
|
70
|
+
"react-native-webview": "^13.16.1",
|
|
71
|
+
"@aks-dev/react-native-syan-image-picker": "^1.0.1"
|
|
70
72
|
},
|
|
71
73
|
"resolutions": {
|
|
72
74
|
"@types/react": "*"
|