67 lines
1.6 KiB
Plaintext
67 lines
1.6 KiB
Plaintext
{
|
|
"Vue3 SFC with SCSS": {
|
|
"prefix": "v3",
|
|
"scope": "vue",
|
|
"body": [
|
|
"<script setup lang=\"ts\">",
|
|
"",
|
|
"</script>",
|
|
"",
|
|
"<template>",
|
|
" <div>",
|
|
" ${1:content}",
|
|
" </div>",
|
|
"</template>",
|
|
"",
|
|
"<style lang=\"scss\" scoped>",
|
|
"${2}",
|
|
"</style>"
|
|
],
|
|
"description": "Vue 3 SFC template with SCSS (script setup, TypeScript)"
|
|
},
|
|
"Print AoDesignComponent TSX": {
|
|
"scope": "typescriptreact",
|
|
"prefix": "atsx",
|
|
"body": [
|
|
"import { defineComponent } from 'vue';",
|
|
"import { getPrefixCls } from '../_utils/getPrefixCls';",
|
|
"",
|
|
"export default defineComponent({",
|
|
" name: '${1:AoComponent}',",
|
|
" props: {",
|
|
" class: {",
|
|
" type: [String, Array, Object],",
|
|
" default: '',",
|
|
" },",
|
|
" style: {",
|
|
" type: Object,",
|
|
" default: () => ({}),",
|
|
" },",
|
|
" },",
|
|
" emits: [],",
|
|
" setup(props, { slots, emit }) {",
|
|
" const prefixCls = getPrefixCls('${2:component}');",
|
|
" return () => (",
|
|
" <div class={[prefixCls, props.class]} style={{ ...props.style }}>",
|
|
" {slots.default?.()}",
|
|
" </div>",
|
|
" );",
|
|
" }",
|
|
"})"
|
|
]
|
|
},
|
|
"Print AoDesignComponent SCSS": {
|
|
"scope": "scss",
|
|
"prefix": "ascss",
|
|
"body": [
|
|
"@use '../_styles/_variables.scss' as *;",
|
|
"@use 'sass:color';",
|
|
"",
|
|
"$${1:component}-prefix: '#{$$prefix}-${1:component}';",
|
|
"",
|
|
".#{$${1:component}-prefix} {",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
|