如何导入 grid.js html 函数以在 Vue 中使用格式化程序

How to import grid.js html function for using formatter in Vue

我正在使用 gridjs-vue 包装器将 grid.js 与 Vue 一起使用。我想使用 gridjs 的格式化程序功能,但它需要 html 功能。如何将 html 函数导入到我的组件中?如果我尝试从 gridjs-vue 导入它,它会说 html is not found in gridjs-vue.

使用this.$gridjs.html(...)。示例:

this.cols = [
  {
    name: 'Model',
    formatter: cell => this.$gridjs.html(`<b>${cell}</b>`)
  },
  { ... },
  { ... }
]

https://github.com/grid-js/gridjs-vue#gridjshtml