Commit 90cd407d870df6f9686c60035cf8510642e1e33a

Authored by ww
1 parent 764f1fb4

perf: in create product profile form default select after create script

... ... @@ -25,6 +25,7 @@
25 25 import { useDrawer } from '/@/components/Drawer';
26 26 import { useSyncConfirm } from '/@/hooks/component/useSyncConfirm';
27 27 import { getBoundingClientRect } from '/@/utils/domUtils';
  28 + import configurationSrc from '/@/assets/icons/configuration.svg';
28 29
29 30 const listColumn = ref(4);
30 31
... ... @@ -204,8 +205,9 @@
204 205 <Card hoverable>
205 206 <template #cover>
206 207 <img
  208 + class="w-48 h-48 flex justify-center items-center"
207 209 alt="example"
208   - src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
  210 + :src="configurationSrc"
209 211 />
210 212 </template>
211 213 <template class="ant-card-actions" #actions>
... ...
... ... @@ -42,7 +42,7 @@
42 42 import ConverScriptModal from '/@/views/scriptmanage/converscript/ConverScriptModal.vue';
43 43
44 44 const { createMessage } = useMessage();
45   - const selectScript = reactive({
  45 + const selectScript = reactive<Record<'script', Nullable<string>>>({
46 46 script: null,
47 47 });
48 48 const selectOptions: Ref<SelectTypes['options']> = ref([]);
... ... @@ -55,7 +55,7 @@
55 55 };
56 56 });
57 57 });
58   - const handleSuccess = async () => {
  58 + const handleSuccess = async (val: { id: string }) => {
59 59 const res = await getScriptManageMeList();
60 60 selectOptions.value = res.map((m) => {
61 61 return {
... ... @@ -63,6 +63,7 @@
63 63 value: m.id,
64 64 };
65 65 });
  66 + selectScript.script = val.id;
66 67 };
67 68
68 69 const [register] = useForm({
... ...
... ... @@ -101,7 +101,7 @@
101 101 converScriptRef.value?.setScriptOutputData(res?.output);
102 102 }
103 103 }
104   - emits('success');
  104 + emits('success', res);
105 105 } finally {
106 106 setModalProps({ confirmLoading: false });
107 107 }
... ...