mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-12 01:47:08 +00:00
21 lines
549 B
Vue
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>
|