Commit f14d4f68 authored by GuanHua's avatar GuanHua

fix: 品类导航表单校验写法

parent 4824ffa2
...@@ -139,6 +139,7 @@ ...@@ -139,6 +139,7 @@
&-activity { &-activity {
height: 56px; height: 56px;
width: 100%;
border: 1px solid #EDEEEF; border: 1px solid #EDEEEF;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -44,7 +44,7 @@ export const cardNavSchema: ISchema = { ...@@ -44,7 +44,7 @@ export const cardNavSchema: ISchema = {
"x-component-props": { "x-component-props": {
rowStyle: { rowStyle: {
justifyContent: 'flex-start', justifyContent: 'flex-start',
alignItems: 'flex-end', alignItems: 'flex-start',
}, },
}, },
properties: { properties: {
...@@ -68,6 +68,11 @@ export const cardNavSchema: ISchema = { ...@@ -68,6 +68,11 @@ export const cardNavSchema: ISchema = {
target: 'url', target: 'url',
condition: "{{handleTypeChange($value, 'url')}}" condition: "{{handleTypeChange($value, 'url')}}"
}, },
{
type: 'value:visible',
target: 'recordDetail',
condition: "{{$value === 1}}"
},
], ],
'x-rules': [ 'x-rules': [
{ {
...@@ -85,7 +90,7 @@ export const cardNavSchema: ISchema = { ...@@ -85,7 +90,7 @@ export const cardNavSchema: ISchema = {
sumbit: { sumbit: {
'x-component': 'Children', 'x-component': 'Children',
'x-component-props': { 'x-component-props': {
children: '{{SelectBtn}}' children: '{{SelectBtn}}',
}, },
'x-mega-props': { 'x-mega-props': {
span: 1, span: 1,
...@@ -93,6 +98,9 @@ export const cardNavSchema: ISchema = { ...@@ -93,6 +98,9 @@ export const cardNavSchema: ISchema = {
}, },
} }
}, },
recordDetail: {
'x-component': 'recordDetail',
},
id: { id: {
type: 'string', type: 'string',
title: '品类', title: '品类',
......
...@@ -22,12 +22,14 @@ const SettingWrap: React.FC<SettingPanelPropsType> = (props) => { ...@@ -22,12 +22,14 @@ const SettingWrap: React.FC<SettingPanelPropsType> = (props) => {
const { children, footer, onOK, onCancel, confirmLoading = false, shopId, property } = props const { children, footer, onOK, onCancel, confirmLoading = false, shopId, property } = props
const handleConfirm = (e) => { const handleConfirm = (e) => {
formActions.validate().then((res) => {
formActions.submit().then(() => {
clearSelectedStatus() clearSelectedStatus()
// formActions && formActions.validate().then((res) => { })
// onOK ? onOK(e) : clearSelectedStatus() // onOK ? onOK(e) : clearSelectedStatus()
// }).catch((error) => { }).catch((error) => {
// console.log(error) console.log(error)
// }) })
} }
return ( return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment