Releases: vinayakkulkarni/v-image
Releases · vinayakkulkarni/v-image
v2.5.0
2.5.0 (2021-07-20)
Bug Fixes
- add support for
eslint-plugin-prettier
(5193427) - add vue shims for TS intellisense (f4a58d7)
- deps: bump browserslist from 4.16.3 to 4.16.6 (d859b90)
- deps: bump elliptic from 6.5.2 to 6.5.3 (b966237)
- deps: bump elliptic from 6.5.3 to 6.5.4 (7b89f5b)
- deps: bump hosted-git-info from 2.8.8 to 2.8.9 (732dbbd)
- deps: bump ini from 1.3.5 to 1.3.7 (c08c0f4)
- deps: bump lodash from 4.17.15 to 4.17.19 (a683425)
- deps: bump lodash from 4.17.19 to 4.17.21 (d068634)
- deps: bump node-fetch from 2.6.0 to 2.6.1 (873b045)
- deps: bump pug-code-gen from 2.0.2 to 2.0.3 (b73e5a1)
- deps: bump serialize-javascript from 3.0.0 to 3.1.0 (f920adf)
- deps: bump socket.io from 2.3.0 to 2.4.1 (19da8c1)
- deps: bump ws from 7.4.4 to 7.4.6 (1942045)
- deps: bump y18n from 4.0.0 to 4.0.1 (d31f5e3)
- remove example (1051175)
- update ESLint config file 👨🔧 (c7ea33b)
Features
v2.0.2
v2.0.1
v2.0.0
v1.3.0
v1.2.0
chore: release v1.2.0 (#61)
Release 1.1.0
Major Rework done.
Added few more options in the API
Added support for classes as well as styles
Added support for ESM
v 1.0.10
-
RemoveImage
event responsible for notifying user the image is removed. -
placeholder
prop added so a developer can use whatever prop he/she wants to use instead of the hard-coded one.
All credits to @andreasvirkus for this updated version.
v 1.0.9
init 6.
V-Image 📷
- This is on GitHub so let me know if I've b0rked it somewhere, give me a star ⭐ if you like it 🍻
- Demo here -> v-image
✅ Install 👌
npm i v-image
// or
yarn add v-image
✅ Usage 🎓
Register the component globally:
Vue.component('vImage', require('v-image'));
Or use locally
import vImage from 'v-image';
✅ Example 🍀
<v-image alt="Alt Text for the Image" :name="'my-awesome-image'" :img-style="myStyle" @load-image="localVariable"></v-image>
import vImage from 'v-image';
export default {
components: { vImage },
methods: {
localVariable(imageSentFromComponent) {
this.image = imageSentFromComponent;
},
},
data() {
return {
image: '',
myStyle: {
height: '200px',
width: '200px',
},
};
},
};
✅ 📖 Props:
Name | Type | Required? | Description |
---|---|---|---|
name |
String | Yes | For name attribute for the input field. |
alt |
String | No | For alt attribute for the input field, mostly for proper SEO. |
imgStyle |
Object | No | Styling for the img tag. |
buttonStyle |
Object | No | Styling for the button & label tag. |
✅ 👂 Events:
load-image
(load the base64 to your custom component's variable (see example)) [default: ""]