添加日历

This commit is contained in:
WindowBird 2025-10-30 17:19:26 +08:00
parent 7ab9e16c35
commit 206224b02f
4 changed files with 5703 additions and 147 deletions

19
main.js
View File

@ -4,6 +4,7 @@ import uvUI from '@climblee/uv-ui'
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
@ -18,6 +19,24 @@ import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.use(uvUI);
// 调用setConfig方法方法内部会进行对象属性深度合并可以放心嵌套配置
// 需要在Vue.use(uvUI)之后执行
uni.$uv.setConfig({
// 修改$uv.config对象的属性
// 修改$uv.props对象的属性
props: {
// 修改uv-text组件的size参数的默认值注意默认值都要用default声明
text: {
color: {
default: 'red'
}
}
// 其他组件属性配置具体的参数名称可以去每个组件的props.js中进行查看
// ......
}
})
return {
app
}

View File

@ -1,26 +1,72 @@
<template>
<uv-tabs :list="list" @click="click"></uv-tabs>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
<uv-icon name="photo" size="30" color="#909399"></uv-icon>
<button class="uv-reset-button">点击登录</button>
<button >点击登录</button>
<view>
<uv-calendar ref="calendar" mode="single" @confirm="confirm"></uv-calendar>
<button @click="open">打开</button>
</view>
</view>
<uv-tabbar :value="value" @change="index=>value = index">
<uv-tabbar-item text="首页" icon="home" dot></uv-tabbar-item>
<uv-tabbar-item text="放映厅" icon="photo" badge="3"></uv-tabbar-item>
<uv-tabbar-item text="直播" icon="play-right"></uv-tabbar-item>
<uv-tabbar-item text="我的" icon="account"></uv-tabbar-item>
</uv-tabbar>
</template>
<script>
<script >
export default {
data() {
return {
title: 'Hello UNI'
title: 'Hello UNI',
value: 0,
list: [{
name: '关注',
}, {
name: '推荐',
}, {
name: '电影'
}, {
name: '科技'
}, {
name: '音乐'
}, {
name: '美食'
}, {
name: '文化'
}, {
name: '财经'
}, {
name: '手工'
}]
}
},
onLoad() {
console.log(uni.$uv.os())
},
methods: {
click(item) {
console.log('item', item);
},
open() {
this.$refs.calendar.open();
},
confirm(e) {
console.log('日历选择:',e)
}
}
}
</script>
@ -51,4 +97,8 @@
font-size: 36rpx;
color: $uni-color-primary;
}
.icon {
width: 36rpx;
height: 36rpx;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff