Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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 {};
问题:下载出错
方案:切换下载源多试几次
FAQs
The npm package g6-ui receives a total of 0 weekly downloads. As such, g6-ui popularity was classified as not popular.
We found that g6-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.