1.5.2 • Published 5 years ago

vue-float-preview v1.5.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue-float-preview

This component ONLY supports mouse operations!

A Floating Previewer for Vue.js.

https://www.iwyvi.com/vue-float-preview/

Install

yarn

yarn add vue-float-preview

npm

npm install --save vue-float-preview

Quick Start

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.

Document

Attributes

AttributeDescriptionTypeAccepted ValuesDefault
srcsrc of the imagestring--
thumbSrcsrc of the thumbnailstring--
disabledwhether functions of the component is disabledboolean-false
scalewhether scale of image when hovering is enabledboolean-true
thumbSizewhether thumbnail fill the blockcontain / autocontain
show-delaythe delay before showing the previewernumber-150
hide-delaythe delay before hiding the previewernumber-100
offset-xthe X-axis offset of the previewer (should always be positive)number-40
offset-ythe Y-axis offset of the previewernumber--40
content-styleCSS style of contentobject--
max-widthmaximum width of the previewernumber--
max-heightmaximum height of the previewernumber--
widthwidth of the previewernumber--
heightheight of the previewernumber--
icon-themetheme of iconsstringlight / darklight

Slots

NameDescriptionOptional
defaultbase content (will replace default image block)Y
previewcontent in previewer (will replace default image block in previewer)Y

Events

Event NameDescriptionParameters
onPreviewShowtriggers when previewer shows-
onPreviewHidetriggers when previewer hides-

Global Options

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.

Development

Setup

Please use yarn to install dependencies.

git clone git@github.com:IwYvI/vue-float-preview.git

# install dependencies
yarn

Build

yarn dist

Start development server

yarn dev

LICENSE

MIT

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago