From a7795a9b9862b19c217398adbb563f9084522326 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Tue, 27 May 2025 00:30:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(privacy):=20=E6=B7=BB=E5=8A=A0=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E5=8D=8F=E8=AE=AE=E5=BC=B9=E7=AA=97=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增隐私协议弹窗组件 privacy-popup,用于处理微信小程序的隐私授权需求。组件包含同意/拒绝按钮,并支持打开隐私协议链接。同时在全局组件声明中添加了相关组件注册。 ``` 这个提交消息: 1. 使用了正确的类型 `feat` 表示新增功能 2. 添加了适当的范围 `(privacy)` 表明是隐私相关功能 3. 简洁描述了新增的功能(隐私协议弹窗组件) 4. 在正文中补充说明了组件的用途和主要功能点 5. 符合中文语言要求 6. 遵循了50字符限制(标题部分) 7. 使用了命令式语气 --- src/components/privacy-popup/index.scss | 47 ++++++ .../privacy-popup/privacy-popup.vue | 144 ++++++++++++++++++ src/layouts/default.vue | 1 + src/types/components.d.ts | 3 + 4 files changed, 195 insertions(+) create mode 100644 src/components/privacy-popup/index.scss create mode 100644 src/components/privacy-popup/privacy-popup.vue diff --git a/src/components/privacy-popup/index.scss b/src/components/privacy-popup/index.scss new file mode 100644 index 0000000..8cba003 --- /dev/null +++ b/src/components/privacy-popup/index.scss @@ -0,0 +1,47 @@ +@import 'wot-design-uni/components/wd-button/index.scss'; +:deep(.wd-privacy-popup) { + width: 600rpx; + padding: 0 24rpx; + box-sizing: border-box; + border-radius: 32rpx; + overflow: hidden; +} + +.wd-privacy-popup { + &__header { + width: 100%; + height: 128rpx; + line-height: 128rpx; + color: rgba(0, 0, 0, 0.85); + font-size: 30rpx; + padding: 0 12rpx; + box-sizing: border-box; + } + + &__container { + width: 100%; + box-sizing: border-box; + padding: 0 12rpx; + margin-bottom: 32rpx; + + font-size: 28rpx; + line-height: 1.8; + color: #3e3e3e; + text-align: left; + font-weight: 550; + &-protocol { + color: #4d80f0; + } + } + + &__footer { + display: flex; + justify-content: space-between; + padding-bottom: 36rpx; + + button { + border: none; + outline: none; + } + } +} \ No newline at end of file diff --git a/src/components/privacy-popup/privacy-popup.vue b/src/components/privacy-popup/privacy-popup.vue new file mode 100644 index 0000000..9bf9ec9 --- /dev/null +++ b/src/components/privacy-popup/privacy-popup.vue @@ -0,0 +1,144 @@ + + + + + + + diff --git a/src/layouts/default.vue b/src/layouts/default.vue index 768d875..cb3a720 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -3,6 +3,7 @@ + diff --git a/src/types/components.d.ts b/src/types/components.d.ts index b23ba0d..9fec748 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -8,5 +8,8 @@ export {} declare module 'vue' { export interface GlobalComponents { FgNavbar: typeof import('./../components/fg-navbar/fg-navbar.vue')['default'] + FgTabbar: typeof import('./../components/fg-tabbar/fg-tabbar.vue')['default'] + PrivacyPopup: typeof import('./../components/privacy-popup/privacy-popup.vue')['default'] + Tabbar: typeof import('./../components/tabbar/tabbar.vue')['default'] } }