Skip to content

Commit fba4c63

Browse files
committed
fix: alter icon
1 parent fab37dd commit fba4c63

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/n-alert/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineComponent,ref,App, HTMLAttributes, SetupContext } from 'vue';
22
import classNames from '../../src/utils/className';
33
import './index.scss';
4+
import NIcon from '../n-icon'
45

56
const initDefaultProps = {
67
show: false,
@@ -28,18 +29,18 @@ const NAlert = defineComponent({
2829
showAlert.value = false
2930
}
3031
return () => (
31-
showAlert.value && <div class={alertClass()}>
32+
showAlert.value ? <div class={alertClass()}>
3233
<div class="alert-content">
33-
<n-icon name={`icon-${type}`}/>
34+
<NIcon name={`icon-${type}`}/>
3435
<span class="message-text">{ message }</span>
35-
<n-icon
36+
<NIcon
3637
id="alertCloseIcon"
3738
name="icon-times"
3839
class={iconClass}
3940
onClick={closeAlert}
4041
/>
4142
</div>
42-
</div>
43+
</div> : null
4344
)
4445
}
4546
})

0 commit comments

Comments
 (0)