Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>tools-code-snippetsNew to Visual Studio Code? Get it now.
tools-code-snippets

tools-code-snippets

haobin

|
209 installs
| (0) | Free
代码提示工具
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

快速生成代码块

vue3 的组件模板

import { watchEffect } from 'vue'
import { useDefineComponent, useReactive } from '@lt/vue-hooks';
import './index.scss';

// interface
interface IProps {
}

const Name = useDefineComponent<IProps>({
    props: [],
    setup(props, { attrs }) {
        return () => {
            return <div class=''></div>;
        }
    }
})

export default Name

scss/sass 文件模板

$prefixCls: "";

.#{$prefixCls} {

}

自定义 hooks

useReactive

const [value, setValue] = useReactive(initialState.value)

useChildren

const children = useChildren(slots)

useMounted

const isMounted = useMounted()

useDispatch

const dispatch = useDispatch()

useSelector

const { } = useSelector((rootState) => ({

}));

useSubscribe

const [{ }] = useSubscribe((rootState) => ({

}));

文件引入

tool-components

import {} from '@lt/tool-components'

tool-base

import {} from '@lt/tool-base'

line-style

import {} from '@lt/line-style'

vue-hooks

import {} from '@lt/vue-hooks'
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft