细节优化
This commit is contained in:
@@ -6,12 +6,22 @@ const props = defineProps({
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const bgs = ref(["../static/app-bg.png", "../static/app-bg2.png"]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="background">
|
||||
<image class="bg-image" :src="bgs[type]" mode="widthFix" />
|
||||
<image
|
||||
class="bg-image"
|
||||
v-if="type === 0"
|
||||
src="../static/app-bg.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<image
|
||||
class="bg-image"
|
||||
v-if="type === 1"
|
||||
src="../static/app-bg2.png"
|
||||
mode="widthFix"
|
||||
/>
|
||||
<view class="bg-overlay" v-if="type === 0"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user