全栈小学生 8a600afd4f 更新uni-app
2023-05-20 18:12:41 +08:00

21 lines
549 B
Vue

<template>
<view>
<!-- 扩展组件 -->
</view>
</template>
<script setup lang="ts">
// 自定义扩展组件
import { computed } from 'vue';
import useDiyStore from '@/stores/diy';
const props = defineProps(['component', 'index']);
const diyStore = useDiyStore();
const diyComponent = computed(() => {
if (diyStore.mode == 'decorate') {
return diyStore.value[props.index];
} else {
return props.component;
}
})
</script>
<style lang="scss" scoped></style>