| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <template>
- <view class="self-test-card" @click="$emit('tap')">
- <view class="self-test-head">
- <text class="self-test-icon">⚡</text>
- <view class="self-test-info">
- <text class="self-test-title">{{ title }}</text>
- <text class="self-test-sub">{{ sub }}</text>
- <text v-if="badgeCount > 0" class="self-test-badge">有 {{ badgeCount }} 项调研待填</text>
- </view>
- <text class="self-test-arrow">›</text>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: 'SelfTestCard',
- props: {
- title: {
- type: String,
- default: ''
- },
- sub: {
- type: String,
- default: ''
- },
- badgeCount: {
- type: Number,
- default: 0
- },
- icon: {
- type: String,
- default: '⚡'
- }
- }
- }
- </script>
- <style scoped lang="scss">
- /* ① 了解区 — 自测大卡(引导"从了解开始");样式与 pages/index-home/index.vue 原内联区块一致 */
- .self-test-card {
- margin: 20rpx $uni-space-lg 16rpx;
- background: linear-gradient(135deg, $brand-primary, $brand-primary-light);
- border-radius: 24rpx;
- padding: 24rpx 28rpx;
- }
- .self-test-head { display: flex; align-items: center; }
- .self-test-icon { font-size: calc(40rpx * var(--font-scale, 1)); margin-right: 16rpx; }
- .self-test-info { flex: 1; }
- .self-test-title { font-size: calc(28rpx * var(--font-scale, 1)); font-weight: bold; color: $app-surface; display: block; }
- .self-test-sub { font-size: calc(22rpx * var(--font-scale, 1)); color: rgba($app-surface, 0.8); display: block; margin-top: 4rpx; }
- .self-test-badge { display: inline-block; align-self: flex-start; margin-top: 8rpx; font-size: calc(20rpx * var(--font-scale, 1)); color: $brand-primary; background: rgba($brand-primary, 0.1); padding: 4rpx 14rpx; border-radius: 999rpx; }
- .self-test-arrow { font-size: calc(36rpx * var(--font-scale, 1)); color: rgba($app-surface, 0.7); }
- </style>
|