Commit db4b7a98 by Lin

feat(CustomerSide):增强组件,添加导航和样式更新

- 在 CustomerSideSide 组件中新增了一个导航选项,用于访问自定义文件
- 更新了组件的模板和样式,以改善布局和响应式表现
-- 引入了一个新属性,用于根据类型管理组件行为
1 parent a3e90c84
<template> <template>
<view class="container-right"> <view :class="['container-right', { 'container-right--page': type === 'in' }]">
<view class="customer-header"> <view class="customer-header">
<!-- 左 --> <!-- 左 -->
<view class="header-left"> <view class="header-left">
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
</view> </view>
<!-- 右 --> <!-- 右 -->
<view class="header-right"> <view class="header-right" v-if="type === 'out'" @click="handleGoCustomerFiles">
<view class="header-right-icon"> <view class="header-right-icon">
<view class="sprite-icon icon-customer-add"></view> <view class="sprite-icon icon-customer-add"></view>
</view> </view>
...@@ -110,6 +110,12 @@ const MOCK_CUSTOMER_LIST = [ ...@@ -110,6 +110,12 @@ const MOCK_CUSTOMER_LIST = [
export default { export default {
name: 'CustomerSide', name: 'CustomerSide',
props: {
type: {
type: String,
default: 'out'
}
},
data() { data() {
return { return {
customerList: MOCK_CUSTOMER_LIST, customerList: MOCK_CUSTOMER_LIST,
...@@ -125,6 +131,13 @@ export default { ...@@ -125,6 +131,13 @@ export default {
} }
}, },
methods: { methods: {
handleGoCustomerFiles() {
uni.navigateTo({
url: '/pages/common/customFiles/addFiles',
animationType: 'pop-in',
animationDuration: 100
})
},
handleCustomerItemClick(item) { handleCustomerItemClick(item) {
console.log('点击客户卡片:', item) console.log('点击客户卡片:', item)
} }
...@@ -141,6 +154,14 @@ export default { ...@@ -141,6 +154,14 @@ export default {
flex-direction: column; flex-direction: column;
background-color: #ffffff; background-color: #ffffff;
&--page {
background-color: transparent;
.customer-header {
justify-content: flex-end;
}
}
.customer-header { .customer-header {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -153,6 +174,7 @@ export default { ...@@ -153,6 +174,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 4px; gap: 4px;
cursor: pointer;
.header-left-icon { .header-left-icon {
width: 24px; width: 24px;
......
...@@ -155,6 +155,12 @@ ...@@ -155,6 +155,12 @@
} }
}, },
{ {
"path": "pages/common/customFiles/addFiles",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/caseDetail", "path": "pages/common/caseDetail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!