From 28a07b1557a54e658ddab21d15e99052151aa815 Mon Sep 17 00:00:00 2001 From: Lonely Dream Date: Sat, 12 Aug 2023 16:13:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=BF=85=E9=80=89?= =?UTF-8?q?=E4=BF=A1=E6=BA=90=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 62 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 7 deletions(-) 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')