import PushCard from '@polyv/interactions-launch-sdk-ui-default/lib/PushCard';
<template>
<!-- 建议弹窗宽度为 720px,弹窗内容高度为 500px -->
<el-dialog
v-if="checkInCore"
:custom-class="'c-interactions-dialog c-interactions-dialog__h500'"
width="720px"
title="卡片推送"
:visible.sync="visible"
:close-on-click-modal="false"
>
<PushCard
:lang="lang"
:core="pushCardCore"
:right="{
sendResult: true,
showHistoryEntry: false,
download: false,
}"
/>
</el-dialog>
</template>
<script>
import PushCard from '@polyv/interactions-launch-sdk-ui-default/lib/PushCard';
import * as InteractionsLaunchSDK from '@polyv/interactions-launch-sdk';
// 弹窗组件可以选择其他 UI 库组件或自行开发,这里没有限制。
import { Dialog } from 'element-ui';
export default {
components: {
ElDialog: Dialog,
PushCard,
},
data() {
return {
// 中英文设置 'zh_CN'/'en'
lang: 'zh_CN',
pushCardCore: null,
visible: false,
};
},
mounted() {
// TODO: 关于初始化 InteractionsLaunchSDK 的其他设置
this.PushCardCore = new InteractionsLaunchSDK.PushCard();
}
};
</script>