Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

g6-ui

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

g6-ui

前端常用小组件

  • 1.0.10
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

快速入门


下载依赖
npm i g6-ui -S
or
yarn add g6-ui -S
项目中使用

全局引入

import { createApp } from 'vue'
import App from './App.vue'
import GUI from 'g6-ui'
import 'g6-ui/es/style.css'

const app = createApp(App)
app.use(GUI).mount('#app')
<template>
  <g-select-time></g-select-time>
</template>
<script setup lang="ts"></script>
<style lang="less" scoped></style>

按需引入

import { createApp } from 'vue'
import App from './App.vue'
import 'g6-ui/es/style.css'

const app = createApp(App)
app.mount('#app')
<template>
  <g-select-time></g-select-time>
</template>
<script setup lang="ts">
import { GSelectTime } from 'g6-ui'
</script>
<style lang="less" scoped></style>
常见问题

问题:在全局引入时会丢失类型提示
方案:在tsconfig.json中添加components.d.ts文件,代码如下:

// tsconfig.json
{
  "compilerOptions": {
    ...
  },
  "include": ["...其他配置...", "components.d.ts"],
}
// components.d.ts
import "@vue/runtime-core";
declare module "@vue/runtime-core" {
  export interface GlobalComponents {
    GButton: typeof import("g6-ui")["GButton"];
    GSelectTime: typeof import("g6-ui")["GSelectTime"];
    ...
  }
}
export {};


问题:下载出错
方案:切换下载源多试几次

Keywords

FAQs

Package last updated on 25 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc