juicy-elements
v0.3.0
Published
A Vue 3 based component library for designers and developers
Downloads
16
Readme
English | 简体中文
使用说明
安装依赖
npm install juicy-elements
全局引入
如果你对打包后的文件大小不是很在乎,那么使用完整引入会更方便。
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import JuicyElements from 'juicy-elements';
import 'juicy-elements/dist/index.css';
createApp(App).use(JuicyElements).mount('#app');
- 使用
<template>
<div>
<juicy-button>Default</juicy-button>
<juicy-button type="primary">Primary</juicy-button>
<juicy-button type="success">Success</juicy-button>
<juicy-button type="info">Info</juicy-button>
<juicy-button type="warning">Warning</juicy-button>
<juicy-button type="danger">Danger</juicy-button>
</div>
</template>
按需引入
<template>
<div>
<juicy-button>Default</juicy-button>
</div>
</template>
<script setup>
// 在需要的地方引入
import { JuicyButton } from 'juicy-elements';
</script>