diff --git a/src/locales/lang/zh_CN/routes/demo/page.ts b/src/locales/lang/zh_CN/routes/demo/page.ts index eb5ce6f38c4..062d98d9f8c 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 ea4233c41b3..ee9b8baa67d 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 65eed7c83e3..c091f337639 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 00000000000..50766f4614e --- /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 00000000000..816a408bfa3 --- /dev/null +++ b/src/views/demo/page/list/search/index.vue @@ -0,0 +1,120 @@ + + +