Skip to content

Commit 0b73c1e

Browse files
committed
默认面板优化
Change-Id: If7648daa4c4800fa1db66a2d7d6916b06f515490
1 parent c93d898 commit 0b73c1e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Source/LinkSDK/QCAPISets/Public/TIoTCoreDeviceSet.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,30 @@ - (void)zipData:(NSDictionary *)uiInfo baseInfo:(NSDictionary *)baseInfo deviceD
109109
}else {
110110

111111
//默认面板
112+
self.navBar = @{@"visible":@0};
113+
self.timingProject = false;
112114

113115
NSMutableArray *propertiesForUI = [NSMutableArray array];
114116
NSArray *propertiesForInfo = baseInfo[@"properties"];
115117

116118
for (NSDictionary* protovalue in propertiesForInfo) {
119+
NSString *btn_type = protovalue[@"define"][@"type"];
117120

121+
if (!([btn_type isEqualToString:@"enum"] || [btn_type isEqualToString:@"int"] || [btn_type isEqualToString:@"float"] || [btn_type isEqualToString:@"bool"])) {
122+
continue;
123+
}
118124
NSMutableDictionary *proper = [NSMutableDictionary dictionary];
119125

120126
NSString *protoid = protovalue[@"id"];
121127
[proper setValue:deviceInfo[protoid] forKey:@"status"];
122128

129+
[proper setValue:protoid forKey:@"id"];
123130
[proper setValue:protovalue[@"name"] forKey:@"name"];
124131
[proper setValue:protovalue[@"desc"] forKey:@"desc"];
125132
[proper setValue:protovalue[@"define"] forKey:@"define"];
126133

134+
[proper setValue:@{@"icon": @"create", @"type": @"btn-col-1", @"visible": @1} forKey:@"ui"];
135+
127136
[propertiesForUI addObject:proper];
128137
}
129138

0 commit comments

Comments
 (0)