Coder Social home page Coder Social logo

254311563 / vue-devui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devcloudfe/vue-devui

0.0 0.0 0.0 3.98 MB

一个基于 DevUI Design 设计体系的 Vue3 组件库,使用最新的 Vite + Vue3 + TypeScript + JSX 搭建,包含60多个简洁、易用、灵活的组件。

Home Page: https://vue-devui.github.io

License: MIT License

JavaScript 4.03% TypeScript 74.31% SCSS 17.46% HTML 0.02% Vue 4.16% Shell 0.01%

vue-devui's Introduction

DevUI Logo

Vue DevUI 是 Vue3 版本的 DevUI 组件库,基于 https://github.com/devcloudfe/ng-devui,倡导沉浸灵活至简的设计价值观。

DevUI 官方网站:https://devui.design

当前状态: Beta

该项目还处于孵化和演进阶段,欢迎大家参与到 Vue DevUI 项目的建设中来!🎉🎉

通过参与 Vue DevUI 项目,你可以:

  • 🔥 学习最新的 Vite+Vue3+TypeScript+JSX 技术
  • 🎁 学习如何设计和开发组件
  • ⭐ 参与到开源社区中来
  • 🎊 结识一群热爱学习、热爱开源的朋友

贡献指南

快速开始

1 安装依赖

yarn(推荐)

or

npm i

2 启动

yarn dev(推荐)

or

npm run dev

3 访问

http://localhost:3000/

4 生产打包

yarn build(推荐)

or

npm run build

使用 Vue DevUI

1. 安装

yarn add vue-devui

2. 全量引入

main.ts文件中编写以下代码:

import { createApp } from 'vue'
import App from './App.vue'

// Step 1: 引入 Vue DevUI 组件库
import DevUI from 'vue-devui'
// Step 2: 引入组件库样式
import 'vue-devui/style.css'

createApp(App)
.use(DevUI) // Step 3: 使用 Vue DevUI
.mount('#app')

3. 按需引入

除了全量引入,我们也支持单个组件按需引入。

main.ts文件中编写以下代码:

import { createApp } from 'vue'
import App from './App.vue'

// Step 1: 引入单个组件
import { Button } from 'vue-devui'
// or import Button from 'vue-devui/button'
// Step 2: 引入组件样式
import 'vue-devui/button/style.css'

createApp(App)
.use(Button) // Step 3: 使用组件
.mount('#app')

4. 配置自动按需引入unplugin-vue-components(推荐)

配置unplugin-vue-components插件可以无需引入Vue DevUI就可以直接按需使用其中的组件,具体使用方式如下:

vite.config.ts文件中添加以下代码:

import Components from 'unplugin-vue-components/vite'
import { DevUiResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({
  plugins: [
    vue(),

    // 新增
    Components({
      resolvers: [
        DevUiResolver()
      ]
    })
  ]
})

配置了以上插件,就可以直接在代码中使用Vue DevUI的组件,而无需在main.ts文件中引入Vue DevUI

5. 使用

<template>
  <d-button>确定</d-button>
</template>

图标库

图标库推荐使用DevUI图标库,也可以使用第三方图标库,比如:iconfont。

使用DevUI图标库

安装

yarn add @devui-design/icons(推荐)

or

npm i @devui-design/icons

引入

main.ts文件中,编写以下代码:

import '@devui-design/icons/icomoon/devui-icon.css'

使用

<d-icon name="love" color="red"></d-icon>

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Kagol

🚧 💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT

vue-devui's People

Contributors

kagol avatar situc avatar alanlee97 avatar imnull avatar ivestszheng avatar zcating avatar elsaooo avatar asdlml6 avatar micd0704 avatar panyongxu avatar tmac2015 avatar c0dedance avatar liuxdi avatar lnzhangsong avatar erkelost avatar jensonmiao avatar liusuy avatar chenxi24 avatar catsandmice avatar git-where avatar nidusp avatar jecyu avatar jxhhdx avatar xiaoborao avatar gaoneng-www avatar unfound avatar cuiaiguanggh avatar foreseebear avatar minglye avatar qq154239735 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.