From a0ecbfa00485a793baf7ebfe483c344cd5994925 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Wed, 13 Jun 2018 17:08:12 +0900 Subject: [PATCH] Use v-model for expression and time_format Signed-off-by: Kenji Okimoto --- .../shared/vue/_owned_plugin_form.html.haml | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/views/shared/vue/_owned_plugin_form.html.haml b/app/views/shared/vue/_owned_plugin_form.html.haml index b70915d..160b91c 100644 --- a/app/views/shared/vue/_owned_plugin_form.html.haml +++ b/app/views/shared/vue/_owned_plugin_form.html.haml @@ -42,8 +42,21 @@ "data-placement" => "right", "v-bind:title" => "option.desc"} {{ option.name }} - %input{"v-bind:id" => "inputId(pluginType, option)", - "v-bind:name" => "inputName(pluginType, option)", - "v-bind:value" => "option.default", - "type" => "text", - "class" => "form-control"} + %template{"v-if" => 'option.name === "expression"'} + %input{"v-bind:id" => "inputId(pluginType, option)", + "v-bind:name" => "inputName(pluginType, option)", + "v-model.lazy" => "expression", + "type" => "text", + "class" => "form-control"} + %template{"v-else-if" => 'option.name === "time_format"'} + %input{"v-bind:id" => "inputId(pluginType, option)", + "v-bind:name" => "inputName(pluginType, option)", + "v-model.lazy" => "timeFormat", + "type" => "text", + "class" => "form-control"} + %template(v-else) + %input{"v-bind:id" => "inputId(pluginType, option)", + "v-bind:name" => "inputName(pluginType, option)", + "v-bind:value" => "option.default", + "type" => "text", + "class" => "form-control"}