你可以通过npm
或yarn
下载
npm install tingfeng
yarn add tingfeng
main.ts
中引用
import TingFengUI from 'tingfeng'
import 'tingfeng/css';
app.use(TingFengUI)
Tbutton
组件示例
<script lang="ts" setup>
const click = (e: MouseEvent) => {
console.log(e);
};
</script>
<template>
<Tbutton size="large" type="primary" @handleClick="click">测试组件</Tbutton>
</template>
<style lang="less" scoped></style>
tsconfig.json
中添加types
字段
{
"compilerOptions": {
"types": ["tingfeng/src/components.d.ts"]
}
}