Skip to content

Commit 42b3bd9

Browse files
committed
add file input code example
1 parent 3db58c9 commit 42b3bd9

File tree

1 file changed

+39
-4
lines changed

1 file changed

+39
-4
lines changed

docs/src/pages/components/File.vue

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,45 @@
9797

9898
<div slot="code">
9999
<code-block lang="xml">
100+
&lt;md-input-container&gt;
101+
&lt;label&gt;Single&lt;/label&gt;
102+
&lt;md-file v-model=&quot;single&quot;&gt;&lt;/md-file&gt;
103+
&lt;/md-input-container&gt;
104+
105+
&lt;md-input-container&gt;
106+
&lt;md-file v-model=&quot;placeholder&quot; placeholder=&quot;A nice input placeholder&quot;&gt;&lt;/md-file&gt;
107+
&lt;/md-input-container&gt;
108+
109+
&lt;md-input-container&gt;
110+
&lt;md-file placeholder=&quot;Disabled&quot; disabled&gt;&lt;/md-file&gt;
111+
&lt;/md-input-container&gt;
112+
113+
&lt;md-input-container&gt;
114+
&lt;label&gt;Initial Value&lt;/label&gt;
115+
&lt;md-file v-model=&quot;initialValue&quot;&gt;&lt;/md-file&gt;
116+
&lt;/md-input-container&gt;
117+
118+
&lt;md-input-container&gt;
119+
&lt;label&gt;Multiple&lt;/label&gt;
120+
&lt;md-file v-model=&quot;multiple&quot; multiple&gt;&lt;/md-file&gt;
121+
&lt;/md-input-container&gt;
122+
123+
&lt;md-input-container&gt;
124+
&lt;label&gt;Only Images&lt;/label&gt;
125+
&lt;md-file v-model=&quot;onlyImages&quot; accept=&quot;image/*&quot;&gt;&lt;/md-file&gt;
126+
&lt;/md-input-container&gt;
127+
</code-block>
100128

129+
<code-block lang="javascript">
130+
export default {
131+
data: () => ({
132+
single: null,
133+
placeholder: null,
134+
initialValue: 'my-profile-picture.jpg',
135+
multiple: null,
136+
onlyImages: null
137+
})
138+
};
101139
</code-block>
102140
</div>
103141
</example-box>
@@ -114,9 +152,6 @@
114152
initialValue: 'my-profile-picture.jpg',
115153
multiple: null,
116154
onlyImages: null
117-
}),
118-
methods: {
119-
120-
}
155+
})
121156
};
122157
</script>

0 commit comments

Comments
 (0)