|
@@ -19,6 +19,7 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
|
|
|
import { TreeNode } from '/@/utils/treeUtils';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
|
|
|
const isLevel2 = (type: string) => type === 'L2';
|
|
|
const schemas: FormSchema[] = [
|
|
@@ -101,6 +102,9 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
|
|
|
colProps: {
|
|
|
span: 24,
|
|
|
},
|
|
|
+ componentProps: {
|
|
|
+ min: 0,
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
field: 'wapBannerUrl',
|
|
@@ -127,6 +131,7 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
|
|
|
},
|
|
|
emits: ['update', 'register'],
|
|
|
setup(_, { emit }) {
|
|
|
+ const { createMessage } = useMessage();
|
|
|
const [registerForm, { validate, getFieldsValue, resetFields }] = useForm({
|
|
|
labelWidth: 120,
|
|
|
schemas,
|
|
@@ -157,14 +162,16 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
|
|
|
name: data.name,
|
|
|
parentId: data.parentId,
|
|
|
type: data.type,
|
|
|
- wapBannerUrl: data.wapBannerUrl[0] || '',
|
|
|
+ // wapBannerUrl: data.wapBannerUrl[0] || '',
|
|
|
});
|
|
|
emit('update');
|
|
|
resetFields();
|
|
|
+ createMessage.success('操作成功');
|
|
|
closeModal();
|
|
|
}
|
|
|
- } catch (error) {}
|
|
|
-
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error', error);
|
|
|
+ }
|
|
|
// let res = await saveItemApi(data);
|
|
|
}
|
|
|
|