mirror of https://github.com/iAJue/Fantasy-field
54 lines
1.9 KiB
PHP
54 lines
1.9 KiB
PHP
<?php if(!defined('APP_PATH')) {exit('error!');}?>
|
|
<form class="layui-form">
|
|
<blockquote class="layui-elem-quote quoteBox">
|
|
<form class="layui-form">
|
|
<div class="layui-inline">
|
|
<div class="layui-input-inline">
|
|
<input type="text" class="layui-input searchVal" placeholder="搜索ID或用户" />
|
|
</div>
|
|
<a class="layui-btn search_btn" data-type="reload">搜索</a>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<a class="layui-btn layui-btn-danger layui-btn-normal delAll_btn">批量删除</a>
|
|
</div>
|
|
</form>
|
|
</blockquote>
|
|
<table id="picList" lay-filter="picList"></table>
|
|
<!--操作-->
|
|
<script type="text/html" id="picListBar">
|
|
<a class="layui-btn layui-btn-xs" lay-event="copy">复制</a>
|
|
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
|
|
<a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="look">预览</a>
|
|
</script>
|
|
</form>
|
|
<script type="text/javascript" src="<?php echo PATH_VIEW;?>Admin/js/picList.js"></script>
|
|
<script>
|
|
function copyToClipboard (text) {
|
|
if(text.indexOf('-') !== -1) {
|
|
let arr = text.split('-');
|
|
text = arr[0] + arr[1];
|
|
}
|
|
var textArea = document.createElement("textarea");
|
|
textArea.style.position = 'fixed';
|
|
textArea.style.top = '0';
|
|
textArea.style.left = '0';
|
|
textArea.style.width = '2em';
|
|
textArea.style.height = '2em';
|
|
textArea.style.padding = '0';
|
|
textArea.style.border = 'none';
|
|
textArea.style.outline = 'none';
|
|
textArea.style.boxShadow = 'none';
|
|
textArea.style.background = 'transparent';
|
|
textArea.value = text;
|
|
document.body.appendChild(textArea);
|
|
textArea.select();
|
|
try {
|
|
var successful = document.execCommand('copy');
|
|
var msg = successful ? '成功复制到剪贴板' : '该浏览器不支持点击复制到剪贴板';
|
|
layer.msg(msg);
|
|
} catch (err) {
|
|
layer.msg('该浏览器不支持点击复制到剪贴板', {icon: 2,anim: 6});
|
|
}
|
|
document.body.removeChild(textArea);
|
|
}
|
|
</script>
|