You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.3 KiB
Vue
63 lines
1.3 KiB
Vue
<template>
|
|
<view class="print-setting-page">
|
|
<ch-nav-bar :height="66" title="打印设定">
|
|
<block v-slot:right>
|
|
<ch-nav-btn icon="paperplane-filled" iconSize="28" color="#fff" @click="print">
|
|
打印
|
|
</ch-nav-btn>
|
|
</block>
|
|
</ch-nav-bar>
|
|
<uni-section title="打印内容" type="line">
|
|
<!-- <ch-flex class="print-list" justify="around">
|
|
<view class="print-item" :class="{'selected': currentItem.id == item.id}" @click="selectItem(item)" v-for="item in printItems" :key="item.id">
|
|
{{ item.name }}
|
|
</view>
|
|
</ch-flex> -->
|
|
<uni-data-checkbox mode="tag" multiple v-model="currentItem" :localdata="printItems"></uni-data-checkbox>
|
|
</uni-section>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { reactive, toRefs } from 'vue';
|
|
|
|
const defaultPrintItems = [
|
|
{
|
|
value: '002',
|
|
text: '题干',
|
|
disable: false
|
|
},
|
|
{
|
|
value: '003',
|
|
text: '答案',
|
|
disable: false
|
|
},
|
|
{
|
|
value: '004',
|
|
text: '解析',
|
|
disable: false
|
|
},
|
|
]
|
|
|
|
const data = reactive({
|
|
printItems: [...defaultPrintItems],
|
|
currentItem: []
|
|
})
|
|
|
|
const { printItems, currentItem } = toRefs(data)
|
|
|
|
function selectItem (item) {
|
|
currentItem.value = item;
|
|
}
|
|
|
|
function print () {
|
|
uni.navigateTo({
|
|
url: '/pages/print/print'
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
@import 'printSetting.scss';
|
|
</style>
|