allocation text fix; props&points suppressed during drag

This commit is contained in:
Tim
2024-05-06 15:24:47 -04:00
parent 613cb7d7f5
commit c3c5db9c23
5 changed files with 38 additions and 26 deletions

View File

@@ -17,11 +17,11 @@
style="flex: 6em"
/>
</td>
<td class="weight">{{ allocationText(weights[higherIndex]) }}</td>
<td class="weight">{{ allocationTexts[higherIndex] }}</td>
</tr>
<tr v-for="i in innerIndexes" class="ml-5">
<td class="pl-5">{{ prices[i] }}</td>
<td class="weight">{{ allocationText(weights[i]) }}</td>
<td class="weight">{{ allocationTexts[i] }}</td>
</tr>
</template>
<tr>
@@ -33,7 +33,7 @@
style="flex: 6em"
/>
</td>
<td class="weight">{{ weights.length ? allocationText(weights[lowerIndex]) : '' }}</td>
<td class="weight">{{ weights.length ? allocationTexts[lowerIndex] : '' }}</td>
</tr>
</tbody>
</table>
@@ -189,6 +189,8 @@ const weights = ref([])
function setPrices(ps) {prices.value = ps}
function setWeights(ws) { weights.value = ws }
const amountSymbol = computed(()=>props.order.amountIsTokenA ? co.selectedSymbol.base.s : co.selectedSymbol.quote.s )
const allocationTexts = computed(()=>weights.value.map((w)=>allocationText(w, w*props.order.amount, amountSymbol.value)))
const color = computed(()=>props.builder.color ? props.builder.color : defaultColor)