|
1 | 1 | <template> |
2 | 2 | <div id="app"> |
3 | | - <a href="https://github.com/SortableJS/Vue.Draggable" target="_blank"> |
| 3 | + <a |
| 4 | + href="https://github.com/SortableJS/Vue.Draggable" |
| 5 | + target="_blank" |
| 6 | + > |
4 | 7 | <img |
5 | 8 | style="position: fixed; top: 0; right: 0; border: 0; z-index:99999" |
6 | 9 | width="149" |
|
24 | 27 | <a |
25 | 28 | target="_blank" |
26 | 29 | href="https://circleci.com/gh/SortableJS/Vue.Draggable" |
27 | | - ><img |
28 | | - src="https://circleci.com/gh/SortableJS/Vue.Draggable.svg?style=shield" |
29 | | - /> |
| 30 | + ><img src="https://circleci.com/gh/SortableJS/Vue.Draggable.svg?style=shield" /> |
30 | 31 | </a> |
31 | 32 | <a |
32 | 33 | target="_blank" |
33 | 34 | href="https://codecov.io/gh/SortableJS/Vue.Draggable" |
34 | | - ><img |
35 | | - src="https://codecov.io/gh/SortableJS/Vue.Draggable/branch/master/graph/badge.svg" |
36 | | - /> |
| 35 | + ><img src="https://codecov.io/gh/SortableJS/Vue.Draggable/branch/master/graph/badge.svg" /> |
37 | 36 | </a> |
38 | 37 | <a |
39 | 38 | target="_blank" |
40 | 39 | href="https://codebeat.co/projects/github.amrom.workers.dev-sortablejs-vue-draggable-master" |
41 | | - ><img |
42 | | - src="https://codebeat.co/badges/7a6c27c8-2d0b-47b9-af55-c2eea966e713" |
43 | | - /> |
| 40 | + ><img src="https://codebeat.co/badges/7a6c27c8-2d0b-47b9-af55-c2eea966e713" /> |
44 | 41 | </a> |
45 | 42 | <a |
46 | 43 | target="_blank" |
47 | 44 | href="https://github.com/SortableJS/Vue.Draggable/issues?q=is%3Aopen+is%3Aissue" |
48 | | - ><img |
49 | | - src="https://img.shields.io/github/issues/SortableJS/Vue.Draggable.svg" |
50 | | - /> |
| 45 | + ><img src="https://img.shields.io/github/issues/SortableJS/Vue.Draggable.svg" /> |
51 | 46 | </a> |
52 | | - <a target="_blank" href="https://www.npmjs.com/package/vuedraggable" |
53 | | - ><img src="https://img.shields.io/npm/dt/vuedraggable.svg" /> |
| 47 | + <a |
| 48 | + target="_blank" |
| 49 | + href="https://www.npmjs.com/package/vuedraggable" |
| 50 | + ><img src="https://img.shields.io/npm/dt/vuedraggable.svg" /> |
54 | 51 | </a> |
55 | | - <a target="_blank" href="https://www.npmjs.com/package/vuedraggable" |
56 | | - ><img src="https://img.shields.io/npm/dm/vuedraggable.svg" /> |
| 52 | + <a |
| 53 | + target="_blank" |
| 54 | + href="https://www.npmjs.com/package/vuedraggable" |
| 55 | + ><img src="https://img.shields.io/npm/dm/vuedraggable.svg" /> |
57 | 56 | </a> |
58 | | - <a target="_blank" href="https://www.npmjs.com/package/vuedraggable" |
59 | | - ><img src="https://img.shields.io/npm/v/vuedraggable.svg" /> |
| 57 | + <a |
| 58 | + target="_blank" |
| 59 | + href="https://www.npmjs.com/package/vuedraggable" |
| 60 | + ><img src="https://img.shields.io/npm/v/vuedraggable.svg" /> |
60 | 61 | </a> |
61 | 62 | <a |
62 | 63 | target="_blank" |
63 | 64 | href="https://github.com/SortableJS/Vue.Draggable/blob/master/LICENSE" |
64 | | - ><img |
65 | | - src="https://img.shields.io/github/license/SortableJS/Vue.Draggable.svg" |
66 | | - /> |
| 65 | + ><img src="https://img.shields.io/github/license/SortableJS/Vue.Draggable.svg" /> |
67 | 66 | </a> |
68 | 67 | </div> |
69 | 68 | </div> |
70 | 69 |
|
71 | | - <ul class="nav nav-tabs" role="tablist"> |
| 70 | + <ul |
| 71 | + class="nav nav-tabs" |
| 72 | + role="tablist" |
| 73 | + > |
72 | 74 | <li |
73 | 75 | class="nav-item" |
74 | 76 | v-for="component in componentList" |
|
81 | 83 | :href="`#${component.name}`" |
82 | 84 | role="tab" |
83 | 85 | aria-controls="profile" |
84 | | - >{{ component.display }}</a |
85 | | - > |
| 86 | + >{{ component.display }}</a> |
86 | 87 | </li> |
87 | 88 | </ul> |
88 | 89 |
|
89 | | - <div class="tab-content" id="tab-content"> |
| 90 | + <div |
| 91 | + class="tab-content" |
| 92 | + id="tab-content" |
| 93 | + > |
90 | 94 | <div |
91 | 95 | class="tab-pane show" |
92 | 96 | :id="component.name" |
|
127 | 131 | import $ from "jquery"; |
128 | 132 |
|
129 | 133 | const requireContext = require.context("./components/", false, /\.vue$/); |
130 | | -
|
131 | 134 | const components = requireContext.keys().reduce((acc, key) => { |
132 | 135 | const component = requireContext(key).default; |
133 | 136 | acc[component.name] = component; |
134 | 137 | return acc; |
135 | 138 | }, {}); |
136 | 139 |
|
| 140 | +const showAll = process.env.VUE_APP_SHOW_ALL_EXAMPLES === "true"; |
| 141 | +if (showAll) { |
| 142 | + const order = Object.keys(components); |
| 143 | + const requireContextDebug = require.context( |
| 144 | + "./debug-components/", |
| 145 | + false, |
| 146 | + /\.vue$/ |
| 147 | + ); |
| 148 | + requireContextDebug.keys().reduce((acc, key) => { |
| 149 | + const component = requireContextDebug(key).default; |
| 150 | + component.order += order; |
| 151 | + component.display = `DEBUG: ${component.display}`; |
| 152 | + acc[component.name] = component; |
| 153 | + return acc; |
| 154 | + }, components); |
| 155 | +} |
| 156 | +
|
137 | 157 | export default { |
138 | 158 | name: "app", |
139 | 159 | components, |
|
0 commit comments