Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

picker 级联选择器能增加初始值设置吗 #489

Closed
dengshaomin86 opened this issue Apr 21, 2022 · 9 comments
Closed

picker 级联选择器能增加初始值设置吗 #489

dengshaomin86 opened this issue Apr 21, 2022 · 9 comments
Assignees
Labels
feature New features to be implemented

Comments

@dengshaomin86
Copy link

Feature request 🚀

Expected:

  • No breaking changes

Examples:

Programme:

Others:

@haoziqaq haoziqaq added the feature New features to be implemented label Apr 22, 2022
@haoziqaq
Copy link
Member

下次release包含此功能

@haoziqaq haoziqaq reopened this Apr 22, 2022
@haoziqaq
Copy link
Member

功能上线了

@zhy-code
Copy link

zhy-code commented Dec 1, 2022

初始值的设定,能否增加 text 匹配模式,目前设定的是 index 我这边无法保存的是 text...

@haoziqaq
Copy link
Member

haoziqaq commented Dec 1, 2022

image

非级联初始值设置看这里。
关于匹配 text,因为 text 可能是不唯一的值,可能不太合适去加这样的 api,最好还是手动找出 text 的 index。

@zhy-code
Copy link

zhy-code commented Dec 1, 2022

非级联的这个是单列的吧?我是多列的如何设置初始值

@haoziqaq
Copy link
Member

haoziqaq commented Dec 1, 2022 via email

@haoziqaq
Copy link
Member

haoziqaq commented Dec 1, 2022

https://varlet.gitee.io/varlet-ui-playground/?initialTheme=dark#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IFBpY2tlciB9IGZyb20gJ0B2YXJsZXQvdWknXG5cbmNvbnN0IGNvbHVtbnMgPSBbXG4gIHtcbiAgICB0ZXh0czogWyfwn5CtJywgJ/CfkLEnXSxcbiAgICBpbml0aWFsSW5kZXg6IDFcbiAgfSxcbiAge1xuICAgIHRleHRzOiBbJ/CfkLYnLCAn8J+QtyddLFxuICAgIGluaXRpYWxJbmRleDogMFxuICB9XG5dXG5cbmNvbnN0IHBpY2tlciA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fSlcblxuICBjb25zdCBpbnN0YW5jZSA9IGdldEN1cnJlbnRJbnN0YW5jZSgpXG4gIGluc3RhbmNlLmFwcENvbnRleHQuYXBwLnVzZShWYXJsZXRVSSlcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGFwcGVuZFN0eWxlKCkge1xuICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgIGNvbnN0IGxpbmsgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJylcbiAgICBsaW5rLnJlbCA9ICdzdHlsZXNoZWV0J1xuICAgIGxpbmsuaHJlZiA9ICcuL3ZhcmxldC5jc3MnXG4gICAgbGluay5vbmxvYWQgPSByZXNvbHZlXG4gICAgbGluay5vbmVycm9yID0gcmVqZWN0XG4gICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChsaW5rKVxuICB9KVxufVxuIn0=

@zhy-code
Copy link

zhy-code commented Dec 2, 2022

https://varlet.gitee.io/varlet-ui-playground/?initialTheme=dark#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IFBpY2tlciB9IGZyb20gJ0B2YXJsZXQvdWknXG5cbmNvbnN0IGNvbHVtbnMgPSBbXG4gIHtcbiAgICB0ZXh0czogWyfwn5CtJywgJ/CfkLEnXSxcbiAgICBpbml0aWFsSW5kZXg6IDFcbiAgfSxcbiAge1xuICAgIHRleHRzOiBbJ/CfkLYnLCAn8J+QtyddLFxuICAgIGluaXRpYWxJbmRleDogMFxuICB9XG5dXG5cbmNvbnN0IHBpY2tlciA9IGFzeW5jICgpID0+IHtcbiAgY29uc3QgeyBzdGF0ZSwgdGV4dHMsIGluZGV4ZXMgfSA9IGF3YWl0IFBpY2tlcihjb2x1bW5zKVxufVxuPC9zY3JpcHQ+XG5cbjx0ZW1wbGF0ZT5cbiAgPHZhci1idXR0b24gdHlwZT1cInByaW1hcnlcIiBibG9jayBAY2xpY2s9XCJwaWNrZX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VjdCkgPT4ge1xuICAgIGNvbnN0IGxpbmsgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJylcbiAgICBsaW5rLnJlbCA9ICdzdHlsZXNoZWV0J1xuICAgIGxpbmsuaHJlZiA9ICcuL3ZhcmxldC5jc3MnXG4gICAgbGluay5vbmxvYWQgPSByZXNvbHZlXG4gICAgbGluay5vbmVycm9yID0gcmVqZWN0XG4gICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChsaW5rKVxuICB9KVxufVxuIn0=

非常感谢,已经调试完成

@haoziqaq
Copy link
Member

haoziqaq commented Dec 2, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New features to be implemented
Projects
None yet
Development

No branches or pull requests

3 participants