<%_ if (position === 'import') { _%>
<%_ } _%>
<%_ if (position === 'method') { _%>
  <%_ if (clientTheme === 'vben') { _%>
  <%_ } else { _%>

  public releaseById(id: number) {
    this.announcementService().release(id).then(res => {
      this.$message.success('发布成功');
    }).catch(err => {
      this.$message.error('发布失败');
      console.log(err);
    })
  }
  <%_ } _%>
<%_ } _%>
<%_ if (position === 'rowOperations') { _%>
  <%_ if (clientTheme === 'vben') { _%>
      {
        title: '发布',
        name: 'release',
        containerType: 'drawer',
        click: (row) => {
          Modal.confirm({
            title: `操作提示`,
            content: `是否确认发布ID为${row.id}的消息？`,
            onOk() {
              apis.announcementService
                .release(row.id)
                .then(res => {
                  message.success('发布成功');
                })
                .catch(err => {
                  message.error('发布失败');
                  console.log(err);
              });
            },
          });
        }
      },
  <%_ } else { _%>
  <%_ } _%>
<%_ } _%>
<%_ if (position === 'rowClickHandler') { _%>
<%_ } _%>
