提交 5bf16fc8 编写于 作者: G guoxiaoxiao8

fix: calender 适配

上级 42824b93
......@@ -2,7 +2,7 @@
position: relative;
display: flex;
flex: 1;
height: 518px;
height: 65vh;
padding-top: 132px;
padding-bottom: 78px;
color: $calendar-base-color;
......
export default {
pages: [
'pages/picker/demo',
'pages/calendar/demo',
'pages/picker/demo',
'pages/input/demo',
'pages/popup/demo',
'pages/inputnumber/demo',
......
......@@ -78,7 +78,7 @@
import { reactive, toRefs } from 'vue';
import { createComponent } from './../../../../../../packages/utils/create';
import Calendar from './index.taro.vue';
import Cell from '../cell/index.taro.vue';
const { createDemo } = createComponent('calendar');
interface TestCalendarState {
......@@ -94,7 +94,8 @@ interface TestCalendarState {
export default createDemo({
props: {},
components: {
'nut-calendar': Calendar
'nut-calendar': Calendar,
'nut-cell': Cell
},
setup() {
const state: TestCalendarState = reactive({
......@@ -111,12 +112,13 @@ export default createDemo({
date3: ''
});
const openSwitch = (param: string) => {
// state[`${param}`] = true;
state.isVisible1 = true;
state[`${param}`] = true;
//state.isVisible = true;
};
const closeSwitch = (param: string) => {
//state[`${param}`] = false;
state[`${param}`] = false;
//state.isVisible = false;
};
const setChooseValue = (param: string) => {
......
<template>
<nut-popup
v-if="poppable"
:visible="visible"
v-model:visible="visible"
position="bottom"
round
:closeable="true"
......@@ -24,6 +24,7 @@
>
</nut-calendar-item>
</nut-popup>
<nut-calendar-item
v-else
:type="type"
......@@ -49,6 +50,10 @@ import Utils from './../../../../../../packages/utils/date';
type InputDate = string | string[];
export default create({
children: [CalendarItem, Popup],
components: {
'nut-calendar-item': CalendarItem,
'nut-popup': Popup
},
props: {
type: {
type: String,
......@@ -64,7 +69,7 @@ export default create({
},
visible: {
type: Boolean,
default: false
default: true
},
title: {
type: String,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册