Browse Source

feat:公告名称限制长度

DESKTOP-USV654P\pc 6 months ago
parent
commit
a1914fca81
1 changed files with 5 additions and 0 deletions
  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 { getDepartmentEnabledTree } from '/@/services/apis/DepartmentController';
 import { getDataOption } from '/@/api/system/dic';
+import { rule } from 'postcss';
 export const sexOptions = [
   {
     label: '男',
@@ -83,6 +84,10 @@ export const baseFromSchema: FormSchema[] = [
     component: 'Input',
     required: true,
     colProps: { span: 12 },
+    rules: [{ max: 16, message: '只能小于16个字符' }],
+    componentProps: {
+      placeholder: '请输入公告标题0-16个字符',
+    },
   },
   {
     field: 'fullHeadColor',