Commit 2320e8ea9b83a1201d36279d993b24f084a932fa
1 parent
d20e1ce4
fix: test script in product detail throw error if not bind test script
Showing
1 changed file
with
7 additions
and
4 deletions
| @@ -28,10 +28,13 @@ | @@ -28,10 +28,13 @@ | ||
| 28 | field: 'scriptName', | 28 | field: 'scriptName', |
| 29 | label: '转换脚本', | 29 | label: '转换脚本', |
| 30 | render: (value: string) => { | 30 | render: (value: string) => { |
| 31 | - return h('div', [ | ||
| 32 | - h(Tag, { color: 'blue' }, () => value), | ||
| 33 | - h(Button, { type: 'link', onClick: handleTestScript }, () => '测试脚本'), | ||
| 34 | - ]); | 31 | + return ( |
| 32 | + value && | ||
| 33 | + h('div', [ | ||
| 34 | + h(Tag, { color: 'blue' }, () => value), | ||
| 35 | + h(Button, { type: 'link', onClick: handleTestScript }, () => '测试脚本'), | ||
| 36 | + ]) | ||
| 37 | + ); | ||
| 35 | }, | 38 | }, |
| 36 | }, | 39 | }, |
| 37 | ], | 40 | ], |