fuchengshen
2022-07-09 3a25c05b5ab837714f30469cdcb1e2a77d8d7f6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<template>
  <a-slider class="mars-slider" v-bind="attrs">
    <template v-for="(comp, name) in slots" :key="name" v-slot:[name]>
      <component :is="comp" />
    </template>
  </a-slider>
</template>
<script lang="ts">
import { useAttrs, useSlots, defineComponent } from "vue"
export default defineComponent({
  name: "mars-slider",
  inheritAttrs: false,
  setup() {
    const attrs = useAttrs()
    const slots = useSlots()
    return {
      attrs,
      slots
    }
  }
})
</script>
<style lang="less" scoped>
/*滑动条 输入面板内时修改高度等*/
.mars-slider {
  margin: 0px 6px 6px 6px;
  :deep(.ant-slider-mark-text) {
    color: @mars-base-color !important;
    top: 5px;
  }
  /*滑动条 未选择、已选择部分 高度*/
  :deep(.ant-slider-rail) {
    height: 10px;
    border-radius: 5px;
    background-color: #284660 !important;
  }
  :deep(.ant-slider-track) {
    height: 10px;
    border-radius: 5px;
    background-color: @mars-primary-color !important;
  }
  /*滑动条 刻度点*/
  :deep(.ant-slider-dot) {
    background-color: #16212c7d;
    top: 12px;
    height: 6px;
    width: 1px;
    border-radius: 0 0;
    border: none;
    background-color: #fff;
  }
  :deep(.ant-slider-dot:first-child) {
    margin-left: 2px;
  }
 
  /*滑动条 拖拽点*/
  :deep(.ant-slider-handle) {
    position: absolute;
    width: 16px;
    height: 16px;
    margin-top: -3px;
    border: 4px solid @mars-primary-color;
  }
  :deep(.ant-slider-dot-active, .ant-slider-handle) {
    border-color: @mars-primary-color !important;
  }
}
</style>