写md表格里面有特殊字符
如果你写md表格里面有特殊字符,比如 {}_ \等 需要使用转义符转移,否则会报错table什么错误,没截图,示例如下,标记的地方
|插槽名称|说明|
|-|-|
|toolbar|数据表上方工具栏|
|fieldCode|自定义数据表单元格,作用域参数为 \{ row, column, $index \} |
|opreate|自定义固定在右侧的操作列,作用域参数为 \{ row, column, $index \} |
vitepress如果内部有引用的第三方库,会发送请求根目录下的包以及报错,
解决方案是增加配置,对生成的html转换,追加相关资源链接,示例如下
// .vitepress\theme\config.js
module.exports = {
// ....
transformHtml(html) {
return html.replace(
'<head>',
`<head><script type="importmap">{
"imports": {
"vue": "https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.41/vue.esm-browser.prod.js",
"vuedraggable":"https://tcwlservice.qa.17usoft.com/doc/v2/assets/vuedraggable.js",
"element-plus":"https://tcwlservice.qa.17usoft.com/doc/v2/assets/element-plus.js"
}
}</script>`
)
},
}