@zscreate/zhxy-app-component 1.0.304 → 1.0.305

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.
@@ -510,7 +510,8 @@
510
510
  <view class="evan-form-item-container__main " :style="mContentStyle" style="width: 100%;box-sizing: border-box">
511
511
  <rich-text v-if="widget.options.disabled" :nodes="dataModel" style="width: 100%;"></rich-text>
512
512
  <richEditor v-else v-model="dataModel" :widget="widget"
513
- :maxLength="widget.options.wordLimits ? widget.options.maxLength : 0" style="width: 100%;">
513
+ :maxLength="widget.options.wordLimits ? widget.options.maxLength : 0" style="width: 100%;"
514
+ ref="richEditor">
514
515
  </richEditor>
515
516
  </view>
516
517
  </view>
@@ -1487,9 +1488,9 @@ export default {
1487
1488
  let arr = res.result
1488
1489
  global.dictData[this.widget.model] = arr.map(item => {
1489
1490
  return {
1490
- value: item.dataValue || item.id,
1491
- label: item.dataKey || item.departName,
1492
- text: item.dataKey || item.departName
1491
+ value: item.dataKey || item.id,
1492
+ label: item.dataValue || item.departName,
1493
+ text: item.dataValue || item.departName
1493
1494
  }
1494
1495
  })
1495
1496
  if (this.widget.type == 'select') {
@@ -195,6 +195,15 @@ export const pubSubMixin = {
195
195
  }else if(this.widget.type == "hnkj-richEditor"){
196
196
  if(typeof data.updateValue == "string"){
197
197
  this.dataModel = data.updateValue;
198
+ this.$refs.richEditor.formLinkSetContents(this.dataModel);
199
+ }
200
+ }else if(this.widget.type == "slider"){
201
+ if(data.updateValue*1 >= this.widget.options.max){
202
+ this.dataModel = this.widget.options.max;
203
+ }else if(data.updateValue*1 <= this.widget.options.min){
204
+ this.dataModel = this.widget.options.min;
205
+ }else{
206
+ this.dataModel = data.updateValue;
198
207
  }
199
208
  }else{
200
209
  this.dataModel = data.updateValue
@@ -74,6 +74,11 @@ export const validateFormMixin = {
74
74
  return false;
75
75
  }
76
76
  }
77
+ // 表单联动之后,部分组件产生了必填校验,但是部分组件实际无需校验,故直接放开相关校验
78
+ if(["switch"].includes(this.widget.type)){
79
+ callback(null);
80
+ return false;
81
+ }
77
82
  utils.validateItem(rules, props, tempModel[this.widget.model], callback)
78
83
  },
79
84
 
@@ -114,9 +114,9 @@
114
114
  watch: {
115
115
  value(val) {
116
116
  if (this.editorCtx) {
117
- this.editorCtx.setContents({
118
- html: val
119
- })
117
+ // this.editorCtx.setContents({
118
+ // html: val
119
+ // })
120
120
  }
121
121
  }
122
122
  },
@@ -144,6 +144,11 @@
144
144
  });
145
145
  this.$forceUpdate();
146
146
  },
147
+ formLinkSetContents(value){
148
+ this.editorCtx.setContents({
149
+ html: value,
150
+ })
151
+ },
147
152
  onEditorReady() {
148
153
  uni.createSelectorQuery().in(this).select('#editor').context((res) => {
149
154
  this.editorCtx = res.context;
@@ -167,7 +172,7 @@
167
172
  })
168
173
  setTimeout(() => {
169
174
  this.readOnly = false
170
- }, 1000)
175
+ }, 200)
171
176
 
172
177
  }).exec();
173
178
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.304",
3
+ "version": "1.0.305",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",