From 7a6c7a2d9afd5866ea5fa7b409b41b7673a8f929 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 7 Jul 2022 14:40:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=8E=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=EF=BC=9B=E5=A2=9E=E5=8A=A0=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6=EF=BC=88=E6=9C=AA=E5=AE=8C?= =?UTF-8?q?=E6=88=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/demo.php | 8 +++ database/seeds/InitPost.php | 61 +++++++++++++++++++++++ demo/pc/descriptions.html | 55 ++++++++++++++++++++ source/scss/desciptions/_desciptions.scss | 34 +++++++++++++ source/scss/desciptions/_index.scss | 1 + source/scss/layui-ul.scss | 1 + 6 files changed, 160 insertions(+) create mode 100644 config/demo.php create mode 100644 database/seeds/InitPost.php create mode 100644 demo/pc/descriptions.html create mode 100644 source/scss/desciptions/_desciptions.scss create mode 100644 source/scss/desciptions/_index.scss diff --git a/config/demo.php b/config/demo.php new file mode 100644 index 0000000..0456337 --- /dev/null +++ b/config/demo.php @@ -0,0 +1,8 @@ + [ + 'title' => '描述列表', + 'desc' => '预览表单/表格' + ] +]; diff --git a/database/seeds/InitPost.php b/database/seeds/InitPost.php new file mode 100644 index 0000000..4a6f74f --- /dev/null +++ b/database/seeds/InitPost.php @@ -0,0 +1,61 @@ + [], '组件' => ['tpl_name' => 'pc'], '扩展' => []]; + + foreach ($list_category as $category_title => &$category_data) { + $model_category = Category::where('title', $category_title)->find(); + + if (empty($model_category)) { + $model_category = Category::create([ + 'title' => $category_title, + 'tpl_name' => $category_data['tpl_name'] ?? '', + 'status' => 1 + ]); + } + + $category_data['model'] = $model_category; + } + + $demo_pc_dir = App::getRootPath() . '/demo/pc'; + + $list_demo_file = scandir($demo_pc_dir); + + + + foreach ($list_demo_file as $file_name) { + $file_name = str_replace(['.html', '.', '..',], '', $file_name); + + if (empty($file_name)) { + continue; + } + + $model_post = Post::where('tpl_name', $file_name)->find(); + if (empty($model_post)) { + $model_post = new Post(); + $model_post->tpl_name = $file_name; + $model_post->title = Config::get("demo.{$file_name}.title", $file_name); + $model_post->desc = Config::get("demo.{$file_name}.desc", $file_name); + $model_post->category_id = $list_category['组件']['model']['id']; + $model_post->save(); + } + } + } +} diff --git a/demo/pc/descriptions.html b/demo/pc/descriptions.html new file mode 100644 index 0000000..92544c5 --- /dev/null +++ b/demo/pc/descriptions.html @@ -0,0 +1,55 @@ +
+ 描述列表 +
+
+
+
+ 昵称 +
+
+ 奥古斯宏 +
+
+
+
+ 手机号 +
+
+ 13000000001 +
+
+
+
+ 地址 +
+
+ 山东省临沂市兰山区 +
+
+
+
+ 身份证号 +
+
+ 371302199700000000 +
+
+
+
+ 核酸状态 +
+
+ 阴性 +
+
+
+
+ 民族 +
+
+ 汉 +
+
+
+
+
\ No newline at end of file diff --git a/source/scss/desciptions/_desciptions.scss b/source/scss/desciptions/_desciptions.scss new file mode 100644 index 0000000..5c496b8 --- /dev/null +++ b/source/scss/desciptions/_desciptions.scss @@ -0,0 +1,34 @@ +.ul-descriptions { + + display:flex; + flex-wrap: wrap; + + + .item { + display : inline-flex; + width : 30%; + position: relative; + height : 40px; + + + + .label { + + width : calc(40% - 12px); + padding : 12px 6px; + position: absolute; + + } + + .value { + position : absolute; + width : 60%; + margin-left : 40%; + display : flex; + align-items : center; + justify-content: left; + + height : 100% + } + } +} \ No newline at end of file diff --git a/source/scss/desciptions/_index.scss b/source/scss/desciptions/_index.scss new file mode 100644 index 0000000..6710898 --- /dev/null +++ b/source/scss/desciptions/_index.scss @@ -0,0 +1 @@ +@import './desciptions'; \ No newline at end of file diff --git a/source/scss/layui-ul.scss b/source/scss/layui-ul.scss index 35a6e8e..ba68ac8 100644 --- a/source/scss/layui-ul.scss +++ b/source/scss/layui-ul.scss @@ -7,6 +7,7 @@ @import './title/index'; @import './jumbotron/index'; @import './footer/index'; +@import './desciptions/index'; /* 头部开始 */