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

feat:公告名称限制长度

DESKTOP-USV654P\pc 6 місяців тому
батько
коміт
a1914fca81
1 змінених файлів з 5 додано та 0 видалено
  1. 5 0
      src/views/notice/components/data.config.ts

+ 5 - 0
src/views/notice/components/data.config.ts

@@ -4,6 +4,7 @@ import { h } from 'vue';
 import { Tinymce } from '/@/components/Tinymce';
 import { Tinymce } from '/@/components/Tinymce';
 import { getDepartmentEnabledTree } from '/@/services/apis/DepartmentController';
 import { getDepartmentEnabledTree } from '/@/services/apis/DepartmentController';
 import { getDataOption } from '/@/api/system/dic';
 import { getDataOption } from '/@/api/system/dic';
+import { rule } from 'postcss';
 export const sexOptions = [
 export const sexOptions = [
   {
   {
     label: '男',
     label: '男',
@@ -83,6 +84,10 @@ export const baseFromSchema: FormSchema[] = [
     component: 'Input',
     component: 'Input',
     required: true,
     required: true,
     colProps: { span: 12 },
     colProps: { span: 12 },
+    rules: [{ max: 16, message: '只能小于16个字符' }],
+    componentProps: {
+      placeholder: '请输入公告标题0-16个字符',
+    },
   },
   },
   {
   {
     field: 'fullHeadColor',
     field: 'fullHeadColor',