diff --git a/src/components/uh-article-vote-item/uh-article-vote-item.vue b/src/components/uh-article-vote-item/uh-article-vote-item.vue
index 5034223..5e0f3f5 100644
--- a/src/components/uh-article-vote-item/uh-article-vote-item.vue
+++ b/src/components/uh-article-vote-item/uh-article-vote-item.vue
@@ -104,8 +104,10 @@ function handleSelectCheckboxOption(option: IVoteOption) {
return
const checkedList = (spec.options || []).filter(x => x.checked && x.id !== option.id)
- if (spec.type === 'multiple' && checkedList.length >= (spec.maxVotes || 0)) {
- showToast(`最多选择 ${spec.maxVotes} 项`)
+ // maxVotes 缺失(0/undefined)时不限制多选数量,避免 0 >= 0 恒真导致无法选择
+ const maxVotes = spec.maxVotes
+ if (spec.type === 'multiple' && maxVotes && maxVotes > 0 && checkedList.length >= maxVotes) {
+ showToast(`最多选择 ${maxVotes} 项`)
return
}
@@ -225,7 +227,7 @@ defineExpose({ refresh: handleGetData })
查看投票详情 >
-
+
{{ voteData.spec?.title }}
@@ -247,8 +249,12 @@ defineExpose({ refresh: handleGetData })
>
- {{ option.title }}
- {{ handleCalcPercent(option) }}%
+
+ {{ option.title }}
+
+
+ {{ handleCalcPercent(option) }}%
+
@@ -278,8 +284,12 @@ defineExpose({ refresh: handleGetData })
>
- {{ option.title }}
- {{ handleCalcPercent(option) }}%
+
+ {{ option.title }}
+
+
+ {{ handleCalcPercent(option) }}%
+
@@ -300,7 +310,7 @@ defineExpose({ refresh: handleGetData })
-
+
- 选项{{ optionIndex + 1 }}:{{ option.title }}
- {{ handleCalcPercent(option) }}%
+
+ 选项{{ optionIndex + 1 }}:{{ option.title }}
+
+
+ {{ handleCalcPercent(option) }}%
+
diff --git a/src/components/uh-navbar/uh-navbar.vue b/src/components/uh-navbar/uh-navbar.vue
index 1b7ff8f..ad70e9a 100644
--- a/src/components/uh-navbar/uh-navbar.vue
+++ b/src/components/uh-navbar/uh-navbar.vue
@@ -10,12 +10,15 @@
titleColor ?: string;
scrollTitle ?: string;
needPlaceholder ?: boolean;
+ backClass ?: string;
+ backStyle ?: string;
}
const props = withDefaults(defineProps(), {
useBack: true,
useTitle: true,
needPlaceholder: true,
+ backClass: 'text-gray-900'
})
const slots = useSlots()
@@ -35,10 +38,6 @@
const customCalss = computed(() => {
const _class = []
- if (props.titleColor) {
- _class.push(props.titleColor)
- return
- }
if (scrollThreshold.value) {
_class.push('text-white')
}
@@ -48,6 +47,10 @@
return _class;
})
+ const titleColorClass = computed(() => {
+ return [props.titleColor]
+ })
+
const visibleTitle = computed(() => {
if (!props.scrollTitle) {
return props.defaultTitle;
@@ -65,7 +68,7 @@
return [
homePage,
'pages/maintenance/maintenance',
- ...tabbarList.map(item => item.pagePath),
+ ...tabbarList.map((item : any) => item.pagePath),
] as string[];
})
@@ -92,14 +95,16 @@
+ class="uh-global-card-glass h-7 px-3 rounded-full border flex items-center gap-x-2 text-sm"
+ :class="props.backClass" :style="[props.backStyle]">
返回
-
+
{{visibleTitle}}
diff --git a/src/components/uh-scroll-top/uh-scroll-top.vue b/src/components/uh-scroll-top/uh-scroll-top.vue
index 701ae4f..8f9a8f6 100644
--- a/src/components/uh-scroll-top/uh-scroll-top.vue
+++ b/src/components/uh-scroll-top/uh-scroll-top.vue
@@ -13,7 +13,7 @@
}
// 获取当前页面,并且设置黑名单模式,因为有的页面可能不需要滚动到顶部
- const balckList = ['pages/maintenance/maintenance','pages-blog/setting/setting']
+ const balckList = ['pages/maintenance/maintenance', 'pages-blog/setting/setting', 'pages-blog/love/love']
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
const visible = computed(() => {
@@ -23,8 +23,7 @@
-
diff --git a/src/pages-blog/love/love.vue b/src/pages-blog/love/love.vue
index a5f72a3..466c629 100644
--- a/src/pages-blog/love/love.vue
+++ b/src/pages-blog/love/love.vue
@@ -1,363 +1,309 @@
-
-
-
-
-
-
-
- {{ loveConfig.loveInfo.boyNickname }}
-
-
-
-
-
-
- {{ loveConfig.loveInfo.girlNickname }}
-
-
-
-
-
+
+
-
-
-
- {{ loveConfig.loveDateTitle }}
-
-
-
- 第
- {{ loveDayCount.d }}
- 天
-
-
- {{ loveDayCount.h }}
- 小时
-
-
- {{ loveDayCount.m }}
- 分钟
-
-
- {{ loveDayCount.s }}
- 秒
-
-
-
+
+
+
+
+
+
+ {{ loveConfig.loveInfo.boyNickname }}
+
+
+
+
+
+ {{ loveConfig.loveInfo.girlNickname }}
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
- {{ nav.title }}
-
-
- {{ nav.desc }}
-
-
-
-
-
-
+
+
+
+ {{ loveConfig.loveDateTitle }}
+
+
+
+ 第
+ {{ loveDayCount.d }}
+ 天
+
+
+ {{ loveDayCount.h }}
+ 小时
+
+
+ {{ loveDayCount.m }}
+ 分钟
+
+
+ {{ loveDayCount.s }}
+ 秒
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ nav.title }}
+
+
+ {{ nav.desc }}
+
+
+
+
+
+
+
+
+
+ 100% {
+ transform: translateY(0);
+ }
+ }
+
\ No newline at end of file
diff --git a/src/pages-blog/love/journey.vue b/src/pages-blog/love/stories.vue
similarity index 98%
rename from src/pages-blog/love/journey.vue
rename to src/pages-blog/love/stories.vue
index b31ec8b..6b79401 100644
--- a/src/pages-blog/love/journey.vue
+++ b/src/pages-blog/love/stories.vue
@@ -1,8 +1,4 @@
-
-
-
+
+
+
-
-
+
+
-
-
-
- 投票信息
-
-
- 投票类型:
- {{ vote.spec?._uh_type }}
-
-
- 投票状态:
- {{ vote.spec?._uh_state?.state }}
-
-
- 投票方式:
-
- {{ vote.spec?.canAnonymously ? '匿名' : '不匿名' }}
-
-
-
- 开始时间:{{ formatTime(vote.spec?.startDate) }}
-
-
- 结束时间:永久有效
- 结束时间:{{ formatTime(vote.spec?.endDate) }}
-
-
-
+
+
+
+ 投票信息
+
+
+ 投票类型:
+ {{ vote.spec?._uh_type }}
+
+
+ 投票状态:
+
+ {{ vote.spec?._uh_state?.state }}
+
+
+
+ 投票方式:
+
+ {{ vote.spec?.canAnonymously ? '匿名' : '不匿名' }}
+
+
+
+ 开始时间:{{ formatTime(vote.spec?.startDate) }}
+
+
+ 结束时间:永久有效
+ 结束时间:{{ formatTime(vote.spec?.endDate) }}
+
+
+
-
-
- 投票内容
-
-
- {{ vote.spec?.title }}
-
-
- {{ vote.spec.remark }}
-
-
-
-
- 投票选项
- (最多选择
- {{ vote.spec?.maxVotes }} 项)
-
-
-
-
-
-
-
- {{ option._uh_percent }}%
-
-
-
+
+
+ 投票内容
+
+
+ {{ vote.spec?.title }}
+
+
+ {{ vote.spec.remark }}
+
+
+
+
+ 投票选项
+
+ (最多选择
+ {{ vote.spec?.maxVotes }} 项)
+
+
+
+
+
+
+
+ {{ option._uh_percent }}%
+
+
+
-
-
-
-
-
- {{ vote.spec?.type === 'pk' ? `选项${optionIndex + 1}:` : '' }}{{ option.title }}
-
-
- {{ option._uh_percent }}%
-
-
-
-
-
-
-
- {{ vote.spec?.type === 'pk' ? `选项${optionIndex + 1}:` : '' }}{{ option.title }}
-
-
-
-
-
+
+
+
+
+
+ {{ vote.spec?.type === 'pk' ? `选项${optionIndex + 1}:` : '' }}{{ option.title }}
+
+
+ {{ option._uh_percent }}%
+
+
+
+
+
+
+
+ {{ vote.spec?.type === 'pk' ? `选项${optionIndex + 1}:` : '' }}{{ option.title }}
+
+
+
+
+
-
-
- 投票统计
-
- {{ vote.stats?.voteCount || 0 }} 人已参与
-
-
+
+
+ 投票统计
+
+ {{ vote.stats?.voteCount || 0 }} 人已参与
+
+
-
-
-
-
- 您已参与投票
-
-
- 投票未开始
-
-
- 投票已结束
-
-
- 不支持匿名投票
-
-
- 提交投票(请选择选项)
-
-
- 提交投票
-
-
-
-
-
+
+
+
+
+ 您已参与投票
+
+
+ 投票未开始
+
+
+ 投票已结束
+
+
+ 不支持匿名投票
+
+
+ 提交投票(请选择选项)
+
+
+ 提交投票
+
+
+
+
+
\ No newline at end of file
+ .option-item-right {
+ background: linear-gradient(90deg, #f87171, #ef4444);
+ color: white;
+ clip-path: polygon(0 0, 100% 0, 100% 100%, 40rpx 100%);
+ text-align: right;
+ }
+}
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 60f948a..881f337 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -20,9 +20,9 @@
const articleDetailPath = '/pages-blog/article-detail/article-detail'
// 本地开发快速跳转页面,发布请置为 false
- const DEV_MODE = false
+ const DEV_MODE = true
const DEV_TO_TYPE = 'page' as 'page' | 'tabbar'
- const DEV_TO_PATH = `/pages-blog/test/test`
+ const DEV_TO_PATH = `/pages-blog/love/love`
/* ---------------- 状态 ---------------- */
const appConfigStore = useAppConfigStore()
diff --git a/src/style/index.scss b/src/style/index.scss
index ab0bcdf..e1f198e 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -2,6 +2,7 @@
@import './iconfont.css';
@import './uhemoji-iconfont.css';
@import './uhemoji2-iconfont.css';
+@import './uhlove-iconfont.css';
:root,
page {
diff --git a/src/style/uhlove-iconfont.css b/src/style/uhlove-iconfont.css
new file mode 100644
index 0000000..a305437
--- /dev/null
+++ b/src/style/uhlove-iconfont.css
@@ -0,0 +1,26 @@
+@font-face {
+ font-family: "uhlove-icon"; /* Project id 5231616 */
+ /* Color fonts */
+ src:
+ url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAARwAAwAAAAACOgAAAQiAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIlgjHgZgAEwKiXSHFgE2AiQDKgsoAAQgBYIUByAbjwYRFZs62eNDeNa/mSSLTIoFyGwPTI9MD/C3mOv3W5kQKcEiIRMSrf7vy3uoZXFL0JhOSKLN/CwRj3Sl3gN2Wy23sREAB0APwBeiKQABHAm8KbSFYKOwIi9bA7ABhS0AEQSM8EsAdC03cTAAMAKwI7z2AMADoeh+MwFNu1CsbTjvagueo3TgS5S7Riigh+gwgCpvHDKMBJIAQ4EY8ZXqmuoiPAjfz905RVMATgHsAAEACvrcGugYvSpwpBHxHDxS502uAGjrZdLnzp+7axoQFWifP3L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YQ8X1szhsAlY6yiYrQWjEDv00TQbkECDAA=') format('woff2');
+}
+
+.uhlove-icon {
+ font-family: "uhlove-icon" !important;
+ font-size: 16px;
+ font-style: normal;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+.uhlove-icon-gushi:before {
+ content: "\e60c";
+}
+
+.uhlove-icon-liebiao:before {
+ content: "\e616";
+}
+
+.uhlove-icon-xiangce:before {
+ content: "\e61a";
+}
diff --git a/uno.config.ts b/uno.config.ts
index 0022be0..bffd6d4 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -97,6 +97,7 @@ export default defineConfig({
primary: 'var(--wot-color-theme,#B9E424)',
secondary: 'var(--wot-color-secondary,#D7F94C)',
page: 'var(--wot-color-page,#f6f3ee)',
+ love: '#f83856'
},
fontSize: {
/** 提供更小号的字体,用法如:text-2xs */