From 82a497927c449f58bbc7d8a9141cc054649bac84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 5 Mar 2025 19:36:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20tabs=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A4=A7=E9=87=8F=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/tabs.html | 107 ++++++--- src/css/layui.css | 8 +- src/modules/tabs.js | 549 +++++++++++++++++++++++++++----------------- 3 files changed, 422 insertions(+), 242 deletions(-) diff --git a/examples/tabs.html b/examples/tabs.html index 12241777..5a6eff73 100644 --- a/examples/tabs.html +++ b/examples/tabs.html @@ -7,10 +7,11 @@ -
+
+

动态操作

    -
  • Tab1
  • +
  • Tab1
  • Tab2
  • Tab3
  • Tab4
  • @@ -18,7 +19,7 @@
  • Tab6
-
Tab Content-1
+
Tab Content-1
Tab Content-2
Tab Content-3
Tab Content-4
@@ -35,14 +36,10 @@
-
- 方法渲染: -
-
-
- -
卡片风格:
+

方法渲染

+
+

卡片风格

  • 标题1
  • @@ -62,8 +59,7 @@
-
卡片 + 边框:
- +

卡片 + 边框

  • 标题1
  • @@ -94,8 +90,7 @@
-
HASH:
- +

标签 HASH 定位

-
标签嵌套:
- +

标签嵌套

-
- 给任意元素添加 Tab 功能: -
- +

给任意元素绑定 tabs 切换功能

+