Skip to content
This repository was archived by the owner on Apr 1, 2022. It is now read-only.

Commit 5c268e4

Browse files
author
Ken Berkeley
committed
[fix] display Advanced example by default
1 parent 52e37dc commit 5c268e4

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/dist/client.2d78349a.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/dist/client.460cfb9a.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
<script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
1414
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
15-
<script type="text/javascript" src="client.460cfb9a.js"></script></body>
15+
<script type="text/javascript" src="client.2d78349a.js"></script></body>
1616
</html>

examples/src/App.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ import Basic from './Basic/'
7070
import Advanced from './Advanced/'
7171
import Fixed from './Fixed/'
7272
import capitalize from 'lodash/capitalize'
73-
const getCurHash = () => location.hash.replace(/^#/, '')
7473
7574
export default {
7675
components: { Basic, Advanced, Fixed },
7776
data: () => ({
78-
showTab: getCurHash() || 'advanced'
77+
showTab: getCurHash()
7978
}),
8079
mounted () {
8180
$(window).on('hashchange', () => {
@@ -89,6 +88,11 @@ export default {
8988
}
9089
}
9190
}
91+
92+
function getCurHash() {
93+
// display Advanced example by default
94+
return location.hash.replace(/^#/, '') || 'advanced'
95+
}
9296
</script>
9397
<style>
9498
html {

0 commit comments

Comments
 (0)