Created
December 26, 2016 20:13
-
-
Save victorwpbastos/71955408eb85a129b23a8274ac659842 to your computer and use it in GitHub Desktop.
Vue Table Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
<table class="table table-bordered"> | |
<thead> | |
<tr>${SELECTION/([^\s]+)|(?:\s(\w+))/()(?3\n\t\t\t<th class="text-center text-uppercase">$3<\/th>)/g} | |
</tr> | |
</thead> | |
<tbody> | |
<tr v-for="(item, index) in ${SELECTION/([^\s]+)|(\s\w+)/$1/g}">${SELECTION/([^\s]+)|(\s(\w+))/()(?3\n\t\t\t<td class="text-center">{{ item\.$3 }}<\/td>)/g} | |
</tr> | |
</tbody> | |
</table> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>vtable</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
<description>Create Vue Table</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment