fmui-base 2.0.10 → 2.0.11

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/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.0.11: 上传附件图标更新
6
7
  - 2.0.10: 流程表单子表新增按钮样式修改
7
8
  - 2.0.9: 党建流程二开功能支持修改;选人组件岗位切换问题修改
8
9
  - 2.0.8: 上传组件冒泡事件问题修复
@@ -161,17 +161,18 @@ var PageHome = function (_React$Component) {
161
161
  } else {
162
162
  key = module + '_helpNew_' + userId;
163
163
  }
164
- dd.util.domainStorage.getItem({ //点击帮助页面
165
- name: key, // 存储信息的key值
166
- onSuccess: function onSuccess(info) {
167
- var helpNew = info.value;
168
- if (typeof helpNew != 'undefined' && helpNew != '') {
169
- iconIndex = 1;
170
- }
171
- t.initButton(iconIndex);
172
- },
173
- onFail: function onFail(err) {}
174
- });
164
+ // dd.util.domainStorage.getItem({ //点击帮助页面
165
+ // name:key , // 存储信息的key值
166
+ // onSuccess : function(info) {
167
+ // let helpNew = info.value;
168
+ // if( typeof(helpNew) != 'undefined' && helpNew != '' ){
169
+ // iconIndex = 1;
170
+ // }
171
+ // t.initButton(iconIndex);
172
+ // },
173
+ // onFail : function(err) {
174
+ // }
175
+ // });
175
176
  return _this;
176
177
  }
177
178
  //初始化按钮
