{{ this.$t("contracts.params") }}:
-
+
-
+
{{ item.name }}
- checkedNullString(checked, index)" label="勾选传递空字符串">
+
+
+
@@ -389,11 +391,6 @@ export default {
break;
}
},
- checkedNullString: function(checked, index) {
- if(checked) {
- this.form.pramasData[index].value = "";
- }
- },
submit: function (formName) {
// if (this.isCNS) {
// if (!this.cnsName || !this.cnsVersion) {
@@ -455,10 +452,24 @@ export default {
this.changeType();
}
},
+ changeRules: function(item, index) {
+ if(item.type == "string") {
+ this.$set(this.form.pramasData[index], "value", "");
+ return [];
+ }else if(item.type == "bytes") {
+ this.$set(this.form.pramasData[index], "value", "0x");
+ return [];
+ }
+ },
changeFunc: function () {
this.constant = false;
this.funcList.forEach((value) => {
if (value.funcId === this.transation.funcName) {
+ value.inputs.forEach((item) => {
+ if(item.type === "string" || item.type === "bytes") {
+ this.$set(item, 'isNullFlag',false);
+ }
+ });
this.form.pramasData = value.inputs;
if (
value.stateMutability == "view" ||