chore: 升级 wot-ui 至 2.2.0 并适配暗黑模式主题色

- ConfigProvider 全局配置 button 默认类型、tag 默认变体
- 清理模板中重复的 type=primary 和 variant=plain
- 静态资源 logo.png 迁至 src/static/images/
- 暗黑模式 --wot-filled-oppo 统一组件背景色
This commit is contained in:
Ray.Hao
2026-07-23 23:13:21 +08:00
parent ce01e3cff8
commit 4dd142bb5a
25 changed files with 52 additions and 40 deletions

View File

@@ -21,7 +21,7 @@
<view class="login__body" :style="{ paddingTop: `${statusBarHeight + navBarHeight + 4}px` }">
<!-- Logo -->
<view class="login__brand">
<image class="login__logo" src="/logo.png" mode="aspectFit" />
<image class="login__logo" src="/static/images/logo.png" mode="aspectFit" />
<text class="login__brand-name">youlai-app</text>
</view>
@@ -120,7 +120,7 @@
<!-- 登录按钮 -->
<view class="login__form-item">
<wd-button type="primary" block :loading="isLoading" @click="handleLogin">
<wd-button block :loading="isLoading" @click="handleLogin">
</wd-button>
</view>
@@ -243,7 +243,7 @@
<text class="login__demo-hint-text">演示环境验证码123456</text>
</view>
<wd-button type="primary" block :loading="isBindLoading" @click="handleBindMobile">
<wd-button block :loading="isBindLoading" @click="handleBindMobile">
确认绑定
</wd-button>
</view>

View File

@@ -2,7 +2,7 @@
<view class="page page--padding">
<wd-card>
<view class="about__header">
<image class="about__logo" src="/logo.png" mode="aspectFit" />
<image class="about__logo" src="/static/images/logo.png" mode="aspectFit" />
<view class="about__info">
<text class="about__app-title">youlai-app</text>
<text class="about__app-version">版本 {{ version }}</text>
@@ -172,7 +172,7 @@
{{ currentProject.summary }}
</view>
<view class="about__popup-action">
<wd-button type="primary" block @click="goCurrentProjectRepo">去仓库</wd-button>
<wd-button block @click="goCurrentProjectRepo">去仓库</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -74,7 +74,7 @@
/>
</wd-cell-group>
<view class="p-24rpx">
<wd-button type="primary" size="large" block @click="handleSubmit">提交</wd-button>
<wd-button size="large" block @click="handleSubmit">提交</wd-button>
</view>
</wd-form>
<wd-form
@@ -104,6 +104,7 @@
>
<template #suffix>
<wd-button
type=""
plain
:disabled="mobileCountdown > 0"
@click="handleSendVerificationCode('MOBILE')"
@@ -114,7 +115,7 @@
</wd-input>
</wd-cell-group>
<view class="p-24rpx">
<wd-button type="primary" size="large" block @click="handleSubmit">提交</wd-button>
<wd-button size="large" block @click="handleSubmit">提交</wd-button>
</view>
</wd-form>
<wd-form
@@ -144,6 +145,7 @@
>
<template #suffix>
<wd-button
type=""
plain
:disabled="emailCountdown > 0"
@click="handleSendVerificationCode('EMAIL')"
@@ -154,7 +156,7 @@
</wd-input>
</wd-cell-group>
<view class="p-24rpx">
<wd-button type="primary" size="large" block @click="handleSubmit">提交</wd-button>
<wd-button size="large" block @click="handleSubmit">提交</wd-button>
</view>
</wd-form>
</wd-popup>

View File

@@ -65,7 +65,7 @@
</view>
<view v-if="!isLogin" class="profile-card__action" @click.stop="navigateToLogin()">
<wd-button custom-class="profile-card__button" size="small" type="primary">
<wd-button custom-class="profile-card__button" size="small">
立即登录
</wd-button>
</view>
@@ -81,7 +81,7 @@
/>
<view class="community-card__mask" />
<view class="community-card__logo">
<image src="/logo.png" mode="aspectFit" class="w-full h-full" />
<image src="/static/images/logo.png" mode="aspectFit" class="w-full h-full" />
</view>
<view class="community-card__body">
<view class="community-card__title-row">

