From 4cb3784f13fc516c6343798e8bf8a435e14d774c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E5=A9=B7?= <1250548605@qq.com>
Date: Wed, 2 Dec 2020 00:53:00 +0800
Subject: [PATCH] feat: add search-list page
---
src/locales/lang/zh_CN/routes/demo/page.ts | 3 +-
src/router/menus/modules/demo/page.ts | 6 +-
src/router/routes/modules/demo/page.ts | 10 +-
src/views/demo/page/list/search/data.tsx | 37 +++++++
src/views/demo/page/list/search/index.vue | 120 +++++++++++++++++++++
5 files changed, 173 insertions(+), 3 deletions(-)
create mode 100644 src/views/demo/page/list/search/data.tsx
create mode 100644 src/views/demo/page/list/search/index.vue
diff --git a/src/locales/lang/zh_CN/routes/demo/page.ts b/src/locales/lang/zh_CN/routes/demo/page.ts
index eb5ce6f3..062d98d9 100644
--- a/src/locales/lang/zh_CN/routes/demo/page.ts
+++ b/src/locales/lang/zh_CN/routes/demo/page.ts
@@ -24,5 +24,6 @@ export default {
list: '列表页',
listCard: '卡片列表',
- basic: '标准列表',
+ listBasic: '标准列表',
+ listSearch: '搜索列表',
};
diff --git a/src/router/menus/modules/demo/page.ts b/src/router/menus/modules/demo/page.ts
index ea4233c4..ee9b8baa 100644
--- a/src/router/menus/modules/demo/page.ts
+++ b/src/router/menus/modules/demo/page.ts
@@ -107,12 +107,16 @@ const menu: MenuModule = {
children: [
{
path: 'basic',
- name: '标准列表',
+ name: 'routes.demo.page.listBasic',
},
{
path: 'card',
name: 'routes.demo.page.listCard',
},
+ {
+ path: 'search',
+ name: 'routes.demo.page.listSearch',
+ },
],
},
],
diff --git a/src/router/routes/modules/demo/page.ts b/src/router/routes/modules/demo/page.ts
index 65eed7c8..c091f337 100644
--- a/src/router/routes/modules/demo/page.ts
+++ b/src/router/routes/modules/demo/page.ts
@@ -223,7 +223,7 @@ const page: AppRouteModule = {
name: 'ListBasicPage',
component: () => import('/@/views/demo/page/list/basic/index.vue'),
meta: {
- title: 'routes.demo.page.basic',
+ title: 'routes.demo.page.listBasic',
},
},
{
@@ -234,6 +234,14 @@ const page: AppRouteModule = {
title: 'routes.demo.page.listCard',
},
},
+ {
+ path: 'search',
+ name: 'ListSearchPage',
+ component: () => import('/@/views/demo/page/list/search/index.vue'),
+ meta: {
+ title: 'routes.demo.page.listSearch',
+ },
+ },
],
},
// =============================list end=============================
diff --git a/src/views/demo/page/list/search/data.tsx b/src/views/demo/page/list/search/data.tsx
new file mode 100644
index 00000000..50766f46
--- /dev/null
+++ b/src/views/demo/page/list/search/data.tsx
@@ -0,0 +1,37 @@
+import { FormSchema } from '/@/components/Form/index';
+
+export const searchList = (() => {
+ const result: any[] = [];
+ for (let i = 0; i < 6; i++) {
+ result.push({
+ id: i,
+ title: 'Vben Admin',
+ description: ['Vben', '设计语言', 'Typescript'],
+ content: '基于Vue Next, TypeScript, Ant Design实现的一套完整的企业级后台管理系统。',
+ time: '2020-11-14 11:20',
+ });
+ }
+ return result;
+})();
+
+export const actions: any[] = [
+ { icon: 'ant-design:star-outlined', text: '156', color: '#018ffb' },
+ { icon: 'ant-design:like-filled', text: '156', color: '#459ae8' },
+ { icon: 'ant-design:message-filled', text: '2', color: '#42d27d' },
+];
+
+export const schemas: FormSchema[] = [
+ {
+ field: 'field1',
+ component: 'InputSearch',
+ label: '项目名',
+ colProps: {
+ span: 8,
+ },
+ componentProps: {
+ onChange: (e: any) => {
+ console.log(e);
+ },
+ },
+ },
+];
diff --git a/src/views/demo/page/list/search/index.vue b/src/views/demo/page/list/search/index.vue
new file mode 100644
index 00000000..816a408b
--- /dev/null
+++ b/src/views/demo/page/list/search/index.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.content }}
+
+
+
+
+ {{ action.text }}
+
+
+
{{ item.time }}
+
+
+
+ {{ item.title }}
+
+
+ {{ tag }}
+
+
+
+
+
+
+
+
+
+
+
+