@formily/vue + ant-design-vue 枚举值不显示 #1447
Answered
by
MisicDemone
yangshuwei
asked this question in
Q&A [2.x]
-
|
Beta Was this translation helpful? Give feedback.
Answered by
MisicDemone
May 19, 2021
Replies: 1 comment
-
你需要使用 @formily/vue 提供的 import { Select as ASelect } from "ant-design-vue";
import { connect, mapProps } from "@formily/vue";
const Select = connect(
ASelect,
mapProps({
dataSource: "options",
})
); 参考:https://codesandbox.io/s/cocky-cloud-q8xsr?file=/src/App.vue:1355-1437 另外,这个 schema 有一些问题
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MisicDemone
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你需要使用 @formily/vue 提供的
connect
方法,将 field 实例上的dataSource
属性"连接"到 Select 组件的options
属性上。参考:https://codesandbox.io/s/cocky-cloud-q8xsr?file=/src/App.vue:1355-1437
另外,这个 schema 有一些问题