remove block of wxml

This commit is contained in:
dntzhang 2019-03-31 18:55:19 +08:00
parent a4d1d8f013
commit e362ef0907
4 changed files with 4 additions and 6 deletions

View File

@ -56,7 +56,7 @@ function compile(file) {
var template = jsx2wxml.default({
...baseOptions,
code: buildComponent(file.contents)
}).template
}).template.replace(/<block>/,'').replace(/([\s\S]*)<\/block>/,'$1')
console.log('【编译完成】' + file.path)

View File

@ -56,7 +56,7 @@ function compile(file) {
var template = jsx2wxml.default({
...baseOptions,
code: buildComponent(file.contents)
}).template
}).template.replace(/<block>/,'').replace(/([\s\S]*)<\/block>/,'$1')
console.log('【编译完成】' + file.path)

View File

@ -1,4 +1,4 @@
<block>
<view class="container">
<view class="userinfo">
<block>
@ -15,4 +15,3 @@
<view class="usermotto"><text class="user-motto">{{motto}}</text>
</view>
</view>
</block>

View File

@ -1,4 +1,3 @@
<block>
<view class="container log-list"><text class="log-item" wx:for="{{logs}}" wx:for-item="log" wx:for-index="index">{{index + 1}}. {{log}}</text>
</view>
</block>