View File

@@ -104,7 +104,6 @@
<view class="profile-footer">
<wd-button
class="profile-footer__submit"
type="primary"
size="large"
block
:disabled="!canComplete || isLoading"

View File

@@ -68,7 +68,7 @@
</wd-cell>
</wd-cell-group>
<view class="edit-form__submit">
<wd-button type="primary" size="large" block @click="handleSubmit">提交</wd-button>
<wd-button size="large" block @click="handleSubmit">提交</wd-button>
</view>
</wd-form>
</wd-popup>

View File

@@ -14,7 +14,7 @@
</wd-collapse>
<view class="agreement__action">
<wd-button type="primary" block @click="handleAgree">我已阅读并同意</wd-button>
<wd-button block @click="handleAgree">我已阅读并同意</wd-button>
</view>
</view>
</template>

View File

@@ -14,7 +14,7 @@
</wd-collapse>
<view class="privacy__action">
<wd-button type="primary" block @click="handleAgree">我已阅读并同意</wd-button>
<wd-button block @click="handleAgree">我已阅读并同意</wd-button>
</view>
</view>
</template>

View File

@@ -55,11 +55,11 @@
<wd-cell>
<template #default>
<view class="flex items-center justify-center gap-24rpx py-12rpx">
<wd-button type="primary" size="small">主要按钮</wd-button>
<wd-button size="small">主要按钮</wd-button>
<text class="text-28rpx font-500" :style="{ color: currentThemeColor }">
主题色文本
</text>
<wd-tag type="primary" size="small">标签</wd-tag>
<wd-tag type="primary" size="small" variant="filled">标签</wd-tag>
</view>
</template>
</wd-cell>
@@ -67,7 +67,7 @@
<!-- 操作按钮 -->
<view class="mt-32rpx">
<wd-button type="primary" plain size="large" block @click="handleResetTheme">
<wd-button plain size="large" block @click="handleResetTheme">
重置为默认主题
</wd-button>
</view>
@@ -102,7 +102,7 @@
<view class="popup-actions">
<wd-button type="info" plain @click="showCustomColorInput = false">取消</wd-button>
<wd-button type="primary" @click="applyCustomColor">应用</wd-button>
<wd-button @click="applyCustomColor">应用</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -12,14 +12,14 @@
<view class="qr-confirm__body" :style="{ paddingTop: `${statusBarHeight + navBarHeight + 24}px` }">
<view class="qr-confirm__card">
<image class="qr-confirm__logo" src="/logo.png" mode="aspectFit" />
<image class="qr-confirm__logo" src="/static/images/logo.png" mode="aspectFit" />
<text class="qr-confirm__tip">PC 端扫码登录</text>
<text class="qr-confirm__user">{{ scanResult?.nickname || "未知用户" }}</text>
<text class="qr-confirm__hint">是否确认在 PC 端登录</text>
<view class="qr-confirm__actions">
<wd-button type="error" plain block @click="handleCancel">取消登录</wd-button>
<wd-button type="primary" block :loading="isLoading" @click="handleConfirm">确认登录</wd-button>
<wd-button block :loading="isLoading" @click="handleConfirm">确认登录</wd-button>
</view>
</view>
</view>

View File

@@ -72,7 +72,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeConfigDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitConfigForm">
<wd-button :loading="isSubmitting" @click="submitConfigForm">
保存
</wd-button>
</view>

View File

