"图片处理"组件:<ai-image> —— 快应用组件库H-UI

<import name="ai-image" src="../Common/ui/h-ui/ai/c_ai_image"></import>
<template>
    <div class="container">
        <ai-image></ai-image>
    </div>
</template>

<style lang="less">
    @import '../Common/styles/container.less';
</style>

<import name="ai-image" src="../Common/ui/h-ui/ai/c_ai_image"></import>
<template>
    <div class="container">
        <ai-image target-id="aiimage2" size="60" color="primary" bg-color="bg-primary" scale="3.0"></ai-image>
        <image src="{{uri}}"></image>
    </div>
</template>

<style lang="less">
    @import '../Common/styles/container.less';
</style>

<script>
    export default {
        private: {
            uri:''
        },
        onInit() {
            this.$on('aiDetectAestheticsScore_dispatchEvt',this.dispatchScoreEvt)//图像评分结果监控
            this.$on('aiImageSave_dispatchEvt',this.dispatchSaveEvt)//图像保存行为监控
        },
        dispatchScoreEvt(evt) {
            var data = evt.detail.value
            console.info('图像评分结果为:' + data.score)
        },
        dispatchSaveEvt(evt) {
            var data = evt.detail.value
            this.uri = data.uri
        }
    }
</script>

观看抖音视频演示

posted @ 2020-04-20 21:15  快应用HUI  阅读(346)  评论(0编辑  收藏  举报