hookehuyr

新增选择物资组件

1 +<!--
2 + * @Date: 2024-07-23 16:24:08
3 + * @LastEditors: hookehuyr hookehuyr@gmail.com
4 + * @LastEditTime: 2024-07-23 16:33:39
5 + * @FilePath: /temple_material_request/src/components/chooseMaterial/index.vue
6 + * @Description: 选择物资组件
7 +-->
8 +<template>
9 + <div class="choose-material-page">
10 + <van-popup
11 + v-model:show="showBottom"
12 + position="bottom"
13 + closeable
14 + @close="onClose"
15 + :style="{ height: '100%' }"
16 + ></van-popup>
17 + </div>
18 +</template>
19 +
20 +<script setup>
21 +import { ref } from 'vue'
22 +import { useRoute, useRouter } from 'vue-router'
23 +
24 +import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@/utils/generatePackage.js'
25 +//import { } from '@/utils/generateModules.js'
26 +//import { } from '@/utils/generateIcons.js'
27 +//import { } from '@/composables'
28 +const $route = useRoute();
29 +const $router = useRouter();
30 +useTitle($route.meta.title);
31 +
32 +const props = defineProps({
33 + show: Boolean,
34 +});
35 +const emit = defineEmits(['close']);
36 +
37 +const showBottom = ref(false);
38 +
39 +onMounted(() => {
40 +});
41 +
42 +// 监听字段变化
43 +watch(
44 + () => props.show,
45 + (v) => {
46 + showBottom.value = v;
47 + }
48 +);
49 +
50 +const onClose = () => {
51 + emit('close');
52 +}
53 +</script>
54 +
55 +<style lang="less" scoped>
56 +.choose-material-page {}
57 +</style>