卡槽部分 (goods-list-item.vue)
<style lang="scss">
@import '@/style/popup-public-select.scss';
@import '@/style/row-flex-list.scss';
</style>
<template>
<popup-layer-view ref="scrollPopup" :zIndex="zIndex" :isMaxWidth="false">
<view class="row-flex-list" :style="{ marginTop: !showBar && showHead ? '5px' : '15px' }">
<view
class="row-flex-item"
v-for="(item, index) in dataList"
:key="index"
:style="{ width: itemWidth }"
@tap="itemTap(item, index)"
>
<slot :item="item" :index="index"></slot>
</view></view>
</global-page-scroll>
</popup-layer-view>
</template>
<script src="./popup-public-select.js"></script>
调用部分
<style lang="scss" src="./select-goods-popup.scss"></style>
<template>
<view>
<!-- 搜商品 -->
<popup-public-select
ref="SS_INFO"
:zIndex="zIndex"
:url="all_url.SS_INFO"
:param="all_param.SS_INFO"
type="goods"
search-key="mc"
:search="all_search.SS_INFO"
:menu-list="menuList"
menu-show-key="c_mc"
:ckxx="ckxxNew"
searchPlaceholder="请输入商品信息 . . ."
>
<template v-slot:default="{ item }">
<goods-list-item :item="item" :xsjg="true" icon="icon-jiahao"></goods-list-item>
</template>
</popup-public-select>
</view>
</template>
<script src="./select-goods-popup.js"></script>
4***@qq.com
靠这个解决了编译问题
2021-07-07 09:39