avue curd 中的配置项插槽使用

效果图:(新增时候的步骤条,因为是设置透明度是0-1中的小数 avue中步骤是整数 于是使用到插槽用element-ui)

 html:

  <template slot="opacityForm">
        <el-row class="row">
          <el-slider v-model="form.opacity" :min="0" :max="1" :step="0.1" show-stops>
          </el-slider>
        </el-row>
  </template>

js:

        {
            label: "透明度",
            prop: "opacity",
            formslot: true,
          },

总结:
1.在配置项中设置formsolt为true

2.在html中solt={ 插槽的prop值+Form}

3.手动绑定v-model值 就是avue curd 表单绑定的对象插槽的prop值

<avue-crud v-model="form"></avue-crud>

类似的插槽也是这样的步骤哦!

猜你喜欢

转载自blog.csdn.net/killerdoubie/article/details/131168669
今日推荐