|
- var dataPath = "widget://res/cityList.json";
- var title = "输入城市名或首字母查询";
- var city;
- var UICityList = api.require('UICityList');
- UICityList.open({
- rect: {
- x: 0,
- y: 0,
- w: api.frameWidth,
- h: api.frameHeight
- },
- resource: dataPath,
- styles: {
- searchBar: {
- bgColor: '#eee',
- cancelColor: '#E3E3E3'
- },
- location: {
- color: '#696969',
- size: 12
- },
- sectionTitle: {
- bgColor: '#eee',
- color: '#000',
- size: 12
- },
- item: {
- bgColor: '#fff',
- activeBgColor: '#696969',
- color: '#000',
- size: 14,
- height: 40
- },
- indicator: {
- bgColor: '#fff',
- color: '#696969'
- }
- },
- currentCity: city,
- locationWay: 'GPS',
- fixedOn: api.frameName,
- placeholder: title
- }, function(ret, err) {
-
- });
复制代码 |
|