f-vue-ui-library
v0.1.6
Published
```` npm install f-vue-ui-library --save ````
Downloads
9
Readme
安装
npm install f-vue-ui-library --save
使用
全局引入
main.ts中
import fVueUi from 'f-vue-ui-library'
import 'f-vue-ui-library/style.css';
const app = createApp(App)
app.use(fVueUi)
vue页面中使用
<f-button type="primary">主要按钮</f-button>
按需引入
main.ts中引入组件样式
import 'f-vue-ui-library/style.css';
vue页面中使用
<template>
<f-button type="primary" @click="showLoading">主要按钮</f-button>
<br>
<f-button
type="primary"
v-loading="isShowLoading"
@click="showDirectiveLoading"
>
指令方式
</f-button>
</template>
<script setup>
import { ref } from 'vue';
import { fButton, loading, vLoading } from 'f-vue-ui-library';
const isShowLoading = ref(false);
const showLoading = () => {
loading.show();
};
const showDirectiveLoading = () => {
isShowLoading.value = true;
};
</script>