@@ -182,32 +183,34 @@ var PageHome = function (_React$Component) {
182
183
  value: function initButton(iconIndex) {
183
184
  var t = this;
184
185
  //设置帮助
185
- dd.biz.navigation.setIcon({
186
- showIcon: false, //是否显示icon
187
- iconIndex: iconIndex, //显示的iconIndex,如上图
188
- onSuccess: function onSuccess(result) {
189
- var key = "";
190
- var project = t.state.project;
191
- if (project == 'mobileportal') {
192
- //如果项目是首页
193
- key = 'hospitalmanage';
194
- } else {
195
- key = t.state.module;
196
- }
197
- location.hash = key + '/help_index';
198
- },
199
- onFail: function onFail(err) {}
200
- });
201
- dd.biz.navigation.setTitle({
202
- title: '批量办理', //控制标题文本,空字符串表示显示默认文本
203
- onSuccess: function onSuccess(result) {},
204
- onFail: function onFail(err) {}
205
- });
206
- dd.biz.navigation.setRight({
207
- show: false, //控制按钮显示, true 显示, false 隐藏, 默认true
208
- onSuccess: function onSuccess(result) {},
209
- onFail: function onFail(err) {}
210
- });
186
+ // dd.biz.navigation.setIcon({
187
+ // showIcon : false,//是否显示icon
188
+ // iconIndex : iconIndex,//显示的iconIndex,如上图
189
+ // onSuccess : function(result) {
190
+ // var key = "";
191
+ // var project = t.state.project;
192
+ // if(project=='mobileportal'){//如果项目是首页
193
+ // key = 'hospitalmanage';
194
+ // }else{
195
+ // key = t.state.module;
196
+ // }
197
+ // location.hash=key+'/help_index';
198
+ // },
199
+ // onFail : function(err) {
200
+ // }
201
+ // });
202
+ // dd.biz.navigation.setTitle({
203
+ // title : '批量办理',//控制标题文本,空字符串表示显示默认文本
204
+ // onSuccess : function(result) {
205
+ // },
206
+ // onFail : function(err) {}
207
+ // });
208
+ // dd.biz.navigation.setRight({
209
+ // show: false,//控制按钮显示, true 显示, false 隐藏, 默认true
210
+ // onSuccess : function(result) {
211
+ // },
212
+ // onFail : function(err) {}
213
+ // });
211
214
  }
212
215
  }, {
213
216
  key: 'componentDidMount',
@@ -448,17 +448,19 @@ var PageHome = function (_React$Component) {
448
448
  key = module + '_helpNew_' + userId;
449
449
  }
450
450
 
451
- dd.util.domainStorage.getItem({ //点击帮助页面
452
- name: key, // 存储信息的key值
453
- onSuccess: function onSuccess(info) {
454
- var helpNew = info.value;
455
- if (typeof helpNew != 'undefined' && helpNew != '') {
456
- iconIndex = 1;
457
- }
458
- t.initButton(iconIndex);
459
- },
460
- onFail: function onFail(err) {}
461
- });
451
+ // dd.util.domainStorage.getItem({ //点击帮助页面
452
+ // name:key , // 存储信息的key值
453
+ // onSuccess : function(info) {
454
+ // let helpNew = info.value;
455
+ // if( typeof(helpNew) != 'undefined' && helpNew != '' ){
456
+ // iconIndex = 1;
457
+ // }
458
+ // t.initButton(iconIndex);
459
+ // },
460
+ // onFail : function(err) {
461
+ // }
462
+ // });
463
+
462
464
 
463
465
  // this.addBackListener();
464
466
  return _this;
@@ -421,7 +421,9 @@ var PageHome = function (_React$Component2) {
421
421
 
422
422
  setPageTitle('办理');
423
423
  // 禁用iOS弹性事件
424
- dd.ui.webViewBounce.disable();
424
+ if (navigator.userAgent.indexOf('DingTalk') > -1) {
425
+ dd.ui.webViewBounce.disable();
426
+ }
425
427
  //获取内容显示区域高度
426
428
  var hasBottomTabHidden = document.getElementById("hasBottomTab") ? document.getElementById("hasBottomTab").value : "0";
427
429
  var hasBottomTab = props.hasBottomTab ? props.hasBottomTab : hasBottomTabHidden;
@@ -41,6 +41,56 @@ var PageHome = function (_React$Component) {
41
41
 
42
42
  var _this = _possibleConstructorReturn(this, (PageHome.__proto__ || Object.getPrototypeOf(PageHome)).call(this, props));
43
43
 
44
+ _this.getIcon = function (filetype) {
45
+ var currentFileName = '';
46
+ if (filetype == '.dps') {
47
+ currentFileName = 'iconfont icon-DPS iconfont-fontsize';
48
+ } else if (filetype == '.xls' || filetype == '.xlsx') {
49
+ currentFileName = 'iconfont icon-XLS iconfont-fontsize';
50
+ } else if (filetype == '.doc' || filetype == '.docx') {
51
+ currentFileName = 'iconfont icon-DOC iconfont-fontsize';
52
+ } else if (filetype == ".et") {
53
+ currentFileName = 'iconfont icon-ET iconfont-fontsize';
54
+ } else if (filetype == ".ofd") {
55
+ currentFileName = 'iconfont icon-OFD iconfont-fontsize';
56
+ } else if (filetype == ".wps") {
57
+ currentFileName = 'iconfont icon-WPS iconfont-fontsize';
58
+ } else if (filetype == ".zip") {
59
+ currentFileName = 'iconfont icon-ZIP iconfont-fontsize';
60
+ } else if (filetype == ".txt") {
61
+ currentFileName = 'iconfont icon-TXT iconfont-fontsize';
62
+ } else if (filetype == ".tif") {
63
+ currentFileName = 'iconfont icon-TIF iconfont-fontsize';
64
+ } else if (filetype == ".swf") {
65
+ currentFileName = 'iconfont icon-SWF iconfont-fontsize';
66
+ } else if (filetype == ".rar") {
67
+ currentFileName = 'iconfont icon-RAR iconfont-fontsize';
68
+ } else if (filetype == '.ppt' || filetype == '.pptx') {
69
+ currentFileName = 'iconfont icon-PPT iconfont-fontsize';
70
+ } else if (filetype == ".mp3") {
71
+ currentFileName = 'iconfont icon-MP3 iconfont-fontsize';
72
+ } else if (filetype == ".mp4") {
73
+ currentFileName = 'iconfont icon-MP4 iconfont-fontsize';
74
+ } else if (filetype == ".pdf") {
75
+ currentFileName = 'iconfont icon-PDF iconfont-fontsize';
76
+ } else if (filetype == ".mov") {
77
+ currentFileName = 'iconfont icon-MOV iconfont-fontsize';
78
+ } else if (filetype == ".gif") {
79
+ currentFileName = 'iconfont icon-GIF iconfont-fontsize';
80
+ } else if (filetype == ".flv") {
81
+ currentFileName = 'iconfont icon-FLV iconfont-fontsize';
82
+ } else if (filetype == ".exe") {
83
+ currentFileName = 'iconfont icon-EXE iconfont-fontsize';
84
+ } else if (filetype == ".avi") {
85
+ currentFileName = 'iconfont icon-AVI iconfont-fontsize';
86
+ } else if (filetype == ".7z") {
87
+ currentFileName = 'iconfont icon-7Z iconfont-fontsize';
88
+ } else {
89
+ currentFileName = 'iconfont icon-file2 iconfont-fontsize';
90
+ }
91
+ return currentFileName;
92
+ };
93
+
44
94
  var label = props.label;
45
95
  if (!label) {
46
96
  label = '';
@@ -550,10 +600,13 @@ var PageHome = function (_React$Component) {
550
600
  }
551
601
  }
552
602
 
553
- //加载文件列表
603
+ // 文件图标
554
604
 
555
605
  }, {
556
606
  key: 'render',
607
+
608
+ //加载文件列表
609
+
557
610
  value: function render() {
558
611
  var _this3 = this;
559
612
 
@@ -621,7 +674,7 @@ var PageHome = function (_React$Component) {
621
674
  _react2.default.createElement(
622
675
  'div',
623
676
  { className: 'upload-name-icon' },
624
- _react2.default.createElement('i', { className: 'iconfont icon-PDF' }),
677
+ _react2.default.createElement('i', { className: _this3.getIcon(item.fileExt) }),
625
678
  _react2.default.createElement(
626
679
  'div',
627
680
  { className: 't-list-title t-omit t-LH1_4' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",