AntmJS/vantui

小程序:Picker组件警告 `Template 'tmpl_0_custom-wrapper' not found.` 无法正常显示选项

Opened this issue · 5 comments

Deain commented

BUG 描述
小程序:Picker组件警告 Template 'tmpl_0_custom-wrapper' not found. 无法正常显示选项

复现步骤

<Picker
    valueKey={'text'}
    toolbarPosition={'top'}
    title={'title'}
    defaultIndex={1}
    columns={[
      {text: '干线', value: 1,},
      {text: '城市', value: 2,},
      {text: '农村', value: 3,},
      {text: '集装', value: 4,},
      {text: '其他', value: 5,},
    ]}
    // onCancel={hide}
    onConfirm={({detail}) => {
      console.log(detail);
    }}
  />

截图
image

image

image

这个不是组件库的问题。Taro版本用3.4试试,另外你可以试试重新编译,然后关闭开发者工具再打开试试。

一般这种情况可以试试关闭掉wxml压缩

app.config中添加
usingComponents: {
'custom-wrapper': '/custom-wrapper',
}

hugyu commented

一般这种情况可以试试关闭掉wxml压缩

没用啊,兄弟

hugyu commented

app.config中添加 usingComponents: { 'custom-wrapper': '/custom-wrapper', }
image
兄弟,这个咋解决呀