收藏
回答

vuecli3和vue-cli-plugin-kbone遇到问题,无法在开发工具中正常打开?

使用vue cli3脚手脚生成项目后,使用 vue add kbone添加vue-cli-plugin-kbone插件,安装完依赖包后,使用npm run build:mp生成小程序一切正常,一切都是那么完美,但使用微信开发者工具导入项目(./dist/mp)时,报如下错误,试着换了好多次都不行同样的问题,换vue2和3以及不使用TS都不行。看错误信息好像是miniprogram-element里面的代码报错。

build:mp": "cross-env MP_ENV=miniprogram vue-cli-service build --mode production --dest ./dist/mp/common



./miniprogram_npm/miniprogram-element/template/inner-component.wxml

 unexpected character `3`

> 1 | <template name="cover-image"><cover-image id="{{id}}" class="{{className}}" style="{{style}}" hidden="{{hidden}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" bindtouchstart="onTouchStart" bindtouchmove="onTouchMove" bindtouchend="onTouchEnd" bindtouchcancel="onTouchCancel" bindtap="onTap" bindlongpress="onLongPress" src="{{src}}" bindload="onCoverImageLoad" binderror="onCoverImageError" ></cover-image></template><template name="cover-view"><cover-view id="{{id}}" class="{{className}}" style="{{style}}" hidden="{{hidden}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" bindtouchstart="onTouchStart" bindtouchmove="onTouchMove" bindtouchend="onTouchEnd" bindtouchcancel="onTouchCancel" bindtap="onTap" bindlongpress="onLongPress" scroll-top="{{scrollTop}}" marker-id="{{markerId}}" ><element-vhost wx:if="{{hasChildren}}" class="h5-virtual" in-cover="{{forceInCover || inCover}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" generic:custom-component="custom-component"></element-vhost></cover-view></template><template name="match-media"><match-media id="{{id}}" class="{{className}}" style="{{style}}" hidden="{{hidden}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" bindtouchstart="onTouchStart" bindtouchmove="onTouchMove" bindtouchend="onTouchEnd" bindtouchcancel="onTouchCancel" bindtap="onTap" bindlongpress="onLongPress" min-width="{{minWidth}}" max-width="{{maxWidth}}" width="{{width}}" min-height="{{minHeight}}" max-height="{{maxHeight}}" height="{{height}}" orientation="{{orientation}}" ><element-vhost wx:if="{{hasChildren}}" class="h5-virtual" in-cover="{{inCover}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" generic:custom-component="custom-component"></element-vhost></match-media></template><template name="movable-area"><movable-area id="{{id}}" class="{{className}}" style="{{style}}" hidden="{{hidden}}" data-private-node-id="{{nodeId}}" data-private-page-id="{{pageId}}" bindtouchstart="onTouchStart" bindtouchmove="onTouchMove" bindtouchend="onTouchEnd" bindtouchcancel="onTouchCancel" 

回答关注问题邀请回答
收藏
登录 后发表内容
问题标签