current position:Home>Uniapp configuration element UI code block
Uniapp configuration element UI code block
2022-05-15 04:02:13【Liu Chuge Nian】
open HbuildX, Tools , Code block settings ,vue Code block
Write in the custom code block on the right
You can log in. element-ui Select the custom code block you need in the component guide , Here I will give some common components sorted out by myself :
{
// Be careful : This document only supports single line comments , also '//' Cannot have any non empty characters before !!!
//
// HBuilderX Use json Extended code block , compatible vscode Code block format for
// This document has been modified , Save to take effect , No need to restart .
// This document is used for user customization {1} Code block .
// The description of each configuration item is as follows :
// 'key' : Code block display name , The name displayed in the code assistant list , In the following example 'console.log' It's just one. key.
// 'prefix' : Trigger character of code block , Just type what letter matches this code block .
// 'body' : The contents of the code block . The content has the following special format
// $1 Indicates the position of the cursor after the code block is entered . If you need more than one cursor , Configure in multiple places $1, If there is preset data in this position , It is written as ${1:foo1}. Multiple options, i.e. drop-down candidate list, are used ${1:foo1/foo2/foo3}
// $2 Indicates that after entering the code block, press... Again tab The switching position of the rear cursor tabstops( After the code block is expanded, press tab You can jump to the next tabstop)
// $0 Represents the position of the final cursor after code block input ( You can also press enter to jump directly ).
// Use double quotation marks \\' escape
// Line breaks use multiple arrays to represent , One array per row , Enclose... In double quotation marks , Separated by a comma
// Indenting requires \\t Express , You cannot enter indents directly !
// 'triggerAssist' : by true Indicates that the code block is entered into the document immediately after the first tabstop Trigger code prompt on , Pull out the code assistant , The default is false.
// Each code block is represented by key Primary key , Multiple code blocks need to be separated by commas .
// If json The grammar is illegal , An error message will pop up at the bottom , Please pay attention to the correction .
// Example :
// "console.log": {
// "prefix": "logtwo",
// "body": [
// "console.log('$1');",
// "\tconsole.log('$2');"
// ],
// "triggerAssist": false,
// "description": "Log output to console twice"
// }
// element-ui Code hinting
"eRowCol": {
"body": [
"<el-row :gutter=\"20\">",
"\t<el-col :span=\"12\">$1</el-col>",
"\t<el-col :span=\"12\">$1</el-col>",
"</el-row>"
],
"prefix": "erowcol",
"scope": "source.vue.html",
"triggerAssist":true
},
"eCard": {
"body": [
"<el-card class=\"box-card\">",
"\t<div slot=\"header\" class=\"clearfix\">",
"\t\t<span> Card name </span>",
"\t\t<el-button style=\"float: right; padding: 3px 0\" type=\"text\"> Operate the button </el-button>",
"\t</div>",
"\t<div class=\"text item\">$1</div>",
"</el-card>"
],
"prefix": "ecard",
"scope": "source.vue.html",
"triggerAssist":true
},
"eInput": {
"body": [
"<el-input v-model=\"$1\"></el-input>"
],
"prefix": "einput",
"scope": "source.vue.html",
"triggerAssist":true
},
"eSelect": {
"body": [
"<el-select v-model=\"form.region\" placeholder=\" Please select the activity area \">",
"\t<el-option label=\" Zone one \" value=\"shanghai\"></el-option>",
"\t<el-option label=\" Area two \" value=\"beijing\"></el-option>",
"</el-select>"
],
"prefix": "eselect",
"scope": "source.vue.html",
"triggerAssist":true
},
"eDatePicker": {
"body": [
"<el-date-picker type=\"date\" placeholder=\" Select date \" v-model=\"form.date1\" style=\"width: 100%;\"></el-date-picker>"
],
"prefix": "edatepicker",
"scope": "source.vue.html",
"triggerAssist":true
},
"eSwitch": {
"body": [
"<el-switch v-model=\"form.delivery\"></el-switch>"
],
"prefix": "eswitch",
"scope": "source.vue.html",
"triggerAssist":true
},
"eCheckboxGroup": {
"body": [
"<el-checkbox-group v-model=\"form.type\">",
"\t<el-checkbox label=\" food / Restaurant online activities \" name=\"type\"></el-checkbox>",
"\t<el-checkbox label=\" Earth pushing activity \" name=\"type\"></el-checkbox>",
"</el-checkbox-group>"
],
"prefix": "echeckboxgroup",
"scope": "source.vue.html",
"triggerAssist":true
},
"eRadioGroup": {
"body": [
"<el-radio-group v-model=\"form.resource\">",
"\t<el-radio label=\" Online brands sponsor \"></el-radio>",
"\t<el-radio label=\" Offline venues are free \"></el-radio>",
"</el-radio-group>"
],
"prefix": "eradiogroup",
"scope": "source.vue.html",
"triggerAssist":true
},
"eButton": {
"body": [
"<el-button type=\"primary\" @click=\"onSubmit\"> Create... Now </el-button>"
],
"prefix": "ebutton",
"scope": "source.vue.html",
"triggerAssist":true
},
"eForm": {
"body": [
"<el-form ref=\"form\" :model=\"form\" label-width=\"80px\">",
"\t<el-form-item label=\"label\">",
"\t\t$1",
"\t</el-form-item>",
"</el-form>"
],
"prefix": "efrom",
"scope": "source.vue.html",
"triggerAssist":true
},
"eFormItem": {
"body": [
"<el-form-item label=\"label\">",
"\t$1",
"</el-form-item>"
],
"prefix": "efromitem",
"scope": "source.vue.html",
"triggerAssist":true
},
"eDialog": {
"body": [
"<el-dialog title=\" title \" :visible.sync=\"createModel\">",
"\t$1",
"\t<div slot=\"footer\" class=\"dialog-footer\">",
"\t\t<el-button @click=\"createModel = false\"> take eliminate </el-button>",
"\t\t<el-button type=\"primary\" @click=\"createModel = false\"> indeed set </el-button>",
"\t</div>",
"</el-dialog>"
],
"prefix": "edialog",
"scope": "source.vue.html",
"triggerAssist":true
},
"eLink": {
"body": [
"<el-link type=\"primary\" href=\"#\">$1</el-link>"
],
"prefix": "elink",
"scope": "source.vue.html"
},
"eRow": {
"body": [
"<el-row :gutter=\"20\">",
"\t<el-col :span=\"6\">$1</el-col>",
"\t<el-col :span=\"6\">$2</el-col>",
"\t<el-col :span=\"6\">$3</el-col>",
"\t<el-col :span=\"6\">$4</el-col>",
"</el-row>"
],
"prefix": "erow",
"scope": "source.vue.html"
}
}
copyright notice
author[Liu Chuge Nian],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/135/202205142140482428.html
The sidebar is recommended
- Angular acquisition and operation DOM
- Html2canvas problem
- Use day in Vue JS (time and date processing library)
- Vue cli configuring preprocessor global variables (take less as an example)
- How to use H5 custom tags in Vue?
- Come on, vue2 customize global loading
- Come on, Vue move the end suspension ball assembly
- React routing foundation and transmission parameters
- Come on, Vue graphic verification code component
- JavaScript judges browser types and kernels at home and abroad (including 360, QQ, Sogou, etc.)
guess what you like
ArcGIS JavaScript 4. Generates a rectangular buffer at the point of X
Node under window JS installation, environment configuration, setting Taobao image
Understanding of prototype and prototype object of JavaScript
How to customize the startup port of react project!
Why vue3 0 using proxy to realize data listening 2021-06-21
Front end artifact - download, configuration and use process of Charles (vase) [Mac version]
React next configures SVG loader and supports SVG configurability
React native Android phone cannot be opened after installation. Flash back!
Fetch and Axios failed to request on Android, with error messages: network request failed and network error
How to upgrade react Babel 7.1.0
Random recommended
- babel7. 0 compatible with IE browser
- Nginx configuring reactrouter browserhistory browserrouter
- JS, react use html2canvas page screenshot and export
- Big data front-end visualization screen -- the road of front-end development
- [a quick introduction and comparison of multiple languages -- JavaScript, typescript, python, golang, trust, Java, ruby]
- Vue element admin login function, token filling, language conversion, routing setting
- Summation of corresponding position elements of multiple lists in Python
- Discussion on HTML page knowledge
- Using Ajax to realize non refresh paging
- HTTP format
- Zhang San has a meal - did he eat the difference between get and post in HTTP?
- The ultimate actual combat of the most complete tourism project based on spring boot + Vue front-end and back-end separation in history (with source code attached), none of them!!!
- Vue basic grammar
- LeetCode 217. There are duplicate elements
- Pagoda does not configure the solution of SSL site accessing HTTPS and jumping to other websites
- Vue3 isProxy
- About the problem that the container will hang up after starting nginx in the docker container
- Introduction to JavaScript
- The core element of large-scale software design is to control complexity. What is the root cause?
- What are the core elements of large-scale software design?
- C + + small job - create an array class arr to delete duplicate elements in the array
- Fancy front gradient
- Understanding of this in JavaScript
- Introduction to HTML + CSS Basics
- JavaScript makes a simple "aircraft war"
- Summary of Vue basics 14: what does vuex do?
- CSS introduction
- CSS introduction method
- CSS basic selector
- HTTPS pressure test you don't know
- Intersectionobserver and custom hooks
- Vue uses vis to implement topology map
- [Django CI system] if the front-end date is complete, it will be fully updated to the back-end; If the front-end date is incomplete, the date will not be updated to the back-end-20220510
- Is your endurance anxiety saved? 10 minute full electric vehicle technology is mature, netizen: it's useless to find a charging pile
- After reading 2000 applications for venture capital financing, I summed up the 20 elements that investors value most
- Diesel automobile double pickup truck leads the industry, and Jiangxi Isuzu no longer bows its head and acts recklessly
- Vue + elementui learning notes, use custom events to monitor the closing and opening events of the pop-up window of the introduced component
- Lazy loading usage based on element UI tree directory
- Vue encapsulates multiple request requests (solution for multiple domain names)
- Getting started with Vue