food_wechat/components/mainBut/mainBut.vue
air ae63df0591 【类 型】:fix
【原  因】:按钮冒泡问题 点击不跳转
【过  程】:首页按钮组件 链接改为参数放到 组件内部  修改像是解决 按钮冒泡问题
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
2025-01-16 12:24:40 +08:00

73 lines
1.1 KiB
Vue

<template>
<navigator :url="url">
<view class="flex column boxshadow rad32 but mac ofh" :style="{background:bg}">
<view class="imgBox">
<u--image :src="imgSrc" width="188rpx" height="188rpx"></u--image>
</view>
<view class="tc w100 fb butBt fci fz44 l-h-12">{{butBt}}</view>
<view class="tc w100 butSt fci fz32">{{butSt}}</view>
</view>
</navigator>
</template>
<script>
export default {
name: "mainBut",
data() {
return {
};
},
props: {
url:{
type:String,
required: true,
},
bg: {
type: String,
default: '',
required: true,
deep: true
},
imgSrc: {
type: String,
default: '',
required: true,
deep: true
},
butBt: {
type: String,
default: '',
required: true,
deep: true
},
butSt: {
type: String,
default: '',
required: true,
deep: true
},
},
}
</script>
<style lang="scss">
.but {
width: 339rpx;
height: 339rpx;
}
.imgBox {
width: 188rpx;
height: 188rpx;
margin-top: 36rpx;
}
.butBt {
height: 48rpx;
}
.butSt {
height: 40rpx;
}
</style>