这个是正常情况
这个是使用渲染函数后
import { defineComponent, withCtx, h, toRefs, resolveComponent, openBlock, createBlock, createElementVNode, createVNode } from 'vue';
import './index.scss';
export default defineComponent({
props: {
src: {
type: String,
default: '',
},
lazyLoad: {
type: Boolean,
default: true,
},
mode: {
type: String,
default: 'scaleToFill',
},
},
setup () {},
render(ctx: any) {
const resolveComponentView = resolveComponent('uni-view');
return (openBlock(), createBlock(resolveComponentView, {
class: 'bl-image-box width-100 height-100',
}, {
default: withCtx(_ => [
createElementVNode('uni-image', {
class: 'width-100 height-100',
src: ctx.src,
mode: ctx.mode,
lazyLoad: ctx.lazyLoad,
}, null, 8/* PROPS */, ['src', 'mode', 'lazyLoad'])
], undefined, true),
_: 1
}))
}
});