|
@@ -1,5 +1,5 @@
|
|
|
import { defineComponent, Ref, ref } from 'vue'
|
|
|
-import { Button, Cell, CellGroup, Col, Dialog, Divider, NoticeBar, Radio, RadioGroup, Row, Switch, Toast } from 'vant'
|
|
|
+import { Button, Cell, CellGroup, Col, Dialog, Divider, NoticeBar, Radio, RadioGroup, Row, Switch, Toast, Field } from 'vant'
|
|
|
import InfoIcon from './info.svg'
|
|
|
import iconDown from './icons/down.svg'
|
|
|
import iconTv from './icons/tv.png'
|
|
@@ -113,6 +113,22 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 自定义每行小节数量
|
|
|
+ const confirmCustomNum = () => {
|
|
|
+ let customNoduleInfo = JSON.parse(localStorage.getItem('customNoduleInfo')) || []
|
|
|
+ const matchIdx = customNoduleInfo.findIndex((n: any) => n.id === detailState.activeDetail?.examSongId)
|
|
|
+ if (matchIdx > -1) {
|
|
|
+ customNoduleInfo[matchIdx].customNum = Number(SettingState.sett.customNoduleNum)
|
|
|
+ } else {
|
|
|
+ customNoduleInfo.push({
|
|
|
+ id: detailState.activeDetail?.examSongId,
|
|
|
+ customNum: Number(SettingState.sett.customNoduleNum)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ localStorage.setItem('customNoduleInfo', JSON.stringify(customNoduleInfo))
|
|
|
+ window.location.reload()
|
|
|
+ }
|
|
|
+
|
|
|
return () => {
|
|
|
return (
|
|
|
<>
|
|
@@ -128,6 +144,32 @@ export default defineComponent({
|
|
|
<Cell center border={false} title="护眼模式">
|
|
|
<Switch v-model={SettingState.sett.eyeProtection} {...switchProps}></Switch>
|
|
|
</Cell>
|
|
|
+ {/** 大雅金唐曲目自定义小节数 */}
|
|
|
+ {
|
|
|
+ detailState.isDaYaCategory &&
|
|
|
+ <>
|
|
|
+ <Cell center border={false} title="自定义每行小节数">
|
|
|
+ <Switch v-model={SettingState.sett.openCustomNodule} {...switchProps}></Switch>
|
|
|
+ </Cell>
|
|
|
+ {
|
|
|
+ <div class={styles.columnItem}>
|
|
|
+ <Cell center border={false} title="每行小节数">
|
|
|
+ <Field
|
|
|
+ type="number"
|
|
|
+ disabled={!SettingState.sett.openCustomNodule}
|
|
|
+ value={SettingState.sett.customNoduleNum}
|
|
|
+ v-model={SettingState.sett.customNoduleNum}
|
|
|
+ inputAlign="right"
|
|
|
+ maxlength={2}
|
|
|
+ formatter={(value) => value.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
|
|
|
+ />
|
|
|
+ </Cell>
|
|
|
+ <div class={styles.columnBtn} onClick={confirmCustomNum}>确认</div>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ </>
|
|
|
+ }
|
|
|
+
|
|
|
<Divider />
|
|
|
{/* <Cell center border={false} title="乐谱大小">
|
|
|
<div style={{ display: 'flex' }}>
|