feat: 优化日期选择,字数展示
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, isSameMonth, isToday } from 'date-fns';
|
import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, isSameMonth, isToday, startOfWeek, endOfWeek } from 'date-fns';
|
||||||
import { zhCN } from 'date-fns/locale';
|
import { zhCN } from 'date-fns/locale';
|
||||||
import { fade, scale } from 'svelte/transition';
|
import { fade, scale } from 'svelte/transition';
|
||||||
|
|
||||||
@@ -92,8 +92,8 @@
|
|||||||
<div class="text-center text-sm text-gray-500 py-1">{day}</div>
|
<div class="text-center text-sm text-gray-500 py-1">{day}</div>
|
||||||
{/each}
|
{/each}
|
||||||
{#each eachDayOfInterval({
|
{#each eachDayOfInterval({
|
||||||
start: startOfMonth(currentMonth),
|
start: startOfWeek(startOfMonth(currentMonth), { weekStartsOn: 0 }),
|
||||||
end: endOfMonth(currentMonth)
|
end: endOfWeek(endOfMonth(currentMonth), { weekStartsOn: 0 })
|
||||||
}) as date}
|
}) as date}
|
||||||
<button
|
<button
|
||||||
class:text-gray-400={!isSameMonth(date, currentMonth)}
|
class:text-gray-400={!isSameMonth(date, currentMonth)}
|
||||||
|
|||||||
@@ -148,6 +148,7 @@
|
|||||||
aria-label="添加备注信息"
|
aria-label="添加备注信息"
|
||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-sm text-left text-gray-500">字数:{media.notes?.length || 0}</div>
|
||||||
|
|
||||||
<div class="flex justify-end gap-3 mt-6">
|
<div class="flex justify-end gap-3 mt-6">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Date: 2025-05-20 17:59:45
|
* @Date: 2025-05-20 17:59:45
|
||||||
* @LastEditors: 陈子健
|
* @LastEditors: 陈子健
|
||||||
* @LastEditTime: 2025-06-23 14:40:15
|
* @LastEditTime: 2025-08-15 11:20:05
|
||||||
* @FilePath: /my-score/frontend/vite.config.ts
|
* @FilePath: /my-score/frontend/vite.config.ts
|
||||||
*/
|
*/
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
@@ -13,7 +13,7 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://127.0.0.1:8000',
|
target: 'http://review.falsita.cn',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false
|
secure: false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user