From c8689e5ed6e8193a697c3f7ad70610cee5dba972 Mon Sep 17 00:00:00 2001 From: Chunlin Zhang Date: Tue, 10 Dec 2019 15:48:18 +0800 Subject: [PATCH] apijson-table: fix value overwrite problem --- uliweb_apijson/apijson/templates/vue/inc_apijson_table.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html b/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html index 367ff0f..d8f306b 100644 --- a/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html +++ b/uliweb_apijson/apijson/templates/vue/inc_apijson_table.html @@ -424,8 +424,11 @@ add: function(){ for (var k in this.add_items){ var d = this.add_items[k] - d.value = null d.component = d.component || "input" + if (!(d.hasOwnProperty('value'))) { + dvalues = {input:'',checkbox:false} + d.value = dvalues[d.component] + } } if (this.hook_add!=null) { this.hook_add(this)