Skip to content

弹窗组件

引入

jq插件,务必在jq环境下使用

js
  <link rel="stylesheet" href="./CSC_Dialog/CSC_dialog.css" /> 
  <script src="./CSC_Dialog/CSC_dialog.js"></script>

代码演示

js
$.cscModal({
  showTitle: true,
  title: '测试',
  message: '测试测试测试测试测试测试测试测试',
  showCancelButton: true,
  handelConfirm: () => {
    console.log('确认')
  },
  handelCancel: () => {
    console.log('取消')
  }
})

效果图

[弹窗]

API

Props

参数说明类型默认值
showTitle是否显示标题booleantrue
title标题文案string标题
width弹框的宽度string80%
message文本内容string-
messageAlign文本内容对齐方式,可选值为left,rightstringcenter
showConfirmButton是否展示确认按钮booleantrue
showCancelButton是否展示取消按钮booleanfalse
confirmButtonText确认按钮文案stringfalse
confirmButtonColor确认按钮文本颜色string#1989fa
cancelButtonText取消按钮文案string取消
cancelButtonColor取消按钮文本颜色string#000

Events

事件说明回调参数
handelConfirm点击确认按钮时触发--
handelCancel点击取消按钮时触发--