|
@@ -1,4 +1,4 @@
|
|
-import { ActionSheet, ActionSheetAction, Cell, Grid, GridItem } from 'vant'
|
|
|
|
|
|
+import { ActionSheet, ActionSheetAction, Cell, Grid, GridItem, Picker, Popup } from 'vant'
|
|
import { computed, defineComponent, onMounted, reactive, ref } from 'vue'
|
|
import { computed, defineComponent, onMounted, reactive, ref } from 'vue'
|
|
import styles from '../index.module.less'
|
|
import styles from '../index.module.less'
|
|
import iconA from '../images/icon-photo.png'
|
|
import iconA from '../images/icon-photo.png'
|
|
@@ -68,15 +68,13 @@ export default defineComponent({
|
|
const actions = computed(() => {
|
|
const actions = computed(() => {
|
|
const subList = data.subjects.map((n: any) => {
|
|
const subList = data.subjects.map((n: any) => {
|
|
return {
|
|
return {
|
|
- name: n.subjectName,
|
|
|
|
- value: n.subjectId,
|
|
|
|
- color: activeName.value == n.subjectName ? 'var(--van-primary-color)' : ''
|
|
|
|
|
|
+ text: n.subjectName,
|
|
|
|
+ value: n.subjectId
|
|
}
|
|
}
|
|
})
|
|
})
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
- name: '全部声部',
|
|
|
|
- color: activeName.value == '全部声部' ? 'var(--van-primary-color)' : ''
|
|
|
|
|
|
+ text: '全部声部'
|
|
},
|
|
},
|
|
...subList
|
|
...subList
|
|
]
|
|
]
|
|
@@ -138,10 +136,12 @@ export default defineComponent({
|
|
</Grid>
|
|
</Grid>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class={styles.itemSelect}>
|
|
|
|
- <div class={styles.select} onClick={() => (show.value = true)}>
|
|
|
|
|
|
+ <div class={'searchGroup-single'} style="padding-top: 0 !important;">
|
|
|
|
+ <div
|
|
|
|
+ class={['searchItem', show.value ? 'searchItem-active' : '']}
|
|
|
|
+ onClick={() => (show.value = true)}
|
|
|
|
+ >
|
|
<span>{activeName.value}</span>
|
|
<span>{activeName.value}</span>
|
|
- <img src={iconArrow} />
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -176,18 +176,19 @@ export default defineComponent({
|
|
)}
|
|
)}
|
|
</div>
|
|
</div>
|
|
</OFullRefresh>
|
|
</OFullRefresh>
|
|
- <ActionSheet
|
|
|
|
- teleport="body"
|
|
|
|
- cancelText="取消"
|
|
|
|
- v-model:show={show.value}
|
|
|
|
- actions={actions.value}
|
|
|
|
- onSelect={(action: any, index: number) => {
|
|
|
|
- activeName.value = action.name || '全部声部'
|
|
|
|
- data.subjectId = action.value || ''
|
|
|
|
- show.value = false
|
|
|
|
- getData()
|
|
|
|
- }}
|
|
|
|
- ></ActionSheet>
|
|
|
|
|
|
+
|
|
|
|
+ <Popup v-model:show={show.value} position="bottom" round class={'popupBottomSearch'}>
|
|
|
|
+ <Picker
|
|
|
|
+ columns={actions.value}
|
|
|
|
+ onCancel={() => (show.value = false)}
|
|
|
|
+ onConfirm={(val: any) => {
|
|
|
|
+ activeName.value = val.selectedOptions[0].text || '全部声部'
|
|
|
|
+ data.subjectId = val.selectedOptions[0].value || ''
|
|
|
|
+ show.value = false
|
|
|
|
+ getData()
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ </Popup>
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|