diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..0765f6d --- /dev/null +++ b/.browserslistrc @@ -0,0 +1 @@ +ie >= 11 \ No newline at end of file diff --git a/src/components/datav/chart-bar.vue b/src/components/datav/chart-bar.vue index 40ce227..98da7fe 100644 --- a/src/components/datav/chart-bar.vue +++ b/src/components/datav/chart-bar.vue @@ -56,6 +56,10 @@ const props = defineProps({ type: String, default: "", }, + color: { + type: Object, + default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)" + } }); const max = ref(100); @@ -77,6 +81,10 @@ onMounted(() => { }) function getColor(val) { + if (props.color instanceof String) { + return props.color; + } + if (val > 0.8) { return "linear-gradient(270deg, #63e700 0%, #19674c 100%)"; } diff --git a/src/components/datav/tabs.vue b/src/components/datav/tabs.vue index 81de4b6..adccac1 100644 --- a/src/components/datav/tabs.vue +++ b/src/components/datav/tabs.vue @@ -43,6 +43,13 @@ const props = defineProps({ }); const emit = defineEmits(["update:modelValue"]); const activeTab = ref(props.modelValue); +watch(() => props.modelValue, () => { + activeTab.value = props.modelValue +}) +watch(activeTab, (val) => { + emit("update:modelValue", val); +}) + provide("activeTab", activeTab); const slots = useSlots().default(); diff --git a/src/views/work/Todo.vue b/src/views/work/Todo.vue index 5faeadd..f6507d6 100644 --- a/src/views/work/Todo.vue +++ b/src/views/work/Todo.vue @@ -67,17 +67,7 @@ - - - +