1 Star 1 Fork 0

lockhea/ZCMUXPJHelper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
layui.html 2.49 KB
一键复制 编辑 原始数据 按行查看 历史
lockhea 提交于 2023-12-12 17:51 +08:00 . Initial commit
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Quick Start - Layui</title>
<link href="layui/css/layui.css" rel="stylesheet">
</head>
<button type="button" class="layui-btn layui-btn-primary" lay-on="confirm">Confirm</button>
<body>
<!-- HTML Content -->
<script src="layui/layui.js"></script>
<script>
layui.use(function () {
var util = layui.util;
var layer = layui.layer;
// 自定义固定条
util.fixbar({
bars: [{
type: 'manu',
content: '自动',
style: 'font-size: 21px;'
}],
// bar1: true,
// bar2: true,
// default: false, // 是否显示默认的 bar 列表 -- v2.8.0 新增
// bgcolor: '#393D52', // bar 的默认背景色
// css: {right: 100, bottom: 100},
// target: '#target-test', // 插入 fixbar 节点的目标元素选择器
// duration: 300, // top bar 等动画时长(毫秒)
on: { // 任意事件 -- v2.8.0 新增
mouseenter: function (type) {
layer.tips(type, this, {
tips: 4,
fixed: true
});
},
mouseleave: function (type) {
layer.closeAll('tips');
}
},
// 点击事件
click: function (type) {
console.log(this, type);
if(type == "manu"){
// 好评判断
layer.confirm("你确定要进行自动好评吗?,将会提交所有内容并进行好评",{
btn:["确定","取消"] // 按钮
},function(){
layer.msg("好评中,请稍后...",{icon:16});
setTimeout(function(){
layer.msg("好评完成!",{icon:1});
},2000);
},function(){
layer.msg("已取消",{time:2000,btn:["知道了"]});
})
}
}
});
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lock8/ZCMUXPJHelper.git
git@gitee.com:lock8/ZCMUXPJHelper.git
lock8
ZCMUXPJHelper
ZCMUXPJHelper
master

搜索帮助