当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
4 Star 30 Fork 11

iTanken/LayuiExtend
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.html 8.06 KB
一键复制 编辑 原始数据 按行查看 历史
<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
<meta charset="utf-8">
<title>💠 LayUI 扩展组件 by iTanken(子兮子兮)</title>
<meta name="keywords" content="layui,JS组件,layui扩展,扩展组件">
<meta name="description" content="基于 LayUI 的扩展组件">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="img/favicon.ico">
<link rel="stylesheet" href="js/layui/css/layui.css" media="all">
<link rel="stylesheet" href="css/index.min.css" media="all">
<style type="text/css">
.layui-card-body { overflow: visible!important; }
</style>
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="site-home" id="LAY_home" style="background-color: #eee;" data-date="3-29">
<div class="layui-header header header-index" spring>
<div class="">
<a class="logo" href="#">
<img src="img/logo.png" alt="layui">
</a>
<div class="layui-form component" lay-filter="LAY-site-header-component"></div>
<ul class="layui-nav">
<li class="layui-nav-item ">
<a href="#doc">文档<!-- <span class="layui-badge-dot"></span> --></a>
</li>
</ul>
</div>
</div>
<div class="site-banner">
<div class="site-banner-bg"></div>
<div class="site-banner-main">
<div class="site-zfj">
<i class="layui-icon" style="color: #fff; color: rgba(255,255,255,.7);">&#xe609;</i>
</div>
<div class="layui-anim site-desc">
<p class="web-font-desc">Layui 扩展组件</p>
<cite>由业余前端倾情打造...</cite>
</div>
<div class="site-download">
<a href="https://github.com/iTanken/LayuiExtend/archive/master.zip" class="layui-inline site-down" target="_blank">
<cite class="layui-icon">&#xe601;</cite> 立即下载
</a>
</div>
<div class="site-version">
</div>
<div class="site-banner-other">
<a href="https://github.com/iTanken/LayuiExtend/" target="_blank" class="site-star">
<i class="layui-icon">&#xe658;</i> Star <cite id="getStars"></cite>
</a>
<a href="https://github.com/iTanken/LayuiExtend/network/members" target="_blank" rel="nofollow" class="site-fork">
<i class="layui-icon">&#xe62e;</i> Fork
</a>
</div>
</div>
</div>
<div class="layui-fluid" id="doc">
<div class="layui-row layui-col-space10">
<div class="layui-col-xs12 layui-col-sm6 layui-col-lg6">
<div class="layui-card">
<div class="layui-card-header"><span class="layui-badge layui-badge-rim">20200119</span> 数字输入 number input</div>
<div class="layui-card-body">
<h3>示例:</h3>
<div class="layui-form">
<div class="layui-form-item">
<input class="layui-input layui-input-number" min="-10" max="1000" data-prec="4" placeholder="控制精确度保留 4 位小数" id="numberInput">
</div>
<div class="layui-form-item">
<input class="layui-input layui-input-number" min="0.1" max="8" step="0.5" placeholder="无精确度控制">
</div>
<div class="layui-form-item">
<input class="layui-input range-value layui-input-number">
<span class="layui-word-aux"> ~ </span>
<input class="layui-input range-value layui-input-number">
</div>
<blockquote class="layui-elem-quote layui-quote-nm">
<p>支持数字键盘输入,退格键删除,上下左右键增加减小,+/- 键切换正负数。</p>
</blockquote>
</div>
</div>
</div>
</div>
<div class="layui-col-xs12 layui-col-sm6 layui-col-lg6">
<div class="layui-card">
<div class="layui-card-header"><span class="layui-badge layui-badge-rim">20200310</span> 文本工具 text tool</div>
<div class="layui-card-body">
<h3>示例:</h3>
<div class="layui-form">
<div class="layui-form-item">
<textarea class="layui-textarea layext-text-tool" id="layext-textool-textarea" maxlength="512"
placeholder="默认示例">置于输入框内部、赋值后再渲染工具条支持重置为初始值。</textarea>
</div>
<div class="layui-form-item">
<input class="layui-input" id="layext-textool-max-noreset" placeholder="初始化时指定最大字数限制,关闭重置按钮,使用吸附提示">
</div>
<div class="layui-form-item">
<input class="layui-input" id="layext-textool-text-left" placeholder="无最大字数限制,自定义按钮顺序,居左,默认收起">
</div>
<blockquote class="layui-elem-quote layui-quote-nm">
<p>支持 <code class="layui-badge layui-badge-rim">maxlength</code> 最大字数显示及字数统计、复制、清空和重置等功能。可批量渲染或单个渲染。</p>
</blockquote>
</div>
</div>
</div>
</div>
<!--
<div class="layui-col-xs12 layui-col-sm6 layui-col-lg4">
<div class="layui-card">
<div class="layui-card-header">3</div>
<div class="layui-card-body">
<h3>示例:</h3>
<div class="layui-form">
...
</div>
</div>
</div>
</div>
-->
</div>
</div>
<div class="layui-footer footer footer-index">
<div class="">
<p>MIT license</p>
<p>
<a href="https://zixizixi.cn/" target="_blank">子兮子兮</a>
</p>
</div>
</div>
<div class="site-tree-mobile layui-hide">
<i class="layui-icon">&#xe602;</i>
</div>
<div class="site-mobile-shade"></div>
<script src="js/layui/layui.js" charset="utf-8"></script>
<script>
layui.config({ base: 'js/modules/', version: '202004091537678' }).extend({
numinput: 'numinput/numinput', textool: 'textool/textool.min'
}).use(['form', 'numinput', 'textool', 'code', 'util'], function() {
var $ = layui.$, form = layui.form, numinp = layui.numinput, textool = layui.textool,
util = layui.util, layer = layui.layer;
// 初始化数组输入组件示例
numinp.init({ rightBtns: true });
// 初始化文本工具组件默认示例
textool.init({
inner: true,
initEnd: function() {
layer.msg('textool 1 初始化 End!');
},
showEnd: function($target, $pane) {
layer.msg('textool 1 展开 End!');
},
hideEnd: function($target, $pane) {
layer.msg('textool 1 收起 End!');
}
});
// 初始化文本工具组件关闭重置按钮示例
textool.init({
eleId: 'layext-textool-max-noreset',
maxlength: 32,
initEnd: function() {
layer.msg('textool 2 初始化 End!');
},
showEnd: function($target, $pane) {
layer.msg('textool 2 展开 End!');
},
hideEnd: function($target, $pane) {
layer.msg('textool 2 收起 End!');
},
tools: ['count', 'copy', 'clear'],
tipType: 'laytips',
tipColor: '#5FB878'
});
// 初始化文本工具组件居左示例
textool.init({
eleId: 'layext-textool-text-left',
initEnd: function() {
layer.msg('textool 3 初始化 End!');
},
showEnd: function($target, $pane) {
layer.msg('textool 3 展开 End!');
},
hideEnd: function($target, $pane) {
layer.msg('textool 3 收起 End!');
},
initShow: false,
tools: ['clear', 'copy', 'count'],
align: 'left'
});
util.fixbar();
layui.code({ about: false, height: '500px' });
});
</script>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/iTiki/LayuiExtend.git
git@gitee.com:iTiki/LayuiExtend.git
iTiki
LayuiExtend
LayuiExtend
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385