Fix to use paramAttributes for initial value

This commit is contained in:
uu59 2014-12-01 13:55:31 +09:00
parent 133009a318
commit 53940dbe8b
2 changed files with 2 additions and 3 deletions

View File

@ -6,11 +6,10 @@
new Vue({
el: "#treeview",
paramAttributes: [],
paramAttributes: ["initialPath"],
data: {
preview: "",
path: "",
initialPath: "/var/log",
paths: []
},

View File

@ -2,7 +2,7 @@
<% action ||= "" %>
<% submit_button ||= "" %>
<%= form_tag(action, method: :post) do %>
<div id="treeview">
<div id="treeview" initialPath="/var/log">
<input type="text" size="48" v-model="path" disabled />
<input type="hidden" name="<%= name %>" v-model="path" />
<div class="dirs">