77 lines
1.4 KiB
Plaintext
77 lines
1.4 KiB
Plaintext
{
|
|
"Page": {
|
|
"prefix": "page",
|
|
"body": [
|
|
"Page({",
|
|
" data: {",
|
|
" $1",
|
|
" },",
|
|
" onLoad(options) {",
|
|
" $2",
|
|
" },",
|
|
" onReady() {",
|
|
" $3",
|
|
" },",
|
|
" onShow() {",
|
|
" $4",
|
|
" },",
|
|
" onHide() {",
|
|
" $5",
|
|
" },",
|
|
" onUnload() {",
|
|
" $6",
|
|
" }",
|
|
"})"
|
|
],
|
|
"description": "创建小程序Page页面"
|
|
},
|
|
"Component": {
|
|
"prefix": "component",
|
|
"body": [
|
|
"Component({",
|
|
" properties: {",
|
|
" $1",
|
|
" },",
|
|
" data: {",
|
|
" $2",
|
|
" },",
|
|
" methods: {",
|
|
" $3",
|
|
" },",
|
|
" lifetimes: {",
|
|
" attached() {",
|
|
" $4",
|
|
" },",
|
|
" detached() {",
|
|
" $5",
|
|
" }",
|
|
" }",
|
|
"})"
|
|
],
|
|
"description": "创建小程序Component组件"
|
|
},
|
|
"WXML Template": {
|
|
"prefix": "wxml",
|
|
"body": [
|
|
"<view class='container'>",
|
|
" <text>{{title}}</text>",
|
|
" $1",
|
|
"</view>"
|
|
],
|
|
"description": "创建WXML模板"
|
|
},
|
|
"WXSS Style": {
|
|
"prefix": "wxss",
|
|
"body": [
|
|
".container {",
|
|
" display: flex;",
|
|
" flex-direction: column;",
|
|
" align-items: center;",
|
|
" justify-content: center;",
|
|
" padding: 20rpx;",
|
|
" $1",
|
|
"}"
|
|
],
|
|
"description": "创建WXSS样式"
|
|
}
|
|
} |