├── imgs ├── vue.gif ├── heyui.png └── component.gif ├── CHANGELOG.md ├── snippets ├── vue.json ├── javascript.json └── component.json ├── LICENSE ├── vsc-extension-quickstart.md ├── package.json └── README.md /imgs/vue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyui/heyui-snippets/HEAD/imgs/vue.gif -------------------------------------------------------------------------------- /imgs/heyui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyui/heyui-snippets/HEAD/imgs/heyui.png -------------------------------------------------------------------------------- /imgs/component.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/heyui/heyui-snippets/HEAD/imgs/component.gif -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to the "heyui-snippets" extension will be documented in this file. 3 | 4 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 5 | 6 | ## [Unreleased] 7 | - Initial release -------------------------------------------------------------------------------- /snippets/vue.json: -------------------------------------------------------------------------------- 1 | { 2 | "vue": { 3 | "prefix": "vue", 4 | "body": [ 5 | "", 7 | "", 12 | "" 32 | ], 33 | "description": "vue-template" 34 | }, 35 | "jsmodel template": { 36 | "prefix": "model", 37 | "body": [ 38 | "import FORMAT from '../format';", 39 | "", 40 | "export default new Model({", 41 | " createdAt: {", 42 | " type: Model.DATE,", 43 | " format: FORMAT.K", 44 | " }", 45 | "})" 46 | ], 47 | "description": "init js-model" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Hey UI 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | * This folder contains all of the files necessary for your extension. 5 | * `package.json` - this is the manifest file that defines the location of the snippet file 6 | and specifies the language of the snippets. 7 | * `snippets/snippets.json` - the file containing all snippets. 8 | 9 | ## Get up and running straight away 10 | * Press `F5` to open a new window with your extension loaded. 11 | * Create a new file with a file name suffix matching your language. 12 | * Verify that your snippets are proposed on intellisense. 13 | 14 | ## Make changes 15 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 16 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 17 | 18 | ## Install your extension 19 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 20 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "heyui-snippets", 3 | "displayName": "heyui-snippets", 4 | "description": "HeyUI Component Snippets", 5 | "version": "1.1.0", 6 | "publisher": "vvpvvp", 7 | "license": "MIT", 8 | "icon": "imgs/heyui.png", 9 | "scripts": { 10 | "publish": "vsce publish" 11 | }, 12 | "bugs": { 13 | "url": "https://github.com/heyui/heyui-snippets/issues", 14 | "email": "alias8516@sina.com.cn" 15 | }, 16 | "homepage": "https://github.com/heyui/heyui-snippets/blob/master/README.md", 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/heyui/heyui-snippets" 20 | }, 21 | "engines": { 22 | "vscode": "^1.24.0" 23 | }, 24 | "categories": [ 25 | "Snippets" 26 | ], 27 | "contributes": { 28 | "snippets": [ 29 | { 30 | "language": "vue", 31 | "path": "./snippets/vue.json" 32 | }, 33 | { 34 | "language": "vue-html", 35 | "path": "./snippets/component.json" 36 | }, 37 | { 38 | "language": "javascript", 39 | "path": "./snippets/javascript.json" 40 | } 41 | ] 42 | } 43 | } -------------------------------------------------------------------------------- /snippets/javascript.json: -------------------------------------------------------------------------------- 1 | { 2 | "$Message": { 3 | "prefix": "this.$Message", 4 | "body": "this.\\$Message(${1})", 5 | "description": "heyui $Message" 6 | }, 7 | "$Notice": { 8 | "prefix": "this.$Notice", 9 | "body": "this.\\$Notice({${1}})", 10 | "description": "heyui $Notice" 11 | }, 12 | "$Modal": { 13 | "prefix": "this.$Modal", 14 | "body": "this.\\$Modal({${1}})", 15 | "description": "heyui $Modal" 16 | }, 17 | "$Confirm": { 18 | "prefix": "this.$Confirm", 19 | "body": "this.\\$Confirm(${1}).then(()=>{${2}})", 20 | "description": "heyui $Confirm" 21 | }, 22 | "$Loading": { 23 | "prefix": "this.$Loading", 24 | "body": "this.\\$Loading(${1})", 25 | "description": "heyui $Loading" 26 | }, 27 | "$LoadingBar": { 28 | "prefix": "this.$LoadingBar", 29 | "body": "this.\\$LoadingBar(${1})", 30 | "description": "heyui $LoadingBar" 31 | }, 32 | "$ScrollIntoView": { 33 | "prefix": "this.$ScrollIntoView", 34 | "body": "this.\\$ScrollIntoView({${1}})", 35 | "description": "heyui $ScrollIntoView" 36 | }, 37 | "$Clipboard": { 38 | "prefix": "this.$Clipboard", 39 | "body": "this.\\$Clipboard({${1}})", 40 | "description": "heyui $Clipboard" 41 | }, 42 | "$ImagePreview": { 43 | "prefix": "this.$ImagePreview", 44 | "body": "this.\\$ImagePreview({${1}})", 45 | "description": "heyui $ImagePreview" 46 | } 47 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # heyui-snippets 2 | [![](https://vsmarketplacebadge.apphb.com/version-short/vvpvvp.heyui-snippets.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=vvpvvp.heyui-snippets) 3 | [![](https://vsmarketplacebadge.apphb.com/installs-short/vvpvvp.heyui-snippets.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=vvpvvp.heyui-snippets) 4 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE) 5 | 6 | HeyUI tooling for VS Code. 7 | 8 | git: https://github.com/heyui/heyui-snippets 9 | vscode: https://marketplace.visualstudio.com/items?itemName=vvpvvp.heyui-snippets 10 | 11 | ## HeyUI 12 | 13 | >A UI components Library. 14 | 15 | visit [heyui.top](http://www.heyui.top). 16 | 17 | ## Snippets 18 | 19 | ### Vue Snippets 20 | 21 | ![vue snippets](https://raw.githubusercontent.com/heyui/heyui-snippets/master/imgs/vue.gif) 22 | 23 | 24 | ### HeyUI Snippets 25 | ![component snippets](https://raw.githubusercontent.com/heyui/heyui-snippets/master/imgs/component.gif) 26 | 27 | 28 | ### Component Snippets List 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 |
Component
Affix
BackTop
Badge
Checkbox
Circle
Category
Datetime
DropdownCustom
DropdownMenu
Form
FormItem
Menu
Modal
ModalComponent
Pagination
Poptip
Progress
Radio
Rate
Slider
Loading
Steps
Search
Select
Switch
SwitchList
Tabs
TagInput
Tree
TreePicker
NumberInput
Tooltip
Uploader
AutoComplete
Timeline
TextEllipsis
Table
TableItem
Row
Col
Button
ButtonGroup
165 | 166 | ### Method Snippets List 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 |
Method
$Message
$Notice
$Confirm
$Loading
$ScrollIntoView
192 | 193 | 194 | **Enjoy!** 195 | -------------------------------------------------------------------------------- /snippets/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "Affix": { 3 | "prefix": "Affix", 4 | "body": "", 5 | "description": "Affix Component" 6 | }, 7 | "BackTop": { 8 | "prefix": "BackTop", 9 | "body": "", 10 | "description": "BackTop Component" 11 | }, 12 | "Badge": { 13 | "prefix": "Badge", 14 | "body": "", 15 | "description": "Badge Component" 16 | }, 17 | "Checkbox": { 18 | "prefix": "Checkbox", 19 | "body": "", 20 | "description": "Checkbox Component" 21 | }, 22 | "h-circle": { 23 | "prefix": "h-circle", 24 | "body": "", 25 | "description": "h-circle Component" 26 | }, 27 | "Circle": { 28 | "prefix": "Circle", 29 | "body": "", 30 | "description": "hCircle Component" 31 | }, 32 | "Category": { 33 | "prefix": "Category", 34 | "body": "", 35 | "description": "Category Component" 36 | }, 37 | "Datetime": { 38 | "prefix": "Datetime", 39 | "body": "", 40 | "description": "Datetime Component" 41 | }, 42 | "DropdownCustom": { 43 | "prefix": "DropdownCustom", 44 | "body": "", 45 | "description": "DropdownCustom Component" 46 | }, 47 | "DropdownMenu": { 48 | "prefix": "DropdownMenu", 49 | "body": "", 50 | "description": "DropdownMenu Component" 51 | }, 52 | "Form": { 53 | "prefix": "Form", 54 | "body": "
", 55 | "description": "Form Component" 56 | }, 57 | "FormItem": { 58 | "prefix": "FormItem", 59 | "body": "", 60 | "description": "FormItem Component" 61 | }, 62 | "Menu": { 63 | "prefix": "Menu", 64 | "body": "", 65 | "description": "Menu Component" 66 | }, 67 | "Modal": { 68 | "prefix": "Modal", 69 | "body": "", 70 | "description": "Modal Component" 71 | }, 72 | "ModalComponent": { 73 | "prefix": "ModalComponent", 74 | "body": "", 75 | "description": "ModalComponent" 76 | }, 77 | "Pagination": { 78 | "prefix": "Pagination", 79 | "body": "", 80 | "description": "Pagination Component" 81 | }, 82 | "Poptip": { 83 | "prefix": "Poptip", 84 | "body": "", 85 | "description": "Poptip Component" 86 | }, 87 | "Progress": { 88 | "prefix": "Progress", 89 | "body": "", 90 | "description": "Progress Component" 91 | }, 92 | "Radio": { 93 | "prefix": "Radio", 94 | "body": "", 95 | "description": "Radio Component" 96 | }, 97 | "Rate": { 98 | "prefix": "Rate", 99 | "body": "", 100 | "description": "Rate Component" 101 | }, 102 | "Slider": { 103 | "prefix": "Slider", 104 | "body": "", 105 | "description": "Slider Component" 106 | }, 107 | "Loading": { 108 | "prefix": "Loading", 109 | "body": "", 110 | "description": "Loading Component" 111 | }, 112 | "Steps": { 113 | "prefix": "Steps", 114 | "body": "", 115 | "description": "Steps Component" 116 | }, 117 | "Search": { 118 | "prefix": "Search", 119 | "body": "", 120 | "description": "Search Component" 121 | }, 122 | "Select": { 123 | "prefix": "Select", 124 | "body": "", 125 | "description": "Select Component" 126 | }, 127 | "Switch": { 128 | "prefix": "Switch", 129 | "body": "", 130 | "description": "hSwitch Component" 131 | }, 132 | "h-switch": { 133 | "prefix": "h-switch", 134 | "body": "", 135 | "description": "h-switch Component" 136 | }, 137 | "SwitchList": { 138 | "prefix": "SwitchList", 139 | "body": "", 140 | "description": "SwitchList Component" 141 | }, 142 | "Tabs": { 143 | "prefix": "Tabs", 144 | "body": "", 145 | "description": "Tabs Component" 146 | }, 147 | "TagInput": { 148 | "prefix": "TagInput", 149 | "body": "", 150 | "description": "TagInput Component" 151 | }, 152 | "Tree": { 153 | "prefix": "Tree", 154 | "body": "", 155 | "description": "Tree Component" 156 | }, 157 | "TreePicker": { 158 | "prefix": "TreePicker", 159 | "body": "", 160 | "description": "TreePicker Component" 161 | }, 162 | "NumberInput": { 163 | "prefix": "NumberInput", 164 | "body": "", 165 | "description": "NumberInput Component" 166 | }, 167 | "Tooltip": { 168 | "prefix": "Tooltip", 169 | "body": "", 170 | "description": "Tooltip Component" 171 | }, 172 | "Uploader": { 173 | "prefix": "Uploader", 174 | "body": "", 175 | "description": "Uploader Component" 176 | }, 177 | "AutoComplete": { 178 | "prefix": "AutoComplete", 179 | "body": "", 180 | "description": "AutoComplete Component" 181 | }, 182 | "Timeline": { 183 | "prefix": "Timeline", 184 | "body": "", 185 | "description": "Timeline Component" 186 | }, 187 | "TimelineItem": { 188 | "prefix": "TimelineItem", 189 | "body": "${1}", 190 | "description": "TimelineItem Component" 191 | }, 192 | "TextEllipsis": { 193 | "prefix": "TextEllipsis", 194 | "body": "", 195 | "description": "TextEllipsis Component" 196 | }, 197 | "Table": { 198 | "prefix": "Table", 199 | "body": "
", 200 | "description": "Table Component" 201 | }, 202 | "TableItem": { 203 | "prefix": "TableItem", 204 | "body": [ 205 | "" 206 | ], 207 | "description": "TableItem Component" 208 | }, 209 | "Row": { 210 | "prefix": "Row", 211 | "body": "", 212 | "description": "Row Component" 213 | }, 214 | "Cell": { 215 | "prefix": "Cell", 216 | "body": "", 217 | "description": "Cell Component" 218 | }, 219 | "Col": { 220 | "prefix": "Col", 221 | "body": "", 222 | "description": "Col Component" 223 | }, 224 | "Button": { 225 | "prefix": "Button", 226 | "body": "", 227 | "description": "Button Component" 228 | }, 229 | "ButtonGroup": { 230 | "prefix": "ButtonGroup", 231 | "body": "", 232 | "description": "ButtonGroup Component" 233 | }, 234 | "Carousel": { 235 | "prefix": "Carousel", 236 | "body": "", 237 | "description": "Carousel Component" 238 | }, 239 | "Transfer": { 240 | "prefix": "Transfer", 241 | "body": "", 242 | "description": "Transfer Component" 243 | }, 244 | "Collapse": { 245 | "prefix": "Collapse", 246 | "body": "", 247 | "description": "Collapse Component" 248 | }, 249 | "CollapseItem": { 250 | "prefix": "CollapseItem", 251 | "body": "${2}", 252 | "description": "CollapseItem Component" 253 | }, 254 | "Avatar": { 255 | "prefix": "Avatar", 256 | "body": "${2}", 257 | "description": "Avatar Component" 258 | }, 259 | "Layout": { 260 | "prefix": "Layout", 261 | "body": "${1}", 262 | "description": "Layout Component" 263 | }, 264 | "Content": { 265 | "prefix": "Content", 266 | "body": "${1}", 267 | "description": "Content Component" 268 | }, 269 | "Sider": { 270 | "prefix": "Sider", 271 | "body": "${1}", 272 | "description": "Sider Component" 273 | }, 274 | "HHeader": { 275 | "prefix": "HHeader", 276 | "body": "${1}", 277 | "description": "HHeader Component" 278 | }, 279 | "HFooter": { 280 | "prefix": "HFooter", 281 | "body": "${1}", 282 | "description": "HFooter Component" 283 | } 284 | } --------------------------------------------------------------------------------