input-city配合input-array在移动端下的问题
- Dominant language
- TypeScript
- Stars
- 18.9k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
#### 描述问题:
在移动端下 input-city配合input-array使用时,动态新增的item,input-city的select不显示内容
#### 截图或视频:

通过 input-array的value设置初始值,默认渲染的 input-city 可以显示选项,但组件不显示默认选中的值
如截图中前面两个input-city是通过input-array设置的value 如` value:[110000,410000] ` input-city组件也无法显示默认值
设置 `useMobileUI: false` 无效 在页面小于一定宽度是依然渲染为mobile样式
#### 如何复现(请务必完整填写下面内容):
1. 你是如何使用 amis 的?
`sdk`
2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
2.0.2
4. 粘贴有问题的完整 `amis schema` 代码:
```
let amisJSON = {
type: 'page',
title: '测试',
body: [
{
type: "form",
title: "测试input-city",
api: "/amis/api/mock2/form/saveForm",
body: [
{
name: "array",
useMobileUI: false,
type: "input-array",
addButtonText: "更多",
value: [
110000,
410000
],
items: {
name: "city",
useMobileUI: false,
type: "input-city",
label: "城市",
searchable: true,
extractValue: false,
}
}]
}
]
}
let amisScoped = amis.embed('#root', amisJSON, {
theme: "antd",
});
```
5. 操作步骤
按照上面的代码在移动端下有问题,pc正常
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the provided AMIS SDK schema and compare the input-city behavior inside input-array on mobile with the same schema on desktop. Reproduce the initial-value and dynamically added-item cases, including useMobileUI: false; done means selected city values and options display correctly in the mobile rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100