press-ui
Version:
简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目
51 lines (42 loc) • 874 B
JavaScript
import { isNotInUni } from '../common/utils/utils';
export function getShowDemoMap() {
const showOtherDemoMap = {
vue2Uni: true,
vue2NotUni: true,
vue3Uni: true,
vue3NotUni: true,
};
// #ifdef VUE2
if (isNotInUni()) {
showOtherDemoMap.vue2NotUni = false;
} else {
showOtherDemoMap.vue2Uni = false;
}
// #endif
// #ifdef VUE3
if (isNotInUni()) {
showOtherDemoMap.vue3NotUni = false;
} else {
showOtherDemoMap.vue3Uni = false;
}
// #endif
return showOtherDemoMap;
}
export function getHideDemoList() {
const hideList = [];
// #ifdef VUE2
if (isNotInUni()) {
hideList.push('vue2-not-uni');
} else {
hideList.push('vue2-uni');
}
// #endif
// #ifdef VUE3
if (isNotInUni()) {
hideList.push('vue3-not-uni');
} else {
hideList.push('vue3-uni');
}
// #endif
return hideList;
}