tdesign-vue icon indicating copy to clipboard operation
tdesign-vue copied to clipboard

[TOption] 按需加载不生效

Open raohuiyong opened this issue 1 year ago • 2 comments

tdesign-vue 版本

1.6.4

重现链接

No response

重现步骤

使用TDesignResolver进行组件的按需加载,如果我直接使用则页面无法正确渲染option组件,而使用属性options设置则可以

# 方法一 不生效
<t-select
                  v-model="result.warntask"
                  multiple
                  clearable
                  filterable
                  :minCollapsedNum="1"
                  style="min-width: 180px"
                >
                  <t-option key="1" label="动态IP地址" :value="0" />
                  <t-option key="2" label="静态IP地址" :value="1" /> 
                </t-select>

# 方法二 生效
 <t-select
                  v-model="result.warntask"
                  :options="[
                    { label: '动态IP地址', value: 0 },
                    { label: '静态IP地址', value: 1 }
                  ]"
                  multiple
                  clearable
                  filterable
                  :minCollapsedNum="1"
                  style="min-width: 180px"
                ></t-select>

期望结果

不同过属性options也能正确渲染 image

实际结果

No response

框架版本

vue 2.6.14

浏览器版本

No response

系统版本

Win 10

Node版本

16.20.1

补充说明

No response

raohuiyong avatar Aug 31 '23 01:08 raohuiyong

👋 @raohuiyong,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

github-actions[bot] avatar Aug 31 '23 01:08 github-actions[bot]

使用vite时貌似没有这个问题,我在webpack5的项目里也会出现这个问题

chiyu1996 avatar Nov 30 '23 06:11 chiyu1996