Skip to content

Commit d710afd

Browse files
committed
fix(timeselect): 第一次渲染样式问题以及样式不全问题修复(#1257 #1253)
1 parent 409b951 commit d710afd

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

src/packages/__VUE/timeselect/doc.en-US.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
3737
</nut-timeselect>
3838
</template>
3939
<script lang="ts">
40-
import { reactive, toRefs, getCurrentInstance } from 'vue';
40+
import { reactive, toRefs, getCurrentInstance, onMounted } from 'vue';
4141
export default {
4242
props: {},
4343
setup() {
@@ -84,6 +84,13 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
8484
proxy.$toast.text(`Your choose:${JSON.stringify(obj)}`);
8585
};
8686
87+
onMounted(() => {
88+
state.currentTime1.push({
89+
key: state.currentKey1,
90+
list: []
91+
});
92+
});
93+
8794
return {
8895
...toRefs(state),
8996
handleChange1,
@@ -118,7 +125,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
118125
</nut-timeselect>
119126
</template>
120127
<script lang="ts">
121-
import { reactive, toRefs, getCurrentInstance } from 'vue';
128+
import { reactive, toRefs, getCurrentInstance, onMounted } from 'vue';
122129
export default {
123130
props: {},
124131
setup() {
@@ -168,6 +175,13 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
168175
proxy.$toast.text(`Your choose:${JSON.stringify(obj)}`);
169176
};
170177
178+
onMounted(() => {
179+
state.currentTime2.push({
180+
key: state.currentKey2,
181+
list: []
182+
});
183+
});
184+
171185
return {
172186
...toRefs(state),
173187
handleChange2,

src/packages/__VUE/timeselect/doc.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
3737
</nut-timeselect>
3838
</template>
3939
<script lang="ts">
40-
import { reactive, toRefs, getCurrentInstance } from 'vue';
40+
import { reactive, toRefs, getCurrentInstance, onMounted } from 'vue';
4141
export default {
4242
props: {},
4343
setup() {
@@ -84,6 +84,13 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
8484
proxy.$toast.text(`您选择了:${JSON.stringify(obj)}`);
8585
};
8686
87+
onMounted(() => {
88+
state.currentTime1.push({
89+
key: state.currentKey1,
90+
list: []
91+
});
92+
});
93+
8794
return {
8895
...toRefs(state),
8996
handleChange1,
@@ -118,7 +125,7 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
118125
</nut-timeselect>
119126
</template>
120127
<script lang="ts">
121-
import { reactive, toRefs, getCurrentInstance } from 'vue';
128+
import { reactive, toRefs, getCurrentInstance, onMounted } from 'vue';
122129
export default {
123130
props: {},
124131
setup() {
@@ -168,6 +175,13 @@ app.use(TimeSelect).use(TimePannel).use(TimeDetail).use(Popup);
168175
proxy.$toast.text(`您选择了:${JSON.stringify(obj)}`);
169176
};
170177
178+
onMounted(() => {
179+
state.currentTime2.push({
180+
key: state.currentKey2,
181+
list: []
182+
});
183+
});
184+
171185
return {
172186
...toRefs(state),
173187
handleChange2,

src/packages/__VUE/timeselect/index.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
}
2121
&__content {
2222
width: 100%;
23+
height: calc(100% - $timeselect-title-height - 10px);
2324
display: flex;
2425
&__pannel {
2526
width: 140px;
26-
height: 308px;
27+
height: 100%;
2728
overflow: auto;
2829
background-color: $timeselect-pannel-bg-color;
2930
}
3031
&__detail {
3132
width: calc(100% - 140px);
32-
height: 308px;
33+
height: 100%;
3334
overflow-y: auto;
3435
overflow-x: hidden;
3536
}

0 commit comments

Comments
 (0)