1.1.15 • Published 10 months ago
glasssix-ui-demo v1.1.15
快速入门
下载依赖
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 {};
问题:下载出错
方案:切换下载源多试几次
1.1.1
10 months ago
1.1.0
10 months ago
1.1.9
10 months ago
1.1.8
10 months ago
1.1.7
10 months ago
1.1.6
10 months ago
1.1.5
10 months ago
1.1.3
10 months ago
1.1.2
10 months ago
1.1.12
10 months ago
1.1.11
10 months ago
1.1.10
10 months ago
1.1.15
10 months ago
1.1.14
10 months ago
1.1.13
10 months ago
1.0.22
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.0
1 year ago