feat:添加 scope 点击事件
This commit is contained in:
41
nezha-fronted/package-lock.json
generated
41
nezha-fronted/package-lock.json
generated
@@ -2493,14 +2493,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"clone-regexp": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==",
|
|
||||||
"requires": {
|
|
||||||
"is-regexp": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"clone-response": {
|
"clone-response": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
|
||||||
@@ -4505,11 +4497,6 @@
|
|||||||
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
|
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"diacritics": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/diacritics/-/diacritics-1.3.0.tgz",
|
|
||||||
"integrity": "sha1-PvqHMj67hj5mls67AILUj/PW96E="
|
|
||||||
},
|
|
||||||
"diffie-hellman": {
|
"diffie-hellman": {
|
||||||
"version": "5.0.3",
|
"version": "5.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
||||||
@@ -7438,11 +7425,6 @@
|
|||||||
"has": "^1.0.1"
|
"has": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"is-regexp": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA=="
|
|
||||||
},
|
|
||||||
"is-resolvable": {
|
"is-resolvable": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz",
|
||||||
@@ -13906,6 +13888,11 @@
|
|||||||
"repeat-string": "^1.6.1"
|
"repeat-string": "^1.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"to-style": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-style/-/to-style-1.3.3.tgz",
|
||||||
|
"integrity": "sha1-Y6K3Cm9KfU/cLtV6C+TnI1y2aZw="
|
||||||
|
},
|
||||||
"toidentifier": {
|
"toidentifier": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||||
@@ -14554,6 +14541,15 @@
|
|||||||
"element-resize-detector": "^1.2.1"
|
"element-resize-detector": "^1.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"vue-highlight-text": {
|
||||||
|
"version": "1.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-highlight-text/-/vue-highlight-text-1.6.2.tgz",
|
||||||
|
"integrity": "sha512-0mSzB/MyrHJm09boCev7yA9mEk3ROig9K5guLlpT+GePz/FH3ikMnY+8aXaAJA1mIHRjQv/gCCCCtohLC2Qq1g==",
|
||||||
|
"requires": {
|
||||||
|
"to-style": "^1.3.3",
|
||||||
|
"vue": "^2.5.11"
|
||||||
|
}
|
||||||
|
},
|
||||||
"vue-hot-reload-api": {
|
"vue-hot-reload-api": {
|
||||||
"version": "2.3.4",
|
"version": "2.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
|
"resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz",
|
||||||
@@ -14678,15 +14674,6 @@
|
|||||||
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"vue-text-highlight": {
|
|
||||||
"version": "2.0.10",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-text-highlight/-/vue-text-highlight-2.0.10.tgz",
|
|
||||||
"integrity": "sha512-6WMWqr3OYonmK257o87shm7efMaFTyevEo8u5fN15gceyy2463fITFj9Wuh+W5lqLUm4n6cAZUS+y6xfzYB2aA==",
|
|
||||||
"requires": {
|
|
||||||
"clone-regexp": "^2.1.0",
|
|
||||||
"diacritics": "^1.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vuedraggable": {
|
"vuedraggable": {
|
||||||
"version": "2.23.2",
|
"version": "2.23.2",
|
||||||
"resolved": "https://registry.npm.taobao.org/vuedraggable/download/vuedraggable-2.23.2.tgz",
|
"resolved": "https://registry.npm.taobao.org/vuedraggable/download/vuedraggable-2.23.2.tgz",
|
||||||
|
|||||||
@@ -41,11 +41,11 @@
|
|||||||
"vue-countupjs": "^1.0.0",
|
"vue-countupjs": "^1.0.0",
|
||||||
"vue-draggable-resizable": "^2.3.0",
|
"vue-draggable-resizable": "^2.3.0",
|
||||||
"vue-grid-layout": "^2.3.12",
|
"vue-grid-layout": "^2.3.12",
|
||||||
|
"vue-highlight-text": "^1.6.2",
|
||||||
"vue-i18n": "^8.15.1",
|
"vue-i18n": "^8.15.1",
|
||||||
"vue-quill-editor": "^3.0.6",
|
"vue-quill-editor": "^3.0.6",
|
||||||
"vue-resource": "^1.5.1",
|
"vue-resource": "^1.5.1",
|
||||||
"vue-router": "^3.0.1",
|
"vue-router": "^3.0.1",
|
||||||
"vue-text-highlight": "^2.0.10",
|
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
"vuex": "^3.1.2",
|
"vuex": "^3.1.2",
|
||||||
"xlsx": "^0.15.6",
|
"xlsx": "^0.15.6",
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^4.3.1",
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
"eslint-plugin-vue": "^7.7.0",
|
"eslint-plugin-vue": "^7.7.0",
|
||||||
"extract-text-webpack-plugin": "^3.0.0",
|
"extract-text-webpack-plugin": "^3.0.0",
|
||||||
"file-loader": "^1.1.4",
|
"file-loader": "^1.1.4",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
>
|
>
|
||||||
<div class="list-item-content">
|
<div class="list-item-content">
|
||||||
<i class="nz-icon" :class="selectIcon(item)" />
|
<i class="nz-icon" :class="selectIcon(item)" />
|
||||||
<TextHighlight :queries="searchStr" :highlightClass='"list-item-highlight"' :overWriteStyle="{color: '#FA901C'}" style="vertical-align: middle" :title="item.name">{{item.name}}</TextHighlight>
|
<HighlightText :keyword="searchStr" :overWriteStyle="{color: '#FA901C'}" style="vertical-align: middle" :title="item.name">{{item.name}}</HighlightText>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-item-sub" v-if="item.sub">
|
<div class="list-item-sub" v-if="item.sub">
|
||||||
{{ item.sub }}
|
{{ item.sub }}
|
||||||
@@ -81,13 +81,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import HighlightText from 'vue-highlight-text'
|
import HighlightText from 'vue-highlight-text'
|
||||||
import TextHighlight from 'vue-text-highlight';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'globalSearch',
|
name: 'globalSearch',
|
||||||
components: {
|
components: {
|
||||||
TextHighlight
|
HighlightText
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
globalShow () {
|
globalShow () {
|
||||||
@@ -139,6 +138,7 @@ export default {
|
|||||||
],
|
],
|
||||||
timer: null,
|
timer: null,
|
||||||
searchTimer: null,
|
searchTimer: null,
|
||||||
|
scopeChangeTimer: null,
|
||||||
isKeyDown: false,
|
isKeyDown: false,
|
||||||
stat: {
|
stat: {
|
||||||
|
|
||||||
@@ -268,9 +268,19 @@ export default {
|
|||||||
this.nextLoading = true
|
this.nextLoading = true
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
scopeChange () {
|
scopeChange (item) {
|
||||||
this.pageObj.pageNo = 1
|
if (this.scopeChangeTimer) {
|
||||||
|
clearInterval(this.scopeChangeTimer)
|
||||||
|
this.scopeChangeTimer = null
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
item.isSelect = !item.isSelect
|
||||||
|
this.scopeChangeTimer = setTimeout(() => {
|
||||||
|
this.pageObj.pageNo = 1
|
||||||
|
this.tableData = []
|
||||||
|
this.selectIndex = 0
|
||||||
|
this.getData()
|
||||||
|
}, 100)
|
||||||
},
|
},
|
||||||
getData () {
|
getData () {
|
||||||
const param = {
|
const param = {
|
||||||
|
|||||||
Reference in New Issue
Block a user