Dhtmlx KanBan 付费版使用

TypeScript 复制代码
<template>
  <div v-if="isShowToolbar" ref="toolbarRef" class="kanban-toolbar"></div>
  <div ref="kanbanRef" class="kanban"></div>
</template>

<script lang="ts" setup>
import {  computed, onMounted, ref } from "vue";
import { kanban } from "./lib/kanban.dev.js";
import "./lib/kanban.css";
import { kanbanProps } from "./kanban";
import zhCN from "./locale/zh-CN";
defineOptions({ name: "Kanban" });
const {
  columns,
  columnsConfig,
  cards,
  cardConfig,
  cardHeight,
  editor,
  editorConfig,
  history,
  readonly,
  locale,
  isToolbar,
} = defineProps(kanbanProps);
const kanbanRef = ref();
const kanbanInstance = ref();
const toolbarRef = ref();
const toolbarInstance = ref();
const isShowToolbar = computed<boolean>(() => isToolbar);
const { Kanban, Toolbar, defaultEditorShape } = kanban;
onMounted(() => {
  kanbanInstance.value = new Kanban(kanbanRef.value, {
    cards: cards,
    cardShape: cardConfig,
    columns: columns,
    columnShape: columnsConfig,
    editor: editor,
    editorShape: editorConfig,
    cardHeight: cardHeight,
    history: history,
    readonly: readonly,
    locale: locale === "cn" ? zhCN : "en",
  });

  toolbarInstance.value = new Toolbar(toolbarRef.value, {
      api: kanbanInstance.value.api,
  });
});

defineExpose({
  instance: kanbanInstance,
});
</script>
相关推荐
乌夷2 小时前
使用spring boot vue 上传mp4转码为dash并播放
vue.js·spring boot·dash
khalil3 小时前
浅析TS枚举与位运算的结合
前端·typescript
苹果酱05674 小时前
2020-06-23 暑期学习日更计划(机器学习入门之路(资源汇总)+概率论)
java·vue.js·spring boot·mysql·课程设计
Deepsleep.4 小时前
react和vue的区别之一
javascript·vue.js·react.js
zqlcoding4 小时前
使用el-table表格动态渲染表头数据之后,导致设置fixed的列渲染出现问题
前端·javascript·vue.js
爱吃的强哥4 小时前
vue3 使用 vite 管理多个项目,实现各子项目独立运行,独立打包
前端·javascript·vue.js
涵信4 小时前
第十节:性能优化高频题-虚拟DOM与Diff算法优化
javascript·vue.js·性能优化
拖孩4 小时前
【Nova UI】十一、组件库中 Icon 组件的测试、使用与全局注册全攻略
前端·javascript·vue.js·ui·sass
凉豆菌6 小时前
在html中如何创建vue自定义组件(以自定义文件上传组件为例,vue2+elementUI)
vue.js·elementui·html
广西千灵通网络科技有限公司6 小时前
基于 springboot+vue+elementui 的办公自动化系统设计(
vue.js·spring boot·elementui