Former-commit-id: 1007e28ffea96ac442e66b2a8e4601fefb361b3f [formerly 85e07fab3ff65cd61092991daf26855c8ed5969a] [formerly 1007e28ffea96ac442e66b2a8e4601fefb361b3f [formerly 85e07fab3ff65cd61092991daf26855c8ed5969a] [formerly 1007e28ffea96ac442e66b2a8e4601fefb361b3f [formerly 85e07fab3ff65cd61092991daf26855c8ed5969a] [formerly 85e07fab3ff65cd61092991daf26855c8ed5969a [formerly 90c265e3ac4a27f677f30adcb5f768f3eb48824a [formerly d263da1c6f41453628385a7a233ebbd5ccf1d085]]]]] Former-commit-id: a378444bc00b239fe5f1de840792dc0e5805280f Former-commit-id: 420018e573a99d97f6c1a0ee0f7dbca959bfea4a Former-commit-id: a31366cd7696b1fcab2c2fa4af3e7754954bf1e4 [formerly 35f92b9cc58c0c7c288de47bda44a4a9f32984eb] Former-commit-id: f883a66291ea34249018f2c545bc7c5eb0c07112 Former-commit-id: d22fe9ba89d4de4328c8a722c638605b8f3800f2 Former-commit-id: 4c26302a39fbc7884509ea221b3cbbc99861c35a Former-commit-id: be6be9217d72a0d675bd693e66c9f7268d46a775 Former-commit-id: b1944d0b66c668e18ae1eeed2c6d93ee022acfbd
83 lines
2.4 KiB
JSON
83 lines
2.4 KiB
JSON
{
|
|
// 一个新的页面
|
|
"d2-new-page": {
|
|
"prefix": "dd-new-page",
|
|
"body": [
|
|
"<template>",
|
|
" <d2-container class=\"${1:page-name}\">",
|
|
" <!--",
|
|
" 可选 type = full(默认) | card | ghost",
|
|
" 可选 better-scroll 属性",
|
|
" 可选 better-scroll-option 属性",
|
|
" 文档 https://d2-projects.github.io/d2-admin-doc/zh/components/container.html",
|
|
" -->",
|
|
" <template slot=\"header\">header</template>",
|
|
" <span class=\"${1:page-name}_title\">this is [ {{name}} ]</span>",
|
|
" <template slot=\"footer\">footer</template>",
|
|
" </d2-container>",
|
|
"</template>",
|
|
"<script>",
|
|
"import { mapState, mapMutations } from 'vuex'",
|
|
"export default {",
|
|
" name: '${1:page-name}',",
|
|
" data () {",
|
|
" return {",
|
|
" name: '${1:page-name}'",
|
|
" }",
|
|
" },",
|
|
" computed: {",
|
|
" ...mapState({",
|
|
" // 访问用户信息",
|
|
" userInfo: state => state.d2admin.userInfo",
|
|
" })",
|
|
" },",
|
|
" methods: {",
|
|
" ...mapMutations([",
|
|
" // 操作公用数据",
|
|
" 'd2adminUtilDatabase',",
|
|
" // 操作用户私有数据",
|
|
" 'd2adminUtilDatabaseUser'",
|
|
" ])",
|
|
" }",
|
|
"}",
|
|
"</script>",
|
|
"<style lang=\"scss\" scoped>",
|
|
"@import '~@/assets/style/public.scss';",
|
|
".${1:page-name} {",
|
|
" .${1:page-name}_title {",
|
|
" font-size: 14px;",
|
|
" }",
|
|
" // Your page style here",
|
|
" // Do not use empty rulesets",
|
|
" // If the page does not need an additional definition style, please delete",
|
|
"}",
|
|
"</style>"
|
|
],
|
|
"description": "new page"
|
|
},
|
|
// d2-container 组件 header 插槽
|
|
"d2-container-header": {
|
|
"prefix": "dd-container-header",
|
|
"body": [
|
|
"<template slot=\"header\">${1:header}</template>"
|
|
],
|
|
"description": "d2-container component header slot"
|
|
},
|
|
// d2-container 组件 footer 插槽
|
|
"d2-container-footer": {
|
|
"prefix": "dd-container-footer",
|
|
"body": [
|
|
"<template slot=\"footer\">${1:footer}</template>"
|
|
],
|
|
"description": "d2-container component footer slot"
|
|
},
|
|
// 图标组件
|
|
"d2-icon": {
|
|
"prefix": "dd-icon",
|
|
"body": [
|
|
"<d2-icon name=\"${1:github}\"/>"
|
|
],
|
|
"description": "d2-icon component"
|
|
}
|
|
}
|