Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
meihua-island-book
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-27 17:42:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
522a206c05e3b9a4818552b99321e8417af5ba8b
522a206c
1 parent
53ffeda0
房间卡片组件获取字段方式优化
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
src/components/roomCard.vue
src/components/roomCard.vue
View file @
522a206
<!--
* @Date: 2023-12-13 13:42:23
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-27 1
6:0
1:27
* @LastEditTime: 2023-12-27 1
7:4
1:27
* @FilePath: /meihuaApp/src/components/roomCard.vue
* @Description: 房间详情组件
-->
...
...
@@ -148,6 +148,27 @@ onMounted(() => {
room_type.value = props.data.room_type;
});
watch(
() => props.data,
(val) => {
if (val) {
id.value = val.id;
cover.value = val.cover ? val.cover : 'https://cdn.ipadbiz.cn/meihua/img1@2x.png';
title.value = val.title;
room_num.value = val.room_num;
capacity.value = val.capacity;
num.value = val.num;
original_price.value = val.original_price;
discount_price.value = val.discount_price;
room_type.value = val.room_type;
}
},
{
deep: true,
immediate: true
}
);
</script>
<style lang="less">
...
...
Please
register
or
login
to post a comment