Commit 29e54f8f by 无尘

fix: 修改搜索

parent 54edf658
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>达摩开放平台</title><link href=./static/css/app.27ecddfd65622c166a892b5d485ac4fd.css rel=stylesheet></head><body class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.0e6603408077eaec5557.js></script><script type=text/javascript src=./static/js/vendor.0f5b275d4a227ad49647.js></script><script type=text/javascript src=./static/js/app.9c50334119061bcb2895.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>达摩开放平台</title><link href=./static/css/app.a55ab6b12f84d7c3766c879386270db5.css rel=stylesheet></head><body class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.e6c9a7b9ccb8ce6bef96.js></script><script type=text/javascript src=./static/js/vendor.0f5b275d4a227ad49647.js></script><script type=text/javascript src=./static/js/app.9c50334119061bcb2895.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var r={},t={13:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"dc5820857959176b1da4",1:"adba71f29a9630854db5",2:"9f167b84b9aa44d35a11",3:"329b7acacdf90005cd0f",4:"3bad3131ce3155bd6ba3",5:"b3cf76f8c670cd2efb7e",6:"737da25334f9daa2d713",7:"474d894e86be623775df",8:"5e787f5eb2f4bd7cfb7b",9:"9caad4c0ba5b8b4813ee",10:"63807a09986add449f8a"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);s.length;)s.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var r={},t={13:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"dc5820857959176b1da4",1:"adba71f29a9630854db5",2:"5ea71994ffb9873345e3",3:"c07e0577f86298c0d673",4:"237c76af00f6db02834c",5:"b3cf76f8c670cd2efb7e",6:"737da25334f9daa2d713",7:"474d894e86be623775df",8:"5e787f5eb2f4bd7cfb7b",9:"9caad4c0ba5b8b4813ee",10:"63807a09986add449f8a"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file \ No newline at end of file
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</li> </li>
</ul> </ul>
<div class="search-wrap"> <div class="search-wrap">
<el-input placeholder="请输入搜索内容" prefix-icon="el-icon-search" v-model="searchValue" @keyup.native="value => searchData(value)" @clear="clearInput"> </el-input> <el-input clearable placeholder="请输入搜索内容" prefix-icon="el-icon-search" v-model="searchValue" @keyup.native="value => searchData(value)" @clear="clearInput"> </el-input>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -124,6 +124,8 @@ export default { ...@@ -124,6 +124,8 @@ export default {
}); });
} }
}); });
that.activeId = resData.result[0].menuId;
that.$emit('changeDoc', resData.result[0]);
} }
/* if (node) { /* if (node) {
node.children = resData.result || []; node.children = resData.result || [];
......
...@@ -8,10 +8,10 @@ import openDocRight from '@/components/open-doc-right.vue'; ...@@ -8,10 +8,10 @@ import openDocRight from '@/components/open-doc-right.vue';
<div class="document-right-body border-box"> <div class="document-right-body border-box">
<!-- 搜索结果 --> <!-- 搜索结果 -->
<div class="search-contain" v-if="searchFlag"> <div class="search-contain" v-if="searchFlag">
<h2>搜索结果{{ totalCount }}</h2> <h2>搜索结果({{ totalCount }})</h2>
<div class="search-list" v-if="searchList.length"> <div class="search-list" v-if="searchList.length">
<ul> <ul>
<li class="search-list-cell" v-for="(item, index) in searchList" :key="index + 'search'" @click="toDocMenuDetail(item)"> <li class="search-list-cell border-box" v-for="(item, index) in searchList" :key="index + 'search'" @click="toDocMenuDetail(item)">
{{ item.menuName }} {{ item.menuName }}
</li> </li>
</ul> </ul>
...@@ -257,6 +257,11 @@ export default { ...@@ -257,6 +257,11 @@ export default {
searchData(newData, oldData) { searchData(newData, oldData) {
const that = this; const that = this;
that.searchFlag = true; that.searchFlag = true;
if (!newData) {
that.searchList = [];
that.totalCount = 0;
return false;
}
that.getSearchData(); that.getSearchData();
} }
}, },
...@@ -301,6 +306,9 @@ export default { ...@@ -301,6 +306,9 @@ export default {
color: #4c70e8; color: #4c70e8;
border: 1px solid rgba(225, 230, 240, 1); border: 1px solid rgba(225, 230, 240, 1);
cursor: pointer; cursor: pointer;
&:hover {
border-color: #4c70e8;
}
} }
ul { ul {
overflow: hidden; overflow: hidden;
...@@ -312,9 +320,13 @@ export default { ...@@ -312,9 +320,13 @@ export default {
line-height: 60px; line-height: 60px;
font-size: 16px; font-size: 16px;
color: #142655; color: #142655;
font-weight: 700;
border-bottom: 1px dotted #eee; border-bottom: 1px dotted #eee;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
&:hover {
color: #4c70e8;
}
&:nth-child(2n) { &:nth-child(2n) {
margin-left: 56px; margin-left: 56px;
} }
......
...@@ -138,6 +138,8 @@ export default { ...@@ -138,6 +138,8 @@ export default {
color: #9ba5b4; color: #9ba5b4;
} }
li:first-child { li:first-child {
font-size: 14px;
font-weight: 500;
margin-bottom: 20px; margin-bottom: 20px;
border-bottom: 1px solid rgba(89, 114, 153, 0.36); border-bottom: 1px solid rgba(89, 114, 153, 0.36);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment