diff --git a/index.html b/index.html index a282c42..cb676a5 100644 --- a/index.html +++ b/index.html @@ -25,16 +25,29 @@ >
-

方块{{ i + 1 }}个数:

+ + + + +
+ +
-

方案数:{{ res.length }}

+

方案数:{{ selectResult.length }}/{{ res.length }}

-
-

当前展示方案:{{ now + 1 }} / {{ res.length }}

+
+

当前展示方案:{{ now + 1 }} / {{ selectResult.length }}

- +
v?i+1:-1).filter(v => v !== -1); + } + console.log("filter array:",requiredInfoIds); + if(requiredInfoIds.length == 0){ + this.selectResult = this.res; + return; + } + this.selectResult = this.res.filter(function(result){ + let temp = [].concat(...result); + for(let i=0;i { + if(isSelect && i!=index || !isSelect && i==index){ + requiredInfoIds.push(i+1); + } + }); + this.filter(requiredInfoIds); } }, computed: { sol() { - return this.res[this.now] + return this.selectResult[this.now] } } }).mount('#app')