From 101292b06ec86d96d0ac188fa73cae793fce0500 Mon Sep 17 00:00:00 2001 From: XiaoLin Date: Fri, 23 Oct 2020 18:26:45 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=96=B0=E5=A2=9E=20useWeight=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5,=20=E5=8F=AF=E4=BB=A5=E6=9D=83=E9=87=8D?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=A6=82=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.CN.md | 11 ++++++++--- README.md | 11 ++++++++--- package.json | 2 +- src/App.vue | 10 +++++++--- src/components/fortuneWheel/index.vue | 6 +++++- 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/README.CN.md b/README.CN.md index 4114880..035da3e 100644 --- a/README.CN.md +++ b/README.CN.md @@ -31,6 +31,7 @@ https://xiaolin1995.github.io/vue-fortune-wheel/demo/ { - const count = Math.round(row.probability * this.decimalSpaces) + const count = this.useWeight ? (row.weight || 0) : Math.round(row.probability * this.decimalSpaces) const arr = (new Array(count)).fill(row.id) idArr.push(...arr) })