# image
图片



# 属性
属性名 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
src | String | 否 | 图片资源地址,支持本地路径和网络图片资源 |
# 示例
<template>
<image src="{{imageSrc}}" style="width: 682px;height:600px;"></image>
</template>
<script>
class Image {
data = {
imageSrc: require('../images/chameleon.jpg'),
};
methods = {
imageLoad(e) {},
imageError(e) {},
};
}
export default new Image();
</script>
<style scoped>
.container {
display: flex;
flex-direction: column;
align-items: center;
}
</style>
<script cml-type="json">
{
"base": {}
}
</script>