|
@@ -4,27 +4,7 @@ import omit from "lodash/omit";
|
|
|
import LoginContext from "./LoginContext";
|
|
|
import ItemMap from "./map";
|
|
|
|
|
|
-// const FormItem = Form.Item;
|
|
|
-
|
|
|
-// FormItem中的decoratorOption方法有bug,已提交pr到ant-design-vue
|
|
|
-// 11行到27行为临时解决方案
|
|
|
-import cloneDeep from "lodash/cloneDeep";
|
|
|
-import warning from "ant-design-vue/es/_util/warning";
|
|
|
-const FormItem = cloneDeep(Form.Item);
|
|
|
-FormItem.methods.decoratorOption = vnode => {
|
|
|
- if (vnode.data && vnode.data.directives) {
|
|
|
- const directive = find(vnode.data.directives, ["name", "decorator"]);
|
|
|
- warning(
|
|
|
- !directive || (directive && Array.isArray(directive.value)),
|
|
|
- `Invalid directive: type check failed for directive "decorator". Expected Array, got ${typeof (directive // directive可能为undefined
|
|
|
- ? directive.value
|
|
|
- : directive)}. At ${vnode.tag}.`
|
|
|
- );
|
|
|
- return directive ? directive.value : null;
|
|
|
- } else {
|
|
|
- return null;
|
|
|
- }
|
|
|
-};
|
|
|
+const FormItem = Form.Item;
|
|
|
|
|
|
const WrapFormItem = {
|
|
|
data() {
|