123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <view>
- <model1 :shareNumber='shareNumber' :isDefault='isDefault' v-if="modelId==3||modelId==1" :templateDetail='templateData' :isShare='isShare' :isLook='isLook'></model1>
- <model2 :shareNumber='shareNumber' :isDefault='isDefault' v-if="modelId==4" :templateDetail='templateData' :isShare='isShare' :isLook='isLook'></model2>
- <model3 :shareNumber='shareNumber' :isDefault='isDefault' v-if="modelId==5" :templateDetail='templateData' :isShare='isShare' :isLook='isLook'></model3>
- </view>
- </template>
- <script>
- import model1 from './modeltemplate/model_1.vue';
- import model2 from './modeltemplate/model_2.vue'
- import model3 from './modeltemplate/model_3.vue'
- export default {
- props: {
- // 浏览数量
- shareNumber: {
- type: Number,
- default:0
- },
- // 是否显示默认数据
- isDefault: {
- type: Boolean,
- default:true
- },
- templateData: {
- type: Object,
- default: ()=>{
- return {}
- }
- },
- isShare:{
- type: Boolean,
- default:false
- },
- //1为模板2为用户
- isLook:{
- type: Number,
- default:0
- },
- modelId:{
- type: Number,
- default:0
- },
- },
- components: {
- model1,
- model2,
- model3
- },
- data() {
- return {
- model: 0
- }
- },
- onLoad() {
- console.log('233');
- uni.postMessage('打开页面')
- },
- onUnload() {
- uni.postMessage('关闭页面')
- }
- }
- </script>
|