liu
3 天以前 ee7ac8df8bce38add1f75baf876b49de94b9e00a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<script setup lang="ts">
import { ref } from 'vue';
import { Barcode, useVbenModal } from '@vben/common-ui';
const code = ref('');
const [Modal, modalApi] = useVbenModal({
  onOpenChange(open) {
    code.value = open ? (modalApi.getData<{ code: string }>()?.code || '') : '';
  },
});
</script>
<template>
  <Modal title="业务码二维码" :show-confirm-button="false">
    <div style="display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px">
      <Barcode v-if="code" :content="code" :width="240" />
      <strong style="font-size:20px;word-break:break-all">{{ code }}</strong>
      <p>扫码出入库使用,二维码内容为上方业务码值。</p>
    </div>
  </Modal>
</template>