guqingping-ui
v0.0.33
Published
It's a temp for learn how to build a ui library, Do not install it Thanks<br> [Document](https://guqingping.github.io/guqingping-ui/?lang=en)
Downloads
9
Readme
guqingping-ui
It's a temp for learn how to build a ui library, Do not install it Thanks Document
Install
npm i guqingping-ui
Import
Import All Use All
//main.js
import App from './App.vue'
const app = createApp(App)
import guqingping_ui from 'guqingping-ui'
import "guqingping-ui/css"
app.use(guqingping_ui)
app.mount('#app')
Import All Use Part
//main.js
import "guqingping-ui/css"
//component.vue
import { gqp_notification } from "guqingping-ui"
Usage
import { gqp_notification } from "guqingping-ui"
import { ref, onMounted, getCurrentInstance } from "vue"
const notification = ref(function () { console.log("Function replace failed") })
onMounted(() => {
let { $refs } = (getCurrentInstance()).proxy;
notification.value = $refs["gqp_notification_ref"].notification
})
<template>
<gqp_notification ref="gqp_notification_ref"></gqp_notification>
<div @click="notification({ text: 'a full screen notification' })">Click to show notification</div>
</template>