feat: 增加时间轴功能
This commit is contained in:
@@ -33,11 +33,11 @@
|
||||
</wd-form-item>
|
||||
|
||||
<wd-form-item title="内容">
|
||||
<wd-input
|
||||
<wd-textarea
|
||||
v-model="patchStore.recordForm.content"
|
||||
:maxlength="20"
|
||||
:maxlength="50" auto-height
|
||||
show-word-limit
|
||||
placeholder="请输入菜地地点"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</wd-form-item>
|
||||
|
||||
|
||||
@@ -13,9 +13,17 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="p-3">
|
||||
<wd-search v-model="patchStore.patchSearch"
|
||||
:maxlength="20" :placeholder-left="true" :hide-cancel="true"
|
||||
placeholder="请输入菜地名称或者菜地地点"
|
||||
@change="patchStore.queryPatchList()"
|
||||
@clear="patchStore.queryPatchList()"/>
|
||||
</view>
|
||||
|
||||
<wd-card v-for="(item, index) in patchStore.patchList" :key="item.id">
|
||||
<template #title>
|
||||
<view class="wd-card__title-text flex items-center justify-between">
|
||||
<view class="wd-card__title-text flex items-center justify-between" @click="editPatchClick(item)">
|
||||
<text>{{ item.name }}</text>
|
||||
<text v-if="item.location" class="text-sm text-[#999]">{{ item.location }}</text>
|
||||
</view>
|
||||
@@ -44,7 +52,6 @@
|
||||
<wd-text v-else text="暂无作物 请先添加"/>
|
||||
|
||||
<view class="flex gap-1">
|
||||
<wd-button icon="edit" round @click="editPatchClick(item)"></wd-button>
|
||||
<wd-button icon="list" round @click="viewDetailClick(item)"></wd-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<view class="min-h-screen flex flex-col">
|
||||
<wd-text text="我的"/>
|
||||
<view class="min-h-screen flex flex-col" style="background-image: linear-gradient(180deg, #4CAF50 0%, #8BC34A 42%, #E8F5E9 100%)">
|
||||
<view class="self-center py-3 flex items-center gap-2 text-gray-800">
|
||||
<view class="flex min-w-0 flex-col">
|
||||
<text class="truncate text-lg text-white font-semibold">
|
||||
正在开发中
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ export const usePatchStore = defineStore('patch', {
|
||||
state: () => ({
|
||||
baseUrl: 'https://cxx0822.s.3q.hair',
|
||||
showPatchFab: true,
|
||||
patchSearch: '',
|
||||
patchList: [] as IPatch[],
|
||||
patchApiType: 'ADD' as 'ADD' | 'UPDATE' | 'DELETE',
|
||||
patchForm: {
|
||||
@@ -51,6 +52,9 @@ export const usePatchStore = defineStore('patch', {
|
||||
url: `${this.baseUrl}/patch-api/patches`,
|
||||
method: 'GET',
|
||||
header: { 'Content-Type': 'application/json' },
|
||||
data: {
|
||||
keyword: this.patchSearch
|
||||
},
|
||||
success: (res) => {
|
||||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
resolve(res.data as IPatch[])
|
||||
|
||||
Reference in New Issue
Block a user