需求及效果
uView(1.x版本)中, 有Pop弹出层的组件, 现在有个需求是,进行简单封装,有些通用的设置不想每次都写(比如 :mask-custom-style="{background: 'rgba(0, 0, 0, 0.7)'}"
这种)
然后内部内容交给插槽去自己随意发挥.
遇到的问题
子组件封装内部
<template>
<!-- 通用搜索框-其内容自定义 -->
<u-popup v-model="isShow" mode="center" border-radius="20" :width="width"
:mask-custom-style="{background: 'rgba(0, 0, 0, 0.7)'}" @close="close">
<slot name="content"></sl