Переглянути джерело

🎨 优化各种编辑细节问题

快乐的梦鱼 1 місяць тому
батько
коміт
0ebf635ef2

+ 3 - 3
src/common/config/Theme.ts

@@ -34,19 +34,19 @@ export function configAppTheme() {
     theme.textConfigs.primaryTitle = {
       color: 'text.title',
       fontFamily: 'SongtiSCBlack',
-      fontSize: '1.5rem',
+      fontSize: '1.42rem',
       fontWeight: 'bold',
     };
     theme.textConfigs.lightTitle = {
       color: 'text.titleLight',
       fontFamily: 'SongtiSCBlack',
-      fontSize: '1.3rem',
+      fontSize: '1.24rem',
       fontWeight: 'bold',
     };
     theme.textConfigs.subTitle = {
       color: 'text.title',
       fontFamily: 'SongtiSCBlack',
-      fontSize: '1.3rem',
+      fontSize: '1.22rem',
       fontWeight: 'bold',
     };
     theme.textConfigs.lightGoldTitle = {

+ 22 - 2
src/pages/dig/forms/data/travel.ts

@@ -6,6 +6,7 @@ import type { PickerFieldProps } from "@/components/form/PickerField.vue";
 import type { UploaderFieldProps } from "@/components/form/UploaderField.vue";
 import type { GroupForm, SingleForm } from "../forms";
 import { villageCommonContent } from "./common";
+import type { SpEditorProps } from "@/common/components/form/RichTextEditor.vue";
 
 export const villageInfoTravelGuideForm : SingleForm = [CommonInfoModel, (r) => ({
   formItems: [
@@ -451,8 +452,27 @@ export const villageInfoRouteForm : SingleForm = [CommonInfoModel, (r) => ({
           additionalProps: {
             placeholder: '请输入描述',
             maxLength: 5000,
-            showWordLimit: true, 
-          },
+            enableAi: true,
+            extraProps: {
+              get() {
+                return {
+                  title: r.value.getValueByPath('name'),
+                  images: r.value.getValueByPath('images'),
+                }
+              },
+              update(extraProps) {
+                r.value.setValueByPath('images', extraProps.images);
+                r.value.setValueByPath('name', extraProps.title);
+              },
+              storageInfo: () => ({
+                villageId: r.value.getGlobalParams().villageId,
+                uploadPath: 'xiangyuan/environment',
+              }),
+            },
+            getExtraAiInfo() {
+              return [ '用户正在栏目《游览路线》,编辑游览描述']
+            },
+          } as SpEditorProps,
           rules:  [{
             required: true,
             message: '请输入描述',

+ 6 - 4
src/pages/user/update/password.vue

@@ -8,10 +8,12 @@
         :labelFlex="2"
         :inputFlex="4"
       >
-        <Field name="oldpassword" type="password" label="当前密码" placeholder="请输入当前密码" :maxlength="20" required />
-        <Field name="newpassword" type="password" label="新密码" placeholder="请输入新密码" :maxlength="20" required />
-        <Field name="confirmPassword" type="password" label="确认新密码" placeholder="请再次输入新密码" :maxlength="20" required />
-        
+        <FlexCol radius="radius.md" overflow="hidden">
+          <Field name="oldpassword" type="password" label="当前密码" placeholder="请输入当前密码" :maxlength="20" required />
+          <Field name="newpassword" type="password" label="新密码" placeholder="请输入新密码" :maxlength="20" required />
+          <Field name="confirmPassword" type="password" label="确认新密码" placeholder="请再次输入新密码" :maxlength="20" required />
+        </FlexCol>
+          
         <text class="tips">
           密码建议:8-20位,包含字母和数字,不要使用过于简单的密码
         </text>

+ 6 - 3
src/pages/user/update/profile.vue

@@ -1,13 +1,14 @@
 <template>
   <CommonTopBanner title="个人信息">
     <FlexCol :padding="30">
+
       <Form 
         ref="formRef"
         :model="formModel"
         :rules="rules" 
         validateTrigger="submit"
         labelAlign="right"
-        :labelWidth="140"
+        :labelWidth="160"
       >
         <!-- 头像 -->
         <view class="avatar-section">
@@ -21,8 +22,10 @@
           </view>
         </view>
 
-        <Field name="nickname" label="昵称" placeholder="请输入昵称" required />
-        <Field name="bio" multiline label="个人简介" placeholder="输入个人简介" :inputStyle="{width: '240px'}" />
+        <FlexCol radius="radius.md" overflow="hidden">
+          <Field name="nickname" label="昵称" placeholder="请输入昵称" required />
+          <Field name="bio" multiline label="个人简介" placeholder="输入个人简介" :inputStyle="{width: '240px'}" />
+        </FlexCol>
       </Form>
 
       <Height :height="40" />