@@ -77,7 +77,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeDeptDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitDeptForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitDeptForm">保存</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -23,7 +23,7 @@
</view>
<text class="text-24rpx color-text-secondary">字典编码{{ item.dictCode }}</text>
</view>
<wd-tag :type="item.status === 1 ? 'success' : 'danger'" variant="plain">
<wd-tag :type="item.status === 1 ? 'success' : 'danger'">
{{ item.status === 1 ? "启用" : "禁用" }}
</wd-tag>
</view>
@@ -75,7 +75,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeDictDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitDictForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitDictForm">保存</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -25,7 +25,7 @@
字典值{{ item.value }} · 排序{{ item.sort }}
</text>
</view>
<wd-tag :type="item.status === 1 ? 'success' : 'danger'" variant="plain">
<wd-tag :type="item.status === 1 ? 'success' : 'danger'">
{{ item.status === 1 ? "启用" : "禁用" }}
</wd-tag>
</view>
@@ -80,7 +80,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeItemDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitItemForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitItemForm">保存</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -103,7 +103,7 @@
</scroll-view>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeMenuDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitMenuForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitMenuForm">保存</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -27,7 +27,7 @@
{{ item.publisherName || "系统管理员" }}
</text>
</view>
<wd-tag :type="getStatusType(item.publishStatus)" variant="plain">
<wd-tag :type="getStatusType(item.publishStatus)">
{{ getStatusText(item.publishStatus) }}
</wd-tag>
</view>
@@ -134,7 +134,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeNoticeForm">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitNoticeForm">
<wd-button :loading="isSubmitting" @click="submitNoticeForm">
保存
</wd-button>
</view>

View File

@@ -9,8 +9,8 @@
<view class="action-bar">
<view class="action-bar__left">
<wd-button size="small" variant="plain" @click="handleSelectAll">全选</wd-button>
<wd-button size="small" variant="plain" @click="handleClearAll">取消全选</wd-button>
<wd-button type="" size="small" variant="plain" @click="handleSelectAll">全选</wd-button>
<wd-button type="" size="small" variant="plain" @click="handleClearAll">取消全选</wd-button>
</view>
</view>
</view>
@@ -70,7 +70,7 @@
<!-- 固定底部操作栏 -->
<view class="bottom-bar">
<wd-button type="info" variant="plain" @click="handleCancel">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="handleSubmit">保存</wd-button>
<wd-button :loading="isSubmitting" @click="handleSubmit">保存</wd-button>
</view>
</view>
</template>

View File

@@ -25,7 +25,7 @@
</view>
<text class="role-card__code">{{ item.code }}</text>
</view>
<wd-tag :type="item.status === 1 ? 'success' : 'danger'" variant="plain">
<wd-tag :type="item.status === 1 ? 'success' : 'danger'">
{{ item.status === 1 ? "正常" : "禁用" }}
</wd-tag>
</view>
@@ -102,7 +102,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeRoleDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitRoleForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitRoleForm">保存</wd-button>
</view>
</view>
</wd-popup>

View File

@@ -34,7 +34,7 @@
<cu-date-query v-model="queryParams.createTime" label="创建时间" />
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="resetUserFilter">重置</wd-button>
<wd-button type="primary" @click="applyUserFilter">查询</wd-button>
<wd-button @click="applyUserFilter">查询</wd-button>
</view>
</view>
</wd-drop-menu-item>
@@ -71,7 +71,7 @@
</view>
<text class="user-card__role">{{ item.roleNames }} · {{ item.deptName }}</text>
</view>
<wd-tag :type="item.status === 1 ? 'success' : 'danger'" variant="plain">
<wd-tag :type="item.status === 1 ? 'success' : 'danger'">
{{ item.status === 1 ? "正常" : "禁用" }}
</wd-tag>
</view>
@@ -174,7 +174,7 @@
</wd-form>
<view class="popup-actions">
<wd-button type="info" variant="plain" @click="closeUserDialog">取消</wd-button>
<wd-button type="primary" :loading="isSubmitting" @click="submitUserForm">保存</wd-button>
<wd-button :loading="isSubmitting" @click="submitUserForm">保存</wd-button>
</view>
</view>
</wd-popup>
@@ -204,7 +204,6 @@
取消
</wd-button>
<wd-button
type="primary"
:loading="resetPwdDialog.isSubmitting"
@click="handleResetPassword"
>