@@ -139,6 +141,7 @@
v-model="scope.row.value"
size="small"
suffix-icon="el-icon-edit"
+ @change="scope.row.value = Number(scope.row.value)"
/>
{
+ if (!queryString) return true
+ return !!s.match(new RegExp(queryString, 'i'))
+ })
+ .map(s => {
+ return {
+ value: s,
+ label: s
+ }
+ })
+ .sort((a, b) => {
+ return a > b ? -1 : 1
+ })
+ cb(data)
+ },
+ onParamTypeChange (row) {
+ if (row.type === 'number') {
+ row.value = Number(row.value)
+ }
}
}
}
diff --git a/frontend/src/views/spider/SpiderDetail.vue b/frontend/src/views/spider/SpiderDetail.vue
index 7dcbec09..fc0e990c 100644
--- a/frontend/src/views/spider/SpiderDetail.vue
+++ b/frontend/src/views/spider/SpiderDetail.vue
@@ -22,7 +22,7 @@
-
+
@@ -69,9 +69,6 @@ export default {
},
watch: {
activeTabName () {
- // 初始化文件
- this.$store.commit('file/SET_FILE_CONTENT', '')
- this.$store.commit('file/SET_CURRENT_PATH', '')
}
},
data () {
@@ -201,8 +198,13 @@ export default {
this.$st.sendEv('教程', '开始', 'spider-detail-config')
}, 100)
}
- } else if (this.activeTabName === 'scrapy-config') {
+ } else if (this.activeTabName === 'scrapy-settings') {
this.$store.dispatch('spider/getSpiderScrapySpiders', this.$route.params.id)
+ this.$store.dispatch('spider/getSpiderScrapySettings', this.$route.params.id)
+ } else if (this.activeTabName === 'files') {
+ if (this.currentPath) {
+ this.$store.dispatch('file/getFileContent', { path: this.currentPath })
+ }
}
this.$st.sendEv('爬虫详情', '切换标签', tab.name)
},