vux [Bug Report] XAddress 添加title slot 报错

8ljdwjyq  于 2022-11-05  发布在  其他
关注(0)|答案(3)|浏览(197)

VUX version

2.7.7

OS/Browsers version

Chrome 65.0.3325.181

Vue version

2.5.3

Code

<group title="123">
    <x-address :list="[1,2,3]" v-model="qew"> 
      <template slot="title">qwe</template>
    </x-address>
  </group>

Steps to reproduce

为XAddress 添加title slot 报错:
Duplicate presence of slot "title" found in the same render tree - this will likely cause render errors.

What is Expected?

自定义title的样式

What is actually happening?

为XAddress 添加title slot 报错:
Duplicate presence of slot "title" found in the same render tree - this will likely cause render errors.

2g32fytz

2g32fytz1#

猜测是这里的问题

<template slot="title" slot-scope="props">
      <slot
        name="title"
        :label-class="props.labelClass"
        :label-style="props.labelStyles"
        :label-title="props.title">
        <label
          :class="[props.labelClass,labelClass]"
          :style="props.labelStyle"
          v-if="props.labelTitle"
          v-html="props.labelTitle"></label>
      </slot>
    </template>
pkmbmrz7

pkmbmrz72#

Same problem.How to solve it?

ghhaqwfi

ghhaqwfi3#

i dont know,but add the 'slot-scope' can fix it.

相关问题