fmui-base 2.1.23 → 2.1.25

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,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.1.25:上传组件参数加密
7
+ - 2.1.24:表单字段下拉多选字段有默认值时报错
6
8
  - 2.1.23:上传组件参数加密
7
9
  - 2.1.22:上传组件去token
8
10
  - 2.1.21:表单组件去token
package/lib/form/form.js CHANGED
@@ -761,7 +761,6 @@ var PageHome = function (_React$Component) {
761
761
  //下拉选择
762
762
  var selectItem = form.multiItems; //选项
763
763
  isVerifySingValue = value;
764
-
765
764
  if (form.dataAttr && form.dataAttr.selectClass && form.dataAttr.selectClass == "2") {
766
765
  //当多选时只显示
767
766
  itemParam.itemType = "checkbox";
@@ -770,32 +769,41 @@ var PageHome = function (_React$Component) {
770
769
  var selectOptions = [];
771
770
  if (value) {
772
771
  var valueArray = [];
773
- if (valueArray.indexOf("[") >= 0) {
774
- valueArray = JSON.parse(value);
772
+ // if(valueArray.indexOf("[")>=0){
773
+ // valueArray = JSON.parse(value);
774
+ // }else{
775
+ // valueArray.push(value);
776
+ // }
777
+ if (status == '0') {
778
+ selectItem.map(function (selectI) {
779
+ if (selectI.isDefault == 1) {
780
+ valueArray.push(selectI.value);
781
+ }
782
+ });
775
783
  } else {
776
- valueArray.push(value);
784
+ if (value.indexOf("[") >= 0) {
785
+ valueArray = JSON.parse(value);
786
+ }
777
787
  }
778
- var valueArray = JSON.parse(value);
779
788
  selectItem.map(function (selectI) {
780
- valueArray.map(function (item) {
781
- if (typeof selectI.state == 'undefined' || selectI.state == "1" || selectI.state == "0" && readOnly == true) {
782
- if (selectI.value == item) {
783
- var option = {};
784
- option.value = selectI.value;
785
- option.text = selectI.name;
786
- option.disable = false;
787
- option.checked = true;
788
- selectOptions.push(option);
789
- } else {
790
- var option = {};
791
- option.value = selectI.value;
792
- option.text = selectI.name;
793
- option.disable = false;
794
- option.checked = false;
795
- selectOptions.push(option);
796
- }
789
+ if (typeof selectI.state == 'undefined' || selectI.state == "1" || selectI.state == "0" && readOnly == true) {
790
+ if (valueArray.indexOf(selectI.value) != -1) {
791
+ var option = {};
792
+ option.value = selectI.value;
793
+ option.text = selectI.name;
794
+ option.disable = false;
795
+ option.checked = true;
796
+ selectOptions.push(option);
797
+ } else {
798
+ var option = {};
799
+ option.value = selectI.value;
800
+ option.text = selectI.name;
801
+ option.disable = false;
802
+ option.checked = false;
803
+ selectOptions.push(option);
797
804
  }
798
- });
805
+ }
806
+
799
807
  // showValue+=","+item;
800
808
  });
801
809
 
@@ -834,6 +842,12 @@ var PageHome = function (_React$Component) {
834
842
  }
835
843
  itemParam.selectOptions = selectOptions;
836
844
  itemParam.selectItem = selectOptions;
845
+ var mainTblData = data.mainTblData;
846
+ mainTblData.map(function (item, index) {
847
+ if (item.key == key) {
848
+ item.value = JSON.stringify(valueArray);
849
+ }
850
+ });
837
851
  } else {
838
852
  var selectOptions = [];
839
853
  if (selectItem) {
@@ -188,7 +188,7 @@ var PageHome = function (_React$Component) {
188
188
 
189
189
 
190
190
  var dir = props.dir;
191
- var businessExt = props.extensions;
191
+ var businessExt = props.extensions ? props.extensions : "";
192
192
  var context = document.getElementById("context").value;
193
193
  var token = getLoginUserInfo().token;
194
194
  _this.state = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.23",
3
+ "version": "2.1.25",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",