vr-shopxo-uniapp/components/diy/auxiliary-blank.vue

56 lines
1.4 KiB
Vue

<template>
<view :style="style_container">
<view :style="style"></view>
</view>
</template>
<script>
import { common_styles_computer } from '@/common/js/common/common.js';
export default {
props: {
propValue: {
type: Object,
default: () => {
return {};
},
},
propkey: {
type: String,
default: '',
}
},
data() {
return {
style_container: '',
style: '',
};
},
watch: {
propkey(val) {
// 初始化
this.init();
}
},
created() {
this.init();
},
methods: {
init() {
const { height } = this.propValue.content;
const { line_color, common_style } = this.propValue.style;
this.setData({
style: `height: ${height * 2}rpx;background: ${line_color || 'transparent'};`,
style_container: common_styles_computer(common_style),
});
},
},
};
</script>
<style scoped lang="scss">
.right-0 {
top: 50%;
transform: translateY(-50%);
}
</style>