npm install face-age vue-face-age
or
yarn add face-age vue-face-age
import VueFaceAge from "vue-face-age";
export default {
components: {
faceage: VueFaceAge
},
data: function() {
return {
faceAgeOptions: {
faceageId: '<Face Age Client Id>',
type: 'skincare-analyzer'
}
};
},
methods: {
onLoad(req) {
console.log(req);
},
}
}
To use face analysis with minimal settings, write as follows:
<template>
<div class="demo">
<faceage :options="faceAgeOptions" :onLoad="onLoad"></faceage>
</div>
</template>
If you want to change the global default options, you can use object options
.
String
'skincare'
'skincare'
: create a new crop box'skincare-analyze'
: move the canvasDefine the analysis display mode. If you set the type to skincare, only the possibility of receiving the image will be displayed, while the skincare-analyze value is entered, the image will be received and the received data will also be displayed.
Array
['dark_circle', 'eye_bag', 'eye_wrinkles', 'deep_wrinkles', 'wrinkles', 'acnes', 'pores', 'pigment']
You can set it to display more limited analysis information.
Boolean
true
You can set it to use the camera to load the image.
Boolean
true
You can specify whether users can upload images.
Boolean
true
Ability to display analysis points on the face.