【类 型】:factor

【原  因】:向父级传送 点击事件  父级可以绑定对应
【过  程】:组件内部创建点击事件并向父级传递
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
sszdot 2025-01-06 15:52:23 +08:00
parent 96a517e1ca
commit 663958eff6

View File

@ -1,11 +1,11 @@
<template> <template>
<view class="flex msb m-l-24 m-r-24 m-t-24 p-24 bg-w rad8 boxshadow"> <view class="flex msb m-l-24 m-r-24 m-t-24 p-24 bg-w rad8 boxshadow" @click="handleClick">
<view class="flex mac l-h-18"> <view class="flex mac l-h-18">
<view class="fz28 l-h-18">{{cellTit}}</view> <view class="fz28 l-h-18">{{cellTit}}</view>
<view v-if="required===true" class="bg-m rad-c l-h-18 m-l-24 reqBox"></view> <view v-if="required===true" class="bg-m rad-c l-h-18 m-l-24 reqBox"></view>
</view> </view>
<view class="fcb fz28 flex mac"> <view class="fcb fz28 flex mac">
<view class="fz24">口味偏好等要求</view> <view class="fz24">{{cellCon}}</view>
<u-icon name="arrow-right" size="28rpx"></u-icon> <u-icon name="arrow-right" size="28rpx"></u-icon>
</view> </view>
</view> </view>
@ -24,11 +24,21 @@
cellTit: { cellTit: {
type: String type: String
}, },
//cell
cellCon: {
type: String
},
// //
required: { required: {
type: Boolean, type: Boolean,
default: false default: false
} }
},
methods: {
handleClick() {
//
this.$emit('click');
}
} }
} }
</script> </script>