Skip to content

Commit 7de990a

Browse files
committed
Add strict mode section to helper
1 parent 2c177d9 commit 7de990a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: docs/.vuepress/components/UrlHelper.vue

+8-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<option value="trace">TRACE</option>
1616
<option value="patch">PATCH</option>
1717
</select>
18+
<h4>Strict mode</h4>
19+
<label><input type="checkbox" v-model="strictMode"> Use strict mode</label>
1820
<h4>Possible fixtures (in order of specificity)</h4>
1921
<ol v-if="fixtures.length">
2022
<li v-for="fixture in fixtures">/path/to/fixtures/{{ fixture }}</li>
@@ -196,7 +198,8 @@
196198
data() {
197199
return {
198200
url: '',
199-
method: 'get'
201+
method: 'get',
202+
strictMode: false
200203
};
201204
},
202205
@@ -223,6 +226,10 @@
223226
fixtures.push(`${url.hostname}${pathname}.${this.method}.mock`);
224227
fixtures.push(`${url.hostname}${pathname}.mock`);
225228
229+
if (this.strictMode) {
230+
fixtures = fixtures.slice(0, 1);
231+
}
232+
226233
return fixtures;
227234
}
228235
},

0 commit comments

Comments
 (0)