auto-element

A Component Library for Vue.js.
2,139 8
Install
npm install auto-element
Latest Version:0.0.6
Vue:2
License:MIT
Last Updated:Mar 14, 2025
Links: GitHub  ·  npm
Maintainer: ffgenius

说明

auto-element 全面兼容 element-ui v2.15.14,该库主要用于大屏缩放方案页面缩放计算后,弹出层偏移的情况(例如 autofit.js 等)。

以 autofit.js 为例:

// 目前只支持 autofit 挂载至 body
autofit.init({
  el: 'body',
  ...
})
// 弹出层组件例如 el-select 
// popper-append-to-body 只能为 false(挂载至 body)

main.js

// offset 指定 autofit 挂载的dom,目前也只能支持 body
Vue.use(AutoElement, { offset: 'body' })

安装

npm install auto-element -S

使用

import Vue from 'vue'
import AutoElement from 'auto-element'

Vue.use(AutoElement, { offset: 'body' })

// or
import {
  Select,
  Button
  // ...
} from 'auto-element'

Vue.component(Select.name, Select)
Vue.component(Button.name, Button)

感谢

方案来自 !issue

thanks wanglei1020 LarryZhu-dev

Related Packages

element-ui

A Component Library for Vue.js.

7,444,104 54,005
element-gui

A Component Library for Vue.js.

181,612
element-ui-qz

A Component Library for Vue.js.

90,083 54,008
zydx-plus

Vue.js

34,448
aos-element

A Component Library for Vue.js.

26,918

Version History

Version Released Vue License
0.0.6 ^2.5.17 MIT
0.0.5 ^2.5.17 MIT
0.0.4 ^2.5.17 MIT
0.0.3 ^2.5.17 MIT
0.0.2 ^2.5.17 MIT