Commit 6902c1be by lijiabin

【需求 20331】 styles: 优化样式

parent d5d48e53
<template> <template>
<Notivue v-slot="item"> <Notivue v-slot="item">
<NotivueSwipe :item="item"> <NotivueSwipe :item="item">
<Notification :item="item"> <Notification :item="item" :theme="pastelTheme"> </Notification>
<NotificationProgress :item="item" />
</Notification>
</NotivueSwipe> </NotivueSwipe>
</Notivue> </Notivue>
<el-config-provider :locale="locale"> <el-config-provider :locale="locale">
...@@ -15,7 +13,7 @@ ...@@ -15,7 +13,7 @@
<script setup lang="ts"> <script setup lang="ts">
import zhCn from 'element-plus/es/locale/lang/zh-cn' import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { initWxConfig } from '@/utils/wxUtil/initWXConfig' import { initWxConfig } from '@/utils/wxUtil/initWXConfig'
import { Notivue, NotivueSwipe, Notification, NotificationProgress } from 'notivue' import { Notivue, NotivueSwipe, Notification, pastelTheme } from 'notivue'
const locale = ref(zhCn) const locale = ref(zhCn)
......
...@@ -374,9 +374,11 @@ const handleLike = async (item: CommentItemDto) => { ...@@ -374,9 +374,11 @@ const handleLike = async (item: CommentItemDto) => {
if (item.hasPraise === BooleanFlag.YES) { if (item.hasPraise === BooleanFlag.YES) {
item.hasPraise = BooleanFlag.NO item.hasPraise = BooleanFlag.NO
item.postPriseCount-- item.postPriseCount--
push.success('取消点赞成功')
} else { } else {
item.hasPraise = BooleanFlag.YES item.hasPraise = BooleanFlag.YES
item.postPriseCount++ item.postPriseCount++
push.success('点赞成功')
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)
......
...@@ -238,10 +238,7 @@ const handleAddTag = () => { ...@@ -238,10 +238,7 @@ const handleAddTag = () => {
const validateForm = () => { const validateForm = () => {
if (!form.value.mainTagId) { if (!form.value.mainTagId) {
push.warning({ push.warning('请选择主标签')
message: '请选择主标签',
offset: 200,
})
play() play()
visibleTagTooltip.value = true visibleTagTooltip.value = true
......
...@@ -66,6 +66,7 @@ import { useResetData } from '@/hooks' ...@@ -66,6 +66,7 @@ import { useResetData } from '@/hooks'
import type { FormInstance, FormRules } from 'element-plus' import type { FormInstance, FormRules } from 'element-plus'
import { BooleanFlag } from '@/constants' import { BooleanFlag } from '@/constants'
import { formatSeconds } from '@/utils' import { formatSeconds } from '@/utils'
import { push } from 'notivue'
const formRules: FormRules = { const formRules: FormRules = {
openRangeTime: [{ required: true, message: '请选择开放时间', trigger: 'change' }], openRangeTime: [{ required: true, message: '请选择开放时间', trigger: 'change' }],
...@@ -122,6 +123,7 @@ const handleSubmit = async () => { ...@@ -122,6 +123,7 @@ const handleSubmit = async () => {
loading.value = true loading.value = true
try { try {
await setLotteryConfig(data) await setLotteryConfig(data)
push.success('保存成功')
visible.value = false visible.value = false
} catch (error) { } catch (error) {
console.error(error) console.error(error)
......
...@@ -203,7 +203,6 @@ const handleSubmit = async () => { ...@@ -203,7 +203,6 @@ const handleSubmit = async () => {
} else { } else {
await addOrUpdateLotteryPrize(form.value) await addOrUpdateLotteryPrize(form.value)
} }
push.success(form.value.id ? '编辑成功' : '新增成功') push.success(form.value.id ? '编辑成功' : '新增成功')
dialogVisible.value = false dialogVisible.value = false
if (form.value.id) { if (form.value.id) {
......
...@@ -250,7 +250,6 @@ const handleCollect = async (item: ArticleItemDto) => { ...@@ -250,7 +250,6 @@ const handleCollect = async (item: ArticleItemDto) => {
item.hasCollect = !item.hasCollect item.hasCollect = !item.hasCollect
item.collectionCount = item.hasCollect ? item.collectionCount + 1 : item.collectionCount - 1 item.collectionCount = item.hasCollect ? item.collectionCount + 1 : item.collectionCount - 1
push.success(item.hasCollect ? '收藏成功' : '取消收藏') push.success(item.hasCollect ? '收藏成功' : '取消收藏')
refresh()
} }
// 一个是直接写这个问题的首评论 一个是直接给最热评论写评论 // 一个是直接写这个问题的首评论 一个是直接给最热评论写评论
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment