ソースを参照

修改细节问题

快乐的梦鱼 1 ヶ月 前
コミット
671c52892a
共有2 個のファイルを変更した25 個の追加12 個の削除を含む
  1. 24 2
      src/common/components/form/RichTextEditor.vue
  2. 1 10
      src/pages/dig/forms/data/common.ts

+ 24 - 2
src/common/components/form/RichTextEditor.vue

@@ -3,11 +3,12 @@
     <view class="richtext-preview-box" @click="() => !disabled && !readonly ? edit() : preview()">
       <Parse v-if="modelValue" :content="modelValue" containerStyle="max-height:400px" />
       <Text v-else color="text.second">{{placeholder}}</Text>
+      <view v-if="modelValue" class="richtext-preview-mask" :style="maskStyle" />
     </view>
-    <FlexRow :gap="20" align="center">
+    <FlexRow :gap="20" justify="flex-end" align="center">
       <Button v-if="!disabled" icon="browse" text="预览" size="small" @click="preview" />
       <Button v-if="!disabled && !readonly" icon="edit" text="编辑" size="small" @click="edit" type="primary" />
-      <Text v-if="maxLength > 0">{{ modelValue?.length || 0 }}/{{ maxLength }} 字</Text>
+      <Text v-if="maxLength > 0" :text="`${modelValue?.length || 0}/${maxLength} 字`" fontConfig="subText" textAlign="right" />
     </FlexRow>
   </FlexCol>
 </template>
@@ -20,6 +21,8 @@ import Button from '@/components/basic/Button.vue';
 import Text from '@/components/basic/Text.vue';
 import FlexCol from '@/components/layout/FlexCol.vue';
 import FlexRow from '@/components/layout/FlexRow.vue';
+import { propGetThemeVar, useTheme } from '@/components/theme/ThemeDefine';
+import { computed } from 'vue';
 
 const props = defineProps({	
   modelValue: { 
@@ -42,9 +45,20 @@ const props = defineProps({
     type: Boolean,
     default: false,
   },
+  maskColor: {
+    type: String,
+    default: () => propGetThemeVar('RichTextEditorMaskColor', 'white'),
+  }
 })
 const emit = defineEmits(['update:modelValue'])
+
+const theme = useTheme();
+
 let editorOpened = false;
+const maskStyle = computed(() => ({
+  height: theme.resolveThemeSize('RichTextEditorMaskHeight', 100),
+  background: `linear-gradient(0deg, ${theme.resolveThemeColor(props.maskColor)} 0%, transparent 100%)`,
+}));
 
 function preview() {
   uni.setStorage({
@@ -79,8 +93,16 @@ onPageShow(() => {
 
 <style lang="scss" scoped>
 .richtext-preview-box {
+  position: relative;
   flex: 1;
   min-height: 400rpx;
   margin-bottom: 15rpx;
+
+  .richtext-preview-mask {
+    position: absolute;
+    bottom: -1px;
+    left: 0;
+    width: 100%;
+  }
 }
 </style>

+ 1 - 10
src/pages/dig/forms/data/common.ts

@@ -137,15 +137,6 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
         childrenColProps: { span: 24 },
         children: [
           {
-            label: '',
-            name: 'extra',
-            type: 'static-text',
-            defaultValue: '',
-            additionalProps: {
-              text: '额外信息用于采集系统内部处理,可以不填写',
-            },
-          },
-          {
             label: `${options.title}数字档案(可选)`,
             name: 'archives',
             type: 'uploader',
@@ -188,7 +179,7 @@ export function villageCommonContent (ref: Ref<IDynamicFormRef>, options: {
               tagJoinType: ';',
             },
             formProps: {
-              extraMessage: '用于系统优化关键字搜索',
+              extraMessage: '用于采集系统内部处理优化关键字搜索,可以不填写',
             },
           },
         ],