cosey 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,92 +26,120 @@ var stdin_default = getSimpleStyleHook("CoRibbon", (token) => {
|
|
|
26
26
|
border: "calc(var(--gap) / 2) solid var(--bg)",
|
|
27
27
|
filter: "grayscale(70%) brightness(0.7)"
|
|
28
28
|
},
|
|
29
|
-
[`&.is-top-left`]: {
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
[`&.is-top-left, [dir="rtl"] &.is-top-right`]: {
|
|
30
|
+
top: "calc(var(--gap) * -1)",
|
|
31
|
+
left: "calc(var(--gap) * -1)",
|
|
32
|
+
right: "auto",
|
|
33
|
+
bottom: "auto",
|
|
32
34
|
[`${componentCls}-silk`]: {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
top: 0,
|
|
36
|
+
right: 0,
|
|
37
|
+
left: "auto",
|
|
38
|
+
bottom: "auto",
|
|
35
39
|
transformOrigin: "right bottom",
|
|
36
40
|
transform: "translateY(-100%) rotate(-45deg)"
|
|
37
41
|
},
|
|
38
42
|
"&::before,&::after": {
|
|
39
|
-
|
|
40
|
-
borderLeftColor: "transparent"
|
|
43
|
+
borderColor: "transparent var(--bg) var(--bg) transparent"
|
|
41
44
|
},
|
|
42
45
|
"&::before": {
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
top: 0,
|
|
47
|
+
right: 0,
|
|
48
|
+
left: "auto",
|
|
49
|
+
bottom: "auto"
|
|
45
50
|
},
|
|
46
51
|
"&::after": {
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
bottom: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
top: "auto",
|
|
55
|
+
right: "auto"
|
|
49
56
|
}
|
|
50
57
|
},
|
|
51
|
-
[`&.is-top-right`]: {
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
[`&.is-top-right, [dir="rtl"] &.is-top-left`]: {
|
|
59
|
+
top: "calc(var(--gap) * -1)",
|
|
60
|
+
right: "calc(var(--gap) * -1)",
|
|
61
|
+
left: "auto",
|
|
62
|
+
bottom: "auto",
|
|
54
63
|
[`${componentCls}-silk`]: {
|
|
55
|
-
|
|
56
|
-
|
|
64
|
+
top: 0,
|
|
65
|
+
left: 0,
|
|
66
|
+
bottom: "auto",
|
|
67
|
+
right: "auto",
|
|
57
68
|
transformOrigin: "left bottom",
|
|
58
69
|
transform: "translateY(-100%) rotate(45deg)"
|
|
59
70
|
},
|
|
60
71
|
"&::before,&::after": {
|
|
61
|
-
|
|
62
|
-
borderRightColor: "transparent"
|
|
72
|
+
borderColor: "transparent transparent var(--bg) var(--bg)"
|
|
63
73
|
},
|
|
64
74
|
"&::before": {
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
top: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
bottom: "auto",
|
|
78
|
+
right: "auto"
|
|
67
79
|
},
|
|
68
80
|
"&::after": {
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
bottom: 0,
|
|
82
|
+
right: 0,
|
|
83
|
+
top: "auto",
|
|
84
|
+
left: "auto"
|
|
71
85
|
}
|
|
72
86
|
},
|
|
73
|
-
[`&.is-bottom-left`]: {
|
|
74
|
-
|
|
75
|
-
|
|
87
|
+
[`&.is-bottom-left, [dir="rtl"] &.is-bottom-right`]: {
|
|
88
|
+
bottom: "calc(var(--gap) * -1)",
|
|
89
|
+
left: "calc(var(--gap) * -1)",
|
|
90
|
+
top: "auto",
|
|
91
|
+
right: "auto",
|
|
76
92
|
[`${componentCls}-silk`]: {
|
|
77
|
-
|
|
78
|
-
|
|
93
|
+
bottom: 0,
|
|
94
|
+
right: 0,
|
|
95
|
+
top: "auto",
|
|
96
|
+
left: "auto",
|
|
79
97
|
transformOrigin: "top right",
|
|
80
98
|
transform: "translateY(100%) rotate(45deg)"
|
|
81
99
|
},
|
|
82
100
|
"&::before,&::after": {
|
|
83
|
-
|
|
84
|
-
borderLeftColor: "transparent"
|
|
101
|
+
borderColor: "var(--bg) var(--bg) transparent transparent"
|
|
85
102
|
},
|
|
86
103
|
"&::before": {
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
bottom: 0,
|
|
105
|
+
right: 0,
|
|
106
|
+
top: "auto",
|
|
107
|
+
left: "auto"
|
|
89
108
|
},
|
|
90
109
|
"&::after": {
|
|
91
|
-
|
|
92
|
-
|
|
110
|
+
top: 0,
|
|
111
|
+
left: 0,
|
|
112
|
+
right: "auto",
|
|
113
|
+
bottom: "auto"
|
|
93
114
|
}
|
|
94
115
|
},
|
|
95
|
-
[`&.is-bottom-right`]: {
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
[`&.is-bottom-right, [dir="rtl"] &.is-bottom-left`]: {
|
|
117
|
+
bottom: "calc(var(--gap) * -1)",
|
|
118
|
+
right: "calc(var(--gap) * -1)",
|
|
119
|
+
top: "auto",
|
|
120
|
+
left: "auto",
|
|
98
121
|
[`${componentCls}-silk`]: {
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
bottom: 0,
|
|
123
|
+
left: 0,
|
|
124
|
+
top: "auto",
|
|
125
|
+
right: "auto",
|
|
101
126
|
transformOrigin: "left top",
|
|
102
127
|
transform: "translateY(100%) rotate(-45deg)"
|
|
103
128
|
},
|
|
104
129
|
"&::before,&::after": {
|
|
105
|
-
|
|
106
|
-
borderRightColor: "transparent"
|
|
130
|
+
borderColor: "var(--bg) transparent transparent var(--bg)"
|
|
107
131
|
},
|
|
108
132
|
"&::before": {
|
|
109
|
-
|
|
110
|
-
|
|
133
|
+
bottom: 0,
|
|
134
|
+
left: 0,
|
|
135
|
+
top: "auto",
|
|
136
|
+
right: "auto"
|
|
111
137
|
},
|
|
112
138
|
"&::after": {
|
|
113
|
-
|
|
114
|
-
|
|
139
|
+
top: 0,
|
|
140
|
+
right: 0,
|
|
141
|
+
bottom: "auto",
|
|
142
|
+
left: "auto"
|
|
115
143
|
}
|
|
116
144
|
}
|
|
117
145
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, createVNode, mergeProps
|
|
1
|
+
import { defineComponent, ref, createVNode, mergeProps } from 'vue';
|
|
2
2
|
import { ElSwitch, ElMessage, ElLink, ElTag } from 'element-plus';
|
|
3
3
|
import { get } from 'lodash-es';
|
|
4
4
|
import { LongText as _LongText } from '../../long-text/index.js';
|
|
@@ -9,9 +9,6 @@ import { formatToDate, formatToDateTime } from '../../../utils/date.js';
|
|
|
9
9
|
import { getVNodeText } from '../../../utils/vue.js';
|
|
10
10
|
import { toArray } from '../../../utils/array.js';
|
|
11
11
|
|
|
12
|
-
function _isSlot(s) {
|
|
13
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
14
|
-
}
|
|
15
12
|
const mapRendererColumnProps = {
|
|
16
13
|
media: {
|
|
17
14
|
minWidth: 104,
|
|
@@ -125,8 +122,8 @@ function renderer({
|
|
|
125
122
|
index,
|
|
126
123
|
column
|
|
127
124
|
})
|
|
128
|
-
}),
|
|
129
|
-
default: () => [cellValue]
|
|
125
|
+
}), {
|
|
126
|
+
default: () => [obj.format ? obj.format(cellValue, row, column, index) : cellValue, cellValue]
|
|
130
127
|
});
|
|
131
128
|
}
|
|
132
129
|
}
|