@zscreate/zhxy-app-component 1.0.295 → 1.0.297

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.
@@ -131,11 +131,19 @@ export const pubSubMixin = {
131
131
  // #ifdef H5
132
132
  const that = this
133
133
  let global= globalThis
134
- eval(data.operateValue)
134
+ debugger
135
+ let operateValue = data.operateValue
136
+ if(data.operateValue.includes('this.$http')) {
137
+ operateValue = operateValue.replace(/this\.\$http/g, "this.$u")
138
+ }
139
+ eval(operateValue)
135
140
  return
136
141
  // #endif
137
-
138
- console.log(run(data.operateValue, {
142
+ let operateValueWx = data.operateValue
143
+ if(operateValueWx.includes('this.$http')) {
144
+ operateValueWx = operateValueWx.replace(/this\.\$http/g, "that.$u")
145
+ }
146
+ console.log(run(operateValueWx, {
139
147
  that: this,
140
148
  global: globalThis,
141
149
  list,
@@ -996,7 +996,7 @@ export default {
996
996
 
997
997
  }
998
998
  }
999
- if (widget.type === 'rate') updateValue = !isNaN(updateValue) ? Number(updateValue) : updateValue
999
+ if (widget.type === 'rate' || widget.type === "number") updateValue = !isNaN(updateValue) ? Number(updateValue) : updateValue
1000
1000
  // if (['responsibility', 'switch'].includes(widget.type)) updateValue = Boolean(updateValue) || updateValue === 'true'
1001
1001
  if (widget.parentType === 'table') {
1002
1002
  if (!Array.isArray(this.models[widget.parentModel])) this.models[widget.parentModel] = []
@@ -1046,11 +1046,18 @@ export default {
1046
1046
  that.isWx = true
1047
1047
  let global = globalThis
1048
1048
  // #ifdef H5
1049
- eval(data.operateValue)
1049
+ let operateValue = data.operateValue
1050
+ if(data.operateValue.includes('this.$http')) {
1051
+ operateValue = operateValue.replace(/this\.\$http/g, "this.$u")
1052
+ }
1053
+ eval(operateValue)
1050
1054
  return
1051
1055
  // #endif
1052
-
1053
- console.log(run(data.operateValue, {
1056
+ let operateValueWx = data.operateValue
1057
+ if(operateValueWx.includes('this.$http')) {
1058
+ operateValueWx = operateValueWx.replace(/this\.\$http/g, "that.$u")
1059
+ }
1060
+ console.log(run(operateValueWx, {
1054
1061
  that: this,
1055
1062
  widget,
1056
1063
  global: globalThis,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.295",
3
+ "version": "1.0.297",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",