diff --git a/package/component/src/component/datePicker/index.vue b/package/component/src/component/datePicker/index.vue index 0c94a0a2..7fe9d3f1 100644 --- a/package/component/src/component/datePicker/index.vue +++ b/package/component/src/component/datePicker/index.vue @@ -107,14 +107,7 @@ import { LayIcon } from "@layui/icons-vue"; import LayInput from "../input/index.vue"; import LayDropdown from "../dropdown/index.vue"; import { getMonth, getYear, getDay } from "./day"; -import { - ref, - watch, - defineProps, - defineEmits, - reactive, - provide, -} from "vue"; +import { ref, watch, defineProps, defineEmits, reactive, provide } from "vue"; import DatePanel from "./components/DatePanel.vue"; import TimePanel from "./components/TimePanel.vue"; import YearPanel from "./components/YearPanel.vue"; diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index 4574ff5c..efaabb5b 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -321,27 +321,27 @@ const renderFixedClassName = (column: any, columnIndex: number) => { const hasTotalRow = computed(() => { let b = false; - props.columns.forEach(item => { - if(item.totalRow) { + props.columns.forEach((item) => { + if (item.totalRow) { b = true; } - }) + }); return b; -}) +}); const renderTotalRowCell = (column: any) => { - if(column.totalRow) { - if(column.totalRow != true) { + if (column.totalRow) { + if (column.totalRow != true) { return column.totalRow; } else { let total = 0; - tableDataSource.value.forEach(item => { + tableDataSource.value.forEach((item) => { total = total + item[column.key]; - }) + }); return total; } } -} +};