This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
130 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/components/app-main/components/main-right/components/components/attrs-header.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<div> | ||
<div class="app-main-right-link"> | ||
<el-link type="primary" target="_blank" :href="url" | ||
>点击查看{{ title }}</el-link | ||
> | ||
<span style="vertical-align: middle;">属性详细解释</span> | ||
</div> | ||
<div class="app-main-right-search"> | ||
<el-input | ||
v-model="keyword" | ||
clearable | ||
@input="$emit('input', $event)" | ||
placeholder="输入关键字搜索属性" | ||
></el-input> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'attrs-header', | ||
props: { | ||
url: String, | ||
title: String | ||
}, | ||
data() { | ||
return { | ||
keyword: '' | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.app-main-right-link { | ||
color: #666; | ||
font-size: 14px; | ||
margin-left: 24px; | ||
padding-left: 10px; | ||
margin-bottom: 10px; | ||
border-left: 3px solid #eee; | ||
} | ||
.app-main-right-search { | ||
padding: 20px; | ||
box-sizing: border-box; | ||
} | ||
</style> |
26 changes: 26 additions & 0 deletions
26
src/components/app-main/components/main-right/components/components/searchMixin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
export default { | ||
data () { | ||
return { | ||
// 搜索关键字 | ||
keyword: '' | ||
} | ||
}, | ||
computed: { | ||
// 根据搜过条件过滤 | ||
filterFormDesc () { | ||
if (this.keyword) { | ||
return Object.keys(this.formDesc).reduce((acc, key) => { | ||
if ( | ||
key.includes(this.keyword) || | ||
this.formDesc[key].label.includes(this.keyword) | ||
) { | ||
acc[key] = this.formDesc[key] | ||
} | ||
return acc | ||
}, {}) | ||
} else { | ||
return this.formDesc | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters