market-vue
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

盯链流转市场H5

盯链开放平台

  • 安装依赖

npm i market-vue
  • 使用

<script>
import { ref } from "vue";
import { DingBlockMarket } from "dingblock-market-vue";

const theme = ref("dark");

const market = ref();
// 退出登录需调用cancelAuth
const handleLogout = () => {
  market.value?.cancelAuth?.();
};
// 切换主题直接修改
const handleChangeTheme = (value) => {
  theme.value = value;
};

const auth = async () => {
  return "DINGBLOCK_AUTH_TOKEN";
};

const check = () => {
  return 'USER_ID'
}

const onRedirect = (link) => {
  window.location.href = link;
};
</script>

<template>
  <DingblockMarket
    @redirect="onRedirect"
    ref="dingblock"
    :theme="theme"
    appId="YOUR_APPID"
    :auth="auth"
    :check="check"
  />
</template>

Readme

Keywords

none

Package Sidebar

Install

npm i market-vue

Weekly Downloads

3

Version

2.0.1

License

none

Unpacked Size

14.1 kB

Total Files

24

Last publish

Collaborators

  • jiejie522
  • dingstock