marsyu
marsyu
  • 发布:2021-06-10 17:31
  • 更新:2021-06-10 17:31
  • 阅读:753

uniapp如何引用原生小程序的组件?

分类:uni-app

问题其实挺绕的,手头有一个大型的小程序,里面很多项目,搬迁过程中遇到富文本编辑使用的是wxparse,本来是没啥问题可以直接替换mp-html或者uparse之类的,但是发现后台存的尼玛是wxparse转换以后的nodes节点的形式,如:

{  
        "node":"element",  
        "tag":"p",  
        "index":"0",  
        "tagType":"block",  
        "nodes":[  
          {  
            "node":"text",  
            "text":"1111",  
            "textArray":[  
              {  
                "node":"text",  
                "text":"2222"  
              }  
            ],  
            "index":"0.0"  
          }  
        ]  
      }

现在用uniapp的插件显然是解决不了问题了,想尝试用wxparse原版的方法解决,尝试使用

"usingComponents":{  
      "wxparser": "/wxcomponents/wxParse/wxParse"  
    }

发现不能生效会报错,因为原版其实是在页面引入<template is='wxparse'>来解决的 想知道uniapp怎么去模拟这种引入。救命!

2021-06-10 17:31 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复