This component ONLY supports mouse operations!
A Floating Previewer for Vue.js.
https://www.iwyvi.com/vue-float-preview/
yarn add vue-float-preview
npm install --save vue-float-preview
import Vue from 'vue';
import VueFloatPreview from 'vue-float-preview';
Vue.use(VueFloatPreview, OPTIONS);
<template>
<float-preview src="IMAGE_SRC"></float-preview>
</template>
For more information, please refer to Examples.
Attribute | Description | Type | Accepted Values | Default |
---|---|---|---|---|
src | src of the image | string | - | - |
thumbSrc | src of the thumbnail | string | - | - |
disabled | whether functions of the component is disabled | boolean | - | false |
scale | whether scale of image when hovering is enabled | boolean | - | true |
thumbSize | whether thumbnail fill the block | contain / auto | contain | |
show-delay | the delay before showing the previewer | number | - | 150 |
hide-delay | the delay before hiding the previewer | number | - | 100 |
offset-x | the X-axis offset of the previewer (should always be positive) | number | - | 40 |
offset-y | the Y-axis offset of the previewer | number | - | -40 |
content-style | CSS style of content | object | - | - |
max-width | maximum width of the previewer | number | - | - |
max-height | maximum height of the previewer | number | - | - |
width | width of the previewer | number | - | - |
height | height of the previewer | number | - | - |
icon-theme | theme of icons | string | light / dark | light |
Name | Description | Optional |
---|---|---|
default | base content (will replace default image block) | Y |
preview | content in previewer (will replace default image block in previewer) | Y |
Event Name | Description | Parameters |
---|---|---|
onPreviewShow | triggers when previewer shows | - |
onPreviewHide | triggers when previewer hides | - |
Vue.use(VueFloatPreview, {
showDelay: 300,
iconTheme: 'dark'
})
Available options: scale
, thumbSize
, showDelay
, hideDelay
, offsetX
, offsetY
, contentStyle
, maxWidth
, maxHeight
, width
, height
, iconTheme
.
Refers to the document of Attributes.
Please use yarn
to install dependencies.
git clone [email protected]:IwYvI/vue-float-preview.git
# install dependencies
yarn
yarn dist
yarn dev
vue-float-preview's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.