https://sweetalert2.github.io/
사용법 :
<script>
Swal.fire({
title: `${name} 을 삭제 하시겠습니까?`,
//html: `<span class="swal2-titile-custom">${name} <br>파일을 삭제 하시겠습니까?</span>`,
type: 'warning',
showCancelButton: true,
confirmButtonText: '확인',
cancelButtonText: '취소',
showCloseButton: true,
showLoaderOnConfirm: true,
}).then((result) => {
if (result.value) { // confirmButtonText의 확인 클릭 시 true 반환
this.nextFunc(id, user_id, user_family_id);
}
})
</script>
CSS :
<style>
#swal2-title {
color:#ddd;
}
</style>
Swal 의 title 옵션에 style을 사용시에는 #swal2-title 형식으로 접근
html 옵션은 직접 html 삽입 가능
vue 에서 <style> 과 <style scoped> 를 잘 구분해야 한다.
반응형
'Vue.js' 카테고리의 다른 글
[Vue.js] vue 파일 변경 시 자동 컴파일 하는 법 (0) | 2021.09.09 |
---|---|
[Vue.js] Laravel 을 이용한 S3 파일업로드 (0) | 2021.09.08 |
[Vue.js] 컴포넌트 연동하기 (0) | 2021.04.23 |
[Vue.js] Vue에서 isMobile 모바일 구분 사용하기 (0) | 2021.04.19 |
[Vue.js] Vue에 Google Adsense 넣기 (0) | 2021.04.15 |