Giter Site home page Giter Site logo

yunshangzhou / ysz-ui Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 5.08 MB

这是一个基于vite vue3搭建的PC端组件库。它记录日常开发中遇到的需求组件,或是在技术社区中所遇到、值得去实现的组件。

Home Page: https://cloud-prg.github.io/ysz-ui/#/

HTML 0.60% Vue 86.07% JavaScript 8.95% SCSS 2.52% CSS 1.60% Shell 0.26%

ysz-ui's Introduction

介绍

这是一个基于vite vue3搭建的PC端组件库。它记录日常开发中遇到的需求组件,或是在技术社区中所遇到、值得去实现的组件。

全局安装

安装命令: npm install ysz-ui -S

项目中引用(一次性引入)

main.js下,引入以下两行代码。

 // src/main.js
 import yszUI from "ysz-ui";
 import "ysz-ui/dist/style.css";
 import "ysz-ui/dist/iconfont.css";

 app.use(yszUI)

按需引入

  1. src目录下创建相关目录(如yszui)
  2. 在相关目录下,创建index.js
  3. index.js中引入需使用的组件。并以install作为函数表达式,作为对象的一员暴露出去。
  4. main.js中的Vue实例中使用它。

引用文件示例

// yszui/index.js
import { button, table } from 'ysz-ui'
const yszUI = {
  install: function (Vue) {
    Vue.use(button)
    Vue.use(table)
  }
}
export default yszUI

主文件示例

// src/main.js
import yszUI from "./yszui";
import { createApp} from "vue";
import App from "./App.vue";
const app = createApp(App);

app.use(yszUI);

项目地址

注意事项

该组件库仅用于个人学习,且处于开发阶段,切勿用于生产环境。

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.