mirror of
https://github.com/weilanwl/coloruicss.git
synced 2026-03-13 11:34:02 +08:00
Colorui-UniApp
This commit is contained in:
40
Colorui-UniApp/pages/index/index.vue
Normal file
40
Colorui-UniApp/pages/index/index.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<view>
|
||||
<basics v-if="PageCur=='basics'"></basics>
|
||||
<components v-if="PageCur=='component'"></components>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
<view class="cu-bar tabbar bg-white shadow foot">
|
||||
<view class="action" @click="NavChange" data-cur="basics">
|
||||
<view class='icon-cu-image'>
|
||||
<image :src="'/static/tabbar/basics' + [PageCur=='basics'?'_cur':''] + '.png'"></image>
|
||||
</view>
|
||||
<view :class="PageCur=='basics'?'text-green':'text-gray'">元素</view>
|
||||
</view>
|
||||
<view class="action" @click="NavChange" data-cur="component">
|
||||
<view class='icon-cu-image'>
|
||||
<image :src="'/static/tabbar/component' + [PageCur == 'component'?'_cur':''] + '.png'"></image>
|
||||
</view>
|
||||
<view :class="PageCur=='component'?'text-green':'text-gray'">组件</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageCur: 'basics'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
NavChange: function(e) {
|
||||
this.PageCur = e.currentTarget.dataset.cur
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user