chore: 优化 example 打包

This commit is contained in:
就眠儀式
2022-04-02 06:34:14 +08:00
parent 4dd7f5ed95
commit 90bb7f7fc5
15 changed files with 127 additions and 29 deletions

View File

@@ -255,14 +255,7 @@
</template>
<script lang="ts" setup>
import {
ref,
watch,
computed,
defineProps,
defineEmits,
onMounted,
} from "vue";
import { ref, watch, computed, defineProps, defineEmits, onMounted } from "vue";
import moment from "moment";
import LayIcon from "../icon/index";
@@ -300,7 +293,11 @@ const MONTH_NAME = [
"12月",
];
const hms = ref({ hh: moment(props.modelValue).hour(), mm: moment(props.modelValue).minute(), ss: moment(props.modelValue).second() });
const hms = ref({
hh: moment(props.modelValue).hour(),
mm: moment(props.modelValue).minute(),
ss: moment(props.modelValue).second(),
});
const els = [
{ count: 24, type: "hh" },
{ count: 60, type: "mm" },
@@ -324,10 +321,10 @@ watch(
);
onMounted(() => {
hms.value.hh = moment(props.modelValue).hour();
hms.value.mm = moment(props.modelValue).minute();
hms.value.ss = moment(props.modelValue).second();
})
hms.value.hh = moment(props.modelValue).hour();
hms.value.mm = moment(props.modelValue).minute();
hms.value.ss = moment(props.modelValue).second();
});
// 计算结果日期
const dateValue = computed<string>(() => {

View File

@@ -20,3 +20,7 @@
.layui-empty-description {
margin: 0;
}
.layui-empty-extra {
margin-top: 30px;
}

View File

@@ -27,5 +27,8 @@ const props = withDefaults(defineProps<LayEmptyProps>(), {
<div class="layui-empty-description">
{{ description }}
</div>
<div class="layui-empty-extra">
<slot name="extra"></slot>
</div>
</div>
</template>

View File

@@ -35,8 +35,8 @@ const props = withDefaults(defineProps<LayDropdownProps>(), {
<div class="layui-exception-details-content">
<div class="layui-exception-details-title">{{ title }}</div>
<div class="layui-exception-details-describe">{{ describe }}</div>
<div class="layui-exception-details-operate">
<slot name="action"></slot>
<div class="layui-exception-details-extra">
<slot name="extra"></slot>
</div>
</div>
</div>

View File

@@ -26,10 +26,10 @@
margin-top: 20px;
width: 80%;
border-radius: 10px;
background-color: whitesmoke;
background-color: white;
margin-left: 10%;
}
.result .action {
.result .extra {
padding-top: 10px;
border-top: 1px whitesmoke solid;
margin-top: 25px;

View File

@@ -71,8 +71,8 @@ const props = withDefaults(defineProps<LayResultProps>(), {
<div class="content">
<slot name="content"></slot>
</div>
<div class="action">
<slot name="action"></slot>
<div class="extra">
<slot name="extra"></slot>
</div>
</div>
</template>