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
| <template>
| <g ref="g" :transform="'translate(' + offset.join(',') + ')'">
| <rect
| :width="width"
| :height="height"
| :stroke="color"
| :fill="fillColor"
| :stroke-width='strokeWidth'
| :stroke-dasharray='strokeDasharray'
| :stroke-dashoffset='strokeDashoffset'
| :rx="rx"
| :ry="ry"
| />
| </g>
| </template>
|
| <script setup name="SvgDotRect">
| import { ref } from "vue";
| const props = defineProps({
| offset: {
| type: Array,
| default() {
| return [0, 0];
| },
| },
| width: {
| type: [Number, String],
| default: 4,
| },
| height: {
| type: [Number, String],
| default: 4,
| },
| color: {
| type: String,
| default: "#0ff",
| },
| fillColor: {
| type: String,
| // default: 'transparent',
| default: '#00000066',
| },
| rx: {
| type: [Number, String],
| default: 0,
| },
| ry: {
| type: [Number, String],
| default: 0,
| },
| strokeWidth: {
| type: [Number, String],
| default: 0,
| },
| strokeDasharray: {
| type: String,
| default: '8 4',
| },
| strokeDashoffset: {
| type: [Number, String],
| default: 0,
| },
| });
| </script>
|
| <style scoped></style>
|
|