```vue
<template>
  <div>
    <sd-attachment-ex
      v-model="files"
      :group-id="38329"
      @change="change"
      plugin-name="INDIDOCX"
      :categories="[{ label: '扩展图片分类', id: 'xmcate', order: 170 }]"
      :get-category="
        (item) => {
          if (item.FileName.includes('.jpg')) {
            return 'xmcate' //根据条件将附件设置到指定的分类，产品附件和痕迹分类的id分别是'fj','hj'
          }
        }
      "
    >
      <template v-slot:actions="{ item, waitUntil }">
        <a v-if="item.catNum === '-1'" @click="dosm(item, waitUntil)">项目自定义按钮</a>
      </template>
      <template v-slot:file-icon="{ item }">
        <span v-if="item.name.endsWith('.txt')">㊙️</span>
      </template>
    </sd-attachment-ex>
  </div>
</template>
<script>
export default {
  data() {
    return {
      files: [],
    }
  },
  methods: {
    change(values) {
      console.log(values)
    },
    dosm(item, waitUntil) {
      waitUntil(
        // 接收promise作为参数,项目自定义事件
        new Promise((resolve, reject) => {
          setTimeout(() => {
            resolve('ok')
            this.$refs.attachment.updateFileList()
          }, 1000)
        })
      )
    },
  },
}
</script>
```
