From e86745380e509c7f8f1fb94454d18f9a34e7199f Mon Sep 17 00:00:00 2001 From: mehaotian <490272692@qq.com> Date: Thu, 24 Aug 2023 19:16:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8A=98=E5=8F=A0?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/uni-uvue.css | 4 +- .../uni-collapse-item/uni-collapse-item.vue | 135 +++ components/uni-collapse-item/util.uts | 21 + components/uni-collapse/uni-collapse.vue | 49 + pages/tabBar/API.uvue | 1015 ++++++++--------- pages/tabBar/CSS.uvue | 715 ++++++------ pages/tabBar/component.uvue | 601 +++++----- 7 files changed, 1365 insertions(+), 1175 deletions(-) create mode 100644 components/uni-collapse-item/uni-collapse-item.vue create mode 100644 components/uni-collapse-item/util.uts create mode 100644 components/uni-collapse/uni-collapse.vue diff --git a/common/uni-uvue.css b/common/uni-uvue.css index 127baf67..839c5aee 100644 --- a/common/uni-uvue.css +++ b/common/uni-uvue.css @@ -124,7 +124,9 @@ .uni-navigate-item:active { background-color: #f8f8f8; } - +.is--active { + background-color: #f8f8f8; +} .uni-navigate-text { color: #000000; font-size: 14px; diff --git a/components/uni-collapse-item/uni-collapse-item.vue b/components/uni-collapse-item/uni-collapse-item.vue new file mode 100644 index 00000000..d590cf4e --- /dev/null +++ b/components/uni-collapse-item/uni-collapse-item.vue @@ -0,0 +1,135 @@ + + + + + \ No newline at end of file diff --git a/components/uni-collapse-item/util.uts b/components/uni-collapse-item/util.uts new file mode 100644 index 00000000..57297ad3 --- /dev/null +++ b/components/uni-collapse-item/util.uts @@ -0,0 +1,21 @@ +// import { ComponentPublicInstance } from 'vue' + +// 查找父组件实例 +export function $dispatch( + context : ComponentPublicInstance, + componentName : string, + eventName : string, + ...params : any | null +) { + let parent = context.$parent + let name = parent?.$options?.name + while (parent != null && (name == null || componentName != name)) { + parent = parent.$parent + if (parent != null) { + name = parent?.$options?.name + } + } + if (parent != null) { + parent.$callMethod(eventName, ...params) + } +} \ No newline at end of file diff --git a/components/uni-collapse/uni-collapse.vue b/components/uni-collapse/uni-collapse.vue new file mode 100644 index 00000000..9f071d9c --- /dev/null +++ b/components/uni-collapse/uni-collapse.vue @@ -0,0 +1,49 @@ + + + + + \ No newline at end of file diff --git a/pages/tabBar/API.uvue b/pages/tabBar/API.uvue index 7fd3ec44..f140e7c4 100644 --- a/pages/tabBar/API.uvue +++ b/pages/tabBar/API.uvue @@ -1,522 +1,515 @@ + @import '../../common/uni-uvue.css'; + + .item { + margin-bottom: 12px; + } + + \ No newline at end of file diff --git a/pages/tabBar/CSS.uvue b/pages/tabBar/CSS.uvue index 7e1b6009..94649026 100644 --- a/pages/tabBar/CSS.uvue +++ b/pages/tabBar/CSS.uvue @@ -1,376 +1,363 @@ + @import '../../common/uni-uvue.css'; + .item { + margin-bottom: 12px; + } + \ No newline at end of file diff --git a/pages/tabBar/component.uvue b/pages/tabBar/component.uvue index 56730bb9..cf133814 100644 --- a/pages/tabBar/component.uvue +++ b/pages/tabBar/component.uvue @@ -1,311 +1,314 @@ + @import '../../common/uni-uvue.css'; + + .item { + margin-bottom: 12px; + } + + \ No newline at end of file -- GitLab