Skip to content

Commit f5b830e

Browse files
committed
Merge branch xb-plugin into SDK_10029
Xb plugin See merge request !123 refer
1 parent f655405 commit f5b830e

File tree

6 files changed

+571
-539
lines changed

6 files changed

+571
-539
lines changed

bin/config/transformer.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

miot-sdk/service/smarthome.js

-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ export default {
125125
getProtocolUrls(params) {
126126
return new Promise((resolve, reject) => {
127127
native.MIOTRPC.standardCall("/v2/plugin/get_protocol", params, (ok, res) => {
128-
console.log(111, ok, res);
129128
if(ok) {
130129
return resolve(res);
131130
}

miot-sdk/ui/ContainerWithGap.js

+22-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,26 @@ class GapWrap extends PureComponent {
1919
}
2020
let gapSize = shown ? gap : 0;
2121
return (
22-
<View style={[StylesGap.container, {
23-
[horizontal ? 'marginRight' : 'marginBottom']: gapSize
24-
}, horizontal ? {
25-
flex: 1
26-
} : null]} onLayout={this.onLayout}>
27-
{children}
28-
</View>
22+
<Fragment>
23+
<View style={horizontal ? {
24+
flex: 1
25+
} : null}>
26+
{children}
27+
</View>
28+
<View style={[StylesGap.gap, {
29+
[horizontal ? 'width' : 'height']: gapSize
30+
}]}></View>
31+
</Fragment>
2932
);
33+
// return (
34+
// <View style={[StylesGap.container, {
35+
// [horizontal ? 'marginRight' : 'marginBottom']: gapSize
36+
// }, horizontal ? {
37+
// flex: 1
38+
// } : null]} onLayout={this.onLayout}>
39+
// {children}
40+
// </View>
41+
// );
3042
}
3143
}
3244
export default class ContainerWithGap extends PureComponent {
@@ -78,5 +90,7 @@ const Styles = StyleSheet.create({
7890
container: {}
7991
});
8092
const StylesGap = StyleSheet.create({
81-
container: {}
93+
gap: {
94+
alignSelf: 'stretch'
95+
}
8296
});

miot-sdk/ui/ContainerWithShadowAndSeparator.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, {PureComponent, Fragment} from 'react';
1+
import React, {Component, PureComponent, Fragment} from 'react';
22
import {StyleSheet, View, Text} from 'react-native';
33
import PropTypes from 'prop-types';
44
import Separator from './Separator';
55
import {adjustSize} from '../utils/sizes';
6-
class GapWrap extends PureComponent {
6+
class GapWrap extends Component {
77
state = {
88
shown: true
99
};
@@ -28,7 +28,7 @@ class GapWrap extends PureComponent {
2828
);
2929
}
3030
}
31-
export default class ContainerWithShadowAndSeparator extends PureComponent {
31+
export default class ContainerWithShadowAndSeparator extends Component {
3232
static propTypes = {
3333
containerStyle: PropTypes.any,
3434
separatorStyle: PropTypes.any,

0 commit comments

Comments
 (0)