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>
相关推荐
Gracemark8 小时前
高德地图-地图选择经纬度问题【使用输入提示-使用Autocomplete进行联想输入】(复盘)
vue.js
天下无贼9 小时前
【手写组件】 Vue3 + Uniapp 手写一个高颜值日历组件(含跨月补全+今日高亮+选中状态)
前端·vue.js
洋葱头_10 小时前
vue3项目不支持低版本的android,如何做兼容
前端·vue.js
奔跑的蜗牛ing11 小时前
Vue3 + Element Plus 输入框省略号插件:零侵入式全局解决方案
vue.js·typescript·前端工程化
最后一个农民工13 小时前
vue3实现仿豆包模版式智能输入框
前端·vue.js
艾小码16 小时前
Vue组件到底怎么定义?全局注册和局部注册,我踩过的坑你别再踩了!
前端·javascript·vue.js
wusp199416 小时前
项目实战——“微商城”前后台【005】之前台项目首页编写
vue.js·vant·底部导航栏
光影少年17 小时前
Typescript工具类型
前端·typescript·掘金·金石计划
森林的尽头是阳光17 小时前
vue防抖节流,全局定义,使用
前端·javascript·vue.js
计算机毕业设计木哥17 小时前
计算机毕设选题推荐:基于Java+SpringBoot物品租赁管理系统【源码+文档+调试】
java·vue.js·spring boot·mysql·spark·毕业设计·课程设计