New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

oeos-components

Package Overview
Dependencies
Maintainers
1
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oeos-components

Vue3 中基于Element-plus二次封装基础组件文档

latest
Source
npmnpm
Version
0.3.96
Version published
Maintainers
1
Created
Source

element-plus二次封装

使用vue3+element-plus封装前端组件。以利于前端组件化和工程化开发

1. 组件的使用

在vue3项目的main.js里引入

import 'oeos-components/dist/style.css'
import OeosComponets from 'oeos-components'
app.use(OeosComponets)

在任何一个.vue文件下, 可直接引入组件

<o-button>这是o-button</o-button>
<o-title title="这是o-title"></o-title>

2. 在vue3项目中使用公共函数, 安装@oeos-components/utils

// 如果想将所有函数挂载至全局使用
import * as utils from '@oeos-components/utils'
// 将oeos-components下的公共函数赋值到全局
Object.keys(utils).forEach((v) => {
  app.config.globalProperties[v] = utils[v]
})
然后通过`proxy.$toast('哈哈')`, 这种方式去使用函数

// 如果想单独的引用某个函数
import { $toast } from '@oeos-components/utils'
$toast('嘿嘿')

3. 在vue3项目中使用自定义指令

当前项目支持的自定义指令有以下

v-copy
v-number
v-focus

更多内容请查看文档

Keywords

oeos

FAQs

Package last updated on 04 Apr 2026

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