@aligov/matter-announcement
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

事项公告

@aligov/matter-announcement

事项公告

API

参数名 说明 必填 类型 默认值 备注
matterCode 事项/目录编码 Y string
queryService 查询公告的接口 Y AsyncFunction
createService 创建公告的接口 Y AsyncFunction
updateService 更新公告的接口 Y AsyncFunction
deleteService 删除公告的接口 Y AsyncFunction
onSave 保存后的回调 N () => void
onDelete 删除后的回调 N () => void
onCancel 取消后的回调 N () => void
maxTitleLength 公告标题最大长度 N number 40
maxContentLength 公告内容最大长度 N number 200
locales 文案,用于替换或多语言需要 N

接口

interface IAnnouncementData {
  title: string;
  content: string;
  startDate: number;
  endDate: number;
  status?: string;
}

queryService

(matterCode: string) => Promise<IAnnouncementData | null>

createService

(matterCode: string, data: IAnnouncementData) => Promise<void>

updateService

(matterCode: string, data: IAnnouncementData) => Promise<void>

deleteService

(matterCode: string) => Promise<void>

locales

如果有传入,那么会和默认值做 merge

默认值如下

{
  dialogTitle: '公告配置',
  currentStatus: '当前公告状态:',
  title: '标题',
  content: '详细描述',
  validDate: '公告有效期',
  delete: '删除公告',
  confirmDelete: '确定删除?',
  confirm: '确定',
  save: '保存',
  cancel: '取消',
  close: '关闭',
  inputPlaceholder: '请输入',
  selectPlaceholder: '请选择',
}

Readme

Keywords

Package Sidebar

Install

npm i @aligov/matter-announcement

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

1.27 MB

Total Files

48

Last publish

Collaborators

  • jasoncapricorn
  • qingkaili
  • huguoxin
  • shenyu.wsy
  • liunian
  • tao1991123
  • itrip
  • xiazhiqiang
  • mo.zhou
  • guoliang.hgl
  • daip
  • baizhao