From ad444fe3ae284320b6e928abf78c20b186ad3361 Mon Sep 17 00:00:00 2001 From: xuanzai <43233731+MikuBlog@users.noreply.github.com> Date: Sun, 1 Dec 2019 15:48:30 +0800 Subject: [PATCH] perf[views/icons]: use grid (#2803) --- src/views/icons/index.vue | 54 +++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/src/views/icons/index.vue b/src/views/icons/index.vue index 3677afd6..33fab3a3 100644 --- a/src/views/icons/index.vue +++ b/src/views/icons/index.vue @@ -6,30 +6,34 @@ -
- -
- {{ generateIconCode(item) }} -
-
- - {{ item }} -
-
-
+
+
+ +
+ {{ generateIconCode(item) }} +
+
+ + {{ item }} +
+
+
+
-
- -
- {{ generateElementIconCode(item) }} -
-
- - {{ item }} -
-
-
+
+
+ +
+ {{ generateElementIconCode(item) }} +
+
+ + {{ item }} +
+
+
+
@@ -66,6 +70,12 @@ export default { .icons-container { margin: 10px 20px 0; overflow: hidden; + + .grid { + position: relative; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + } .icon-item { margin: 20px;