14 lines
318 B
JavaScript
14 lines
318 B
JavaScript
import { useStore } from '@/stores/hooks';
|
|
|
|
export function useValue(valueName) {
|
|
const { $calculation } = useStore();
|
|
|
|
const storeValue = $calculation.$values.getValue(valueName);
|
|
|
|
function setStoreValue(value) {
|
|
$calculation.$values.setValue(valueName, value);
|
|
}
|
|
|
|
return [storeValue, setStoreValue];
|
|
}
|