92 lines
3.2 KiB
HTML
92 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
|
<link href="/jscss/style.css" rel="stylesheet" type="text/css" />
|
|
<script type="text/javascript" charset="utf-8" src="/jscss/theme.js"></script>
|
|
<style>
|
|
.container>div {
|
|
padding: 1em;
|
|
background: var(--bg1);
|
|
margin-bottom: 1em;
|
|
border: 1px solid var(--bg5);
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<blockquote>信息提示效果</blockquote>
|
|
<div>
|
|
<button class='btn' onclick="ciyfn.toast('信息提示')">单行</button>
|
|
<button class='btn' onclick="ciyfn.toast('加载<br/>第二行')">多行</button>
|
|
<button class='btn' onclick="toast0()">延时9999秒关闭</button>
|
|
<button class='btn' onclick="toast1()">点击空白不关闭</button>
|
|
<button class='btn' onclick="toast2()">关闭回调</button>
|
|
<button class='btn' onclick="toast2b()">简化写法</button>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
'use strict';
|
|
function toast0() {
|
|
ciyfn.toast({
|
|
timeout: 9999,
|
|
content: '延时9999秒关闭'
|
|
});
|
|
}
|
|
function toast1() {
|
|
ciyfn.toast({
|
|
timeout: 10,
|
|
maskclose: false,
|
|
content: '点击空白不关闭'
|
|
});
|
|
}
|
|
function toast2() {
|
|
ciyfn.toast({
|
|
content: '关闭回调'
|
|
, cb: function () {
|
|
ciyfn.showend('toast已关闭');
|
|
}
|
|
});
|
|
}
|
|
function toast2b() {
|
|
ciyfn.toast('简化写法', function () {
|
|
ciyfn.showend('toast已关闭');
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<blockquote>顶部静默加载效果</blockquote>
|
|
|
|
<div>
|
|
<button class='btn' onclick="laading()">静默加载</button>
|
|
<button class='btn' onclick="loadclose('succ')">加载成功</button>
|
|
<button class='btn' onclick="loadclose('fail')">加载失败</button> 请先点击静默加载,再点击成功或失败,注意看顶部窄条
|
|
</div>
|
|
<script type="text/javascript">
|
|
'use strict';
|
|
var loading;
|
|
function laading() {
|
|
loading = new ciyclass.loading();
|
|
}
|
|
function loadclose(cls) {
|
|
if (loading) {
|
|
loading.close(cls);
|
|
loading = null;
|
|
}
|
|
}
|
|
</script>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/jscss/ciy.js"></script>
|
|
<script type="text/javascript" src="/jscss/ciycmp.js"></script>
|
|
<script type="text/javascript" src="../../common.js"></script>
|
|
<script type="text/javascript">
|
|
'use strict';
|
|
</script>
|
|
</body>
|
|
|
|
</html> |