https://github.com/mmf-fe/weex-vue-fixed
This component is using for solving the issue that when using vue-router in weex, the DOM elements with position: fixed attribute will never disappear or close on Android devices
https://github.com/mmf-fe/weex-vue-fixed
fixed weex
Last synced: 5 months ago
JSON representation
This component is using for solving the issue that when using vue-router in weex, the DOM elements with position: fixed attribute will never disappear or close on Android devices
- Host: GitHub
- URL: https://github.com/mmf-fe/weex-vue-fixed
- Owner: MMF-FE
- License: apache-2.0
- Created: 2017-02-24T07:53:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-25T06:58:20.000Z (over 8 years ago)
- Last Synced: 2025-05-06T21:06:55.057Z (5 months ago)
- Topics: fixed, weex
- Language: TypeScript
- Homepage: https://github.com/alibaba/weex/issues/2310
- Size: 42 KB
- Stars: 6
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README-CN.md
- License: LICENSE
Awesome Lists containing this project
README
# weex-vue-fixed
这个组件,解决了 weex 使用 `vue-router`, 带有 `position: fixed` 属性的 DOM
在 android 不会消失的[问题](https://github.com/alibaba/weex/issues/2310)## 安装
```
npm i weex-vue-fixed --save-dev
# or
yarn add weex-vue-fixed --dev
```## 配置
```js
import Vue from 'vue'
import Router from 'vue-router'
import weexVueFixed from 'weex-vue-fixed'Vue.use(weexVueFixed)
Vue.use(Router)let router = new Router({
// you config
})router.beforeEach((to, from, next) => {
Vue.fixedClear() // clear for android
next()
})
```## 使用
```html
This is fixed tag for android , clear safe
```
## 属性 props
| name | type | desc |
|--------|---------|------------|
| left | number | css left |
| right | number | css right |
| bottom | number | css bottom |
| top | number | css top |
| show | boolean | create or destroy |