import { action } from "mobx"; import { message } from "antd"; import { observer } from "mobx-react-lite"; import EditableContent from "../../../component/EditableContent"; import P from "../../../util/placement"; import store from "../../../store/global"; import Row from "../../Row"; import Text from "../../Text"; const tones = [ "A", "B", "C", "D", "E", "F", "G", "♭A", "♭B", "♭C", "♭D", "♭E", "♭F", "♭G", ].map((t) => ({ key: t, text: t })); const handleChangeTone = action(function (value) { store.tone = value; }); const handleChangeSpeed = action(function (value) { store.speed = value; }); const handleChangeBeat = action(function (value) { const beat = String(value).split("/"); if (beat.length !== 2) { message.error("请以【*/*】的格式输入节拍!"); return false; } const [c, t] = [parseInt(beat[0], 10), parseInt(beat[1], 10)]; if (c > 0 && t > 0) { store.beat = [c, t]; } else { message.error("请输入大于0的拍数和时值!"); return false; } }); function LeftInfoBlock() { return ( <> 1  = {store.tone.startsWith("♭") && ( )} {store.tone.at(-1)} {store.beat[0]} {store.beat[1]} = {store.speed} ); } export default observer(LeftInfoBlock);