收藏
回答

小程序运行报错r `data-event-params` with message: error ?

小程序运行报错r `data-event-params` with message: error ?


[ WXML 文件编译错误] ./pages/target/targetManage.wxml


请问这是咋回事

Bad attr `data-event-params` with message: error at token `:`.

<view class="content data-v-5c9ff0ec">
    <page-loading bind:__l="__l" class="data-v-5c9ff0ec" loadingShow_="{{loadingShow}}" vueId="31d6e13b-1"></page-loading>
    <view class="list-wrap data-v-5c9ff0ec">
        <view class="list-item data-v-5c9ff0ec" wx:for="{{$root.l0}}" wx:for-index="ind" wx:for-item="behavior" wx:key="id">
            <view class="title-wrap flex-align-center flex-between data-v-5c9ff0ec">
                <view bindtap="__e" class="left flex-align-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'e0',['$event'] ] ] ] ]}}" data-event-params="{{behavior:behavior[$orig],ind:ind}}">
                    <view class="radio-wrap data-v-5c9ff0ec" wx:if="{{is_created}}">
                        <m-radio actBgColor="#ADE03D" bind:__l="__l" class="data-v-5c9ff0ec" color="#FFFFFF" fontSize="{{24}}" height="{{40}}" selected="{{behavior[$orig].select}}" vueId="{{'31d6e13b-2-'+ind}}" width="{{40}}"></m-radio>
                    </view>
                    <text class="title data-v-5c9ff0ec">{{behavior[$orig].name}}</text>
                    <text class="progress data-v-5c9ff0ec">{{behavior.g0+'个'}}</text>
                </view>
                <view bindtap="__e" class="add-icon-wrap data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'addTarget',['$0'],[ [ ['pageData.list','id',behavior[$orig].id,'id'] ] ] ] ] ] ]}}" wx:if="{{is_created}}">
                    <image class="add-icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_add2.png'}}"></image>
                </view>
            </view>
            <view class="goal flex-align-center flex-between flex-wrap data-v-5c9ff0ec" wx:for="{{behavior[$orig].behaviors}}" wx:for-index="i" wx:for-item="beha" wx:key="id">
                <view class="left flex-align-center data-v-5c9ff0ec">
                    <view bindtap="__e" class="radio-wrap flex-align-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'onclick',['$0'],[ [ ['pageData.list','id',behavior[$orig].id],['behaviors','id',beha.id] ] ] ] ] ] ]}}" wx:if="{{is_created}}">
                        <m-radio actBgColor="#ADE03D" bind:__l="__l" class="data-v-5c9ff0ec" color="#FFFFFF" fontSize="{{24}}" height="{{40}}" selected="{{beha.select}}" vueId="{{'31d6e13b-3-'+ind+'-'+i}}" width="{{40}}"></m-radio>
                    </view>
                    <view catchtap="__e" class="flex-align-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'e1',['$event'] ] ] ] ]}}" data-event-params="{{behavior:behavior[$orig],beha:beha}}">
                        <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{beha.icon}}"></image>
                        <view class="name-desc flex-column data-v-5c9ff0ec">
                            <text class="{{['name','data-v-5c9ff0ec',beha.remark?'ellipsis-one':'ellipsis-two']}}">{{beha.name}}</text>
                            <text class="desc ellipsis-two data-v-5c9ff0ec" wx:if="{{beha.remark}}">{{beha.remark}}</text>
                        </view>
                    </view>
                </view>
                <view class="right flex-column data-v-5c9ff0ec" wx:if="{{is_created}}">
                    <view class="sort-wrap flex-align-center data-v-5c9ff0ec">
                        <view catchtap="__e" class="sort-icon data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'e2',['$event'] ] ] ] ]}}" data-event-params="{{i:i,beha:beha,ind:ind}}">
                            <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_sort_top_gray.png'}}" wx:if="{{i==0}}"></image>
                            <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_sort_top.png'}}" wx:else></image>
                        </view>
                        <view catchtap="__e" class="sort-icon data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'e3',['$event'] ] ] ] ]}}" data-event-params="{{i:i,behavior:behavior[$orig],beha:beha,ind:ind}}">
                            <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_sort_down_gray.png'}}" wx:if="{{i==behavior.g1-1}}"></image>
                            <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_sort_down.png'}}" wx:else></image>
                        </view>
                    </view>
                    <view catchtap="__e" class="delete-icon data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'deleteSingle',['$0'],[ [ ['pageData.list','id',behavior[$orig].id],['behaviors','id',beha.id] ] ] ] ] ] ]}}">
                        <image class="icon data-v-5c9ff0ec" mode="aspectFill" src="{{ossMoUrl+'ic_delete2.png'}}"></image>
                    </view>
                </view>
            </view>
        </view>
    </view>
    <view class="empty-wrap flex-column flex-align-center data-v-5c9ff0ec" wx:if="{{$root.g2}}">
        <view bindtap="__e" class="add-wrap flex-column flex-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'goPage',['/pages/target/targetAdd'] ] ] ] ]}}" wx:if="{{is_created}}">
            <text class="cuIcon-add data-v-5c9ff0ec"></text>
            <text class="text data-v-5c9ff0ec">添加一个目标</text>
        </view>
        <view class="add-wrap flex-column flex-center data-v-5c9ff0ec" wx:else>
            <text class="text data-v-5c9ff0ec">暂无目标,请让创建者添加~</text>
        </view>
    </view>
    <view class="cu-load loading data-v-5c9ff0ec" wx:if="{{pageData.status==0}}"></view>
    <view class="data-v-5c9ff0ec" style="height:30rpx;"></view>
    <view class="ios-bottom data-v-5c9ff0ec"></view>
    <block wx:if="{{is_created}}">
        <view class="data-v-5c9ff0ec" style="height:144rpx;"></view>
        <view class="fix-bottom data-v-5c9ff0ec">
            <view class="flex-align-center flex-between data-v-5c9ff0ec">
                <view bindtap="__e" class="left flex-align-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'selectAllChange',['$event'] ] ] ] ]}}">
                    <view class="radio-wrap data-v-5c9ff0ec">
                        <m-radio actBgColor="#ADE03D" bind:__l="__l" class="data-v-5c9ff0ec" color="#FFFFFF" fontSize="{{24}}" height="{{40}}" selected="{{selectAll}}" vueId="31d6e13b-4" width="{{40}}"></m-radio>
                    </view>
                    <text class="text-a data-v-5c9ff0ec">全选</text>
                    <text class="text-b data-v-5c9ff0ec">{{'已选择:'+$root.g3+'个目标'}}</text>
                </view>
                <view bindtap="__e" class="btn flex-center data-v-5c9ff0ec" data-event-opts="{{[ [ 'tap',[ [ 'deleteSelected',['$event'] ] ] ] ]}}" style="{{'background-color:'+($root.g4?'#765DF4':'#e5e5e5')+';'}}">删除</view>
            </view>
            <view class="ios-bottom data-v-5c9ff0ec"></view>
        </view>
    </block>
    <m-modal bind:__l="__l" bind:submit="__e" class="data-v-5c9ff0ec vue-ref" content="{{'确定删除选中的'+$root.g5+'个目标,删除后不可恢复?'}}" data-event-opts="{{[ [ '^submit',[ ['deleteSelect'] ] ] ]}}" data-ref="mModal" title="提示" vueId="31d6e13b-5"></m-modal>
    <m-modal bind:__l="__l" bind:submit="__e" class="data-v-5c9ff0ec vue-ref" content="确认删除当前目标?" data-event-opts="{{[ [ '^submit',[ ['deleteSelect2'] ] ] ]}}" data-ref="mModal2" title="提示" vueId="31d6e13b-6"></m-modal>
</view>


回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容