bugfixes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
import ToolbarPane from "@/components/chart/ToolbarPane.vue";
|
||||
import NeedsProvider from "@/components/NeedsProvider.vue";
|
||||
import Orders from "@/components/Orders.vue";
|
||||
import Orders from "@/components/Status.vue";
|
||||
import NeedsSigner from "@/components/NeedsSigner.vue";
|
||||
</script>
|
||||
|
||||
|
||||
@@ -285,24 +285,25 @@ const prices = computed(()=>{
|
||||
|
||||
|
||||
const weights = computed(() => {
|
||||
const r = props.builder.rungs
|
||||
const n = props.builder.rungs
|
||||
const s = -props.builder.skew
|
||||
if (r === 1) return [1]
|
||||
if (n === 1) return [1]
|
||||
const result = []
|
||||
if (s === 0) {
|
||||
for (let i = 0; i < r; i++)
|
||||
result.push(1 / r)
|
||||
// equal weighted
|
||||
for (let i = 0; i < n; i++)
|
||||
result.push(1 / n)
|
||||
} else if (s === 1) {
|
||||
result.push(1)
|
||||
for (let i = 1; i < r; i++)
|
||||
for (let i = 1; i < n; i++)
|
||||
result.push(0)
|
||||
} else if (s === -1) {
|
||||
for (let i = 1; i < r; i++)
|
||||
for (let i = 1; i < n; i++)
|
||||
result.push(0)
|
||||
result.push(1)
|
||||
} else {
|
||||
for (let i = 0; i < r; i++)
|
||||
result.push((1 - s * (2 * i / (r - 1) - 1)) / r)
|
||||
for (let i = 0; i < n; i++)
|
||||
result.push((1 - s * (2 * i / (n - 1) - 1)) / n)
|
||||
}
|
||||
return result
|
||||
})
|
||||
|
||||
@@ -12,7 +12,8 @@ import {computed} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const props = defineProps(['icon', 'path', 'tooltip'])
|
||||
const isCurrent = computed(() => useRoute().path === props.path)
|
||||
const route = useRoute();
|
||||
const isCurrent = computed(() => route.path === props.path)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user