mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-25 02:00:21 +08:00
Changed: npm search api url
This commit is contained in:
@@ -250,7 +250,7 @@ export default {
|
||||
},
|
||||
confirmKeyBinding () {
|
||||
const oldKey = this.$db.read().get('settings.shortKey').value()
|
||||
this.db.read().set('settings.shortKey', this.shortKey).write()
|
||||
this.$db.read().set('settings.shortKey', this.shortKey).write()
|
||||
this.keyBindingVisible = false
|
||||
this.$electron.ipcRenderer.send('updateShortKey', oldKey)
|
||||
},
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
confirmCustomLink () {
|
||||
this.$refs.customLink.validate((valid) => {
|
||||
if (valid) {
|
||||
this.db.read().set('settings.customLink', this.customLink.value).write()
|
||||
this.$db.read().set('settings.customLink', this.customLink.value).write()
|
||||
this.customLinkVisible = false
|
||||
this.$electron.ipcRenderer.send('updateCustomLink')
|
||||
} else {
|
||||
|
||||
@@ -233,9 +233,10 @@ export default {
|
||||
}
|
||||
},
|
||||
getSearchResult: function (val) {
|
||||
this.$http.get(`https://api.npms.io/v2/search?q=${val}`)
|
||||
// this.$http.get(`https://api.npms.io/v2/search?q=${val}`)
|
||||
this.$http.get(`https://registry.npmjs.com/-/v1/search?text=${val}`)
|
||||
.then(res => {
|
||||
this.pluginList = res.data.results.map(item => {
|
||||
this.pluginList = res.data.objects.map(item => {
|
||||
return this.handleSearchResult(item)
|
||||
})
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user