弹出提示框-$alert,$confirm
TIP
$alert $confirm 底层使用 element-plus 实现
$alert 使用示例
WARNING
$alert 方法代表该报错来自前台
tsx
$alert({
text: "操作成功",
type: "success",
});
$alert({
text: "操作成功",
type: "success",
});
1
2
3
4
2
3
4
$alertApi 使用示例
WARNING
$alertApi 方法代表该报错来自后台接口
tsx
$alertApi({
text: "操作成功",
type: "success",
});
$alertApi({
text: "操作成功",
type: "success",
});
1
2
3
4
2
3
4
$confirm 使用示例
WARNING
$confirm 方法代表该报错来自前台
tsx
$confirm({
text: "确定继续操作?",
type: "warning",
cancelText: "取消",
confirmText: "确定",
});
$confirm({
text: "确定继续操作?",
type: "warning",
cancelText: "取消",
confirmText: "确定",
});
1
2
3
4
5
6
2
3
4
5
6
$confirmApi 使用示例
WARNING
$confirmApi 方法代表该报错来自后台接口
tsx
$confirmApi({
text: "确定继续操作?",
type: "warning",
cancelText: "取消",
confirmText: "确定",
});
$confirmApi({
text: "确定继续操作?",
type: "warning",
cancelText: "取消",
confirmText: "确定",
});
1
2
3
4
5
6
2
3
4
5
6