unika-components 1.0.179 → 1.0.180

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.
@@ -1,16 +1,4 @@
1
1
 
2
- h2.uni-text-component, p.uni-text-component {
3
- margin-bottom: 0;
4
- }
5
- button.uni-text-component {
6
- padding: 5px 10px;
7
- cursor: pointer;
8
- }
9
- .uni-text-component {
10
- box-sizing: border-box;
11
- white-space: pre-wrap;
12
- }
13
-
14
2
  .uni-image-component {
15
3
  max-width: 100%;
16
4
  }
@@ -35,6 +23,18 @@ button.uni-text-component {
35
23
  .play-pause-button:hover {
36
24
  background: rgba(0, 0, 0, 0.8);
37
25
  }
26
+
27
+ h2.uni-text-component, p.uni-text-component {
28
+ margin-bottom: 0;
29
+ }
30
+ button.uni-text-component {
31
+ padding: 5px 10px;
32
+ cursor: pointer;
33
+ }
34
+ .uni-text-component {
35
+ box-sizing: border-box;
36
+ white-space: pre-wrap;
37
+ }
38
38
 
39
39
 
40
40
  .uni-calendar-component {
@@ -121,6 +121,33 @@ body, html {
121
121
  }
122
122
  }
123
123
 
124
+ .like-button {
125
+ display: flex;
126
+ flex-direction: column;
127
+ align-items: center;
128
+ cursor: pointer;
129
+ }
130
+
131
+ .icon-heart {
132
+ font-size: 24px;
133
+ color: #e74c3c;
134
+ }
135
+
136
+ .liked {
137
+ color: #f00; /* 更改颜色以示已赞 */
138
+ }
139
+
140
+ .like-count {
141
+ margin-top: 4px;
142
+ font-size: 16px;
143
+ color: #333;
144
+ }
145
+
146
+ .effect {
147
+ width: 100%;
148
+ height: 100%;
149
+ }
150
+
124
151
  .ant-input-number {
125
152
  box-sizing: border-box;
126
153
  margin: 0;
@@ -156,11 +183,6 @@ body, html {
156
183
  vertical-align: top;
157
184
  }
158
185
 
159
- .effect {
160
- width: 100%;
161
- height: 100%;
162
- }
163
-
164
186
  .swiper-warp {
165
187
  width: 100%;
166
188
  height: 100%;
@@ -175,28 +197,6 @@ body, html {
175
197
  max-height: 100%;
176
198
  }
177
199
 
178
- .like-button {
179
- display: flex;
180
- flex-direction: column;
181
- align-items: center;
182
- cursor: pointer;
183
- }
184
-
185
- .icon-heart {
186
- font-size: 24px;
187
- color: #e74c3c;
188
- }
189
-
190
- .liked {
191
- color: #f00; /* 更改颜色以示已赞 */
192
- }
193
-
194
- .like-count {
195
- margin-top: 4px;
196
- font-size: 16px;
197
- color: #333;
198
- }
199
-
200
200
  .uni-build-up-component {
201
201
  }
202
202
  /**
@@ -94343,29 +94343,12 @@ var script = defineComponent({
94343
94343
  return '';
94344
94344
  }
94345
94345
  };
94346
- // Function to update the color of the SVG
94347
- const updateSvgColor = (svg, color, width, height) => {
94348
- const parser = new DOMParser();
94349
- const svgDoc = parser.parseFromString(svg, 'image/svg+xml');
94350
- const svgElement = svgDoc.getElementsByTagName('svg')[0];
94351
- const paths = svgDoc.getElementsByTagName('path');
94352
- // Update the fill color for all paths
94353
- for (let i = 0; i < paths.length; i++) {
94354
- paths[i].setAttribute('fill', color);
94355
- }
94356
- // Set width and height for the SVG element
94357
- if (svgElement) {
94358
- svgElement.setAttribute('width', width);
94359
- svgElement.setAttribute('height', height);
94360
- }
94361
- return new XMLSerializer().serializeToString(svgDoc);
94362
- };
94363
94346
  // Function to load and color the SVG
94364
94347
  const loadSvg = async (svgSrc) => {
94365
- const svg = await fetchSvg(svgSrc);
94366
- if (svg) {
94367
- svgContent.value = updateSvgColor(svg, props.color, props.width, props.height);
94368
- }
94348
+ await fetchSvg(svgSrc);
94349
+ // if (svg) {
94350
+ // svgContent.value = updateSvgColor(svg, props.color, props.width, props.height)
94351
+ // }
94369
94352
  };
94370
94353
  // watch(() => props.svgSrc, loadSvg, { immediate: true })
94371
94354
  // watch(() => props.color, loadSvg)
@@ -94349,29 +94349,12 @@ summary tabindex target title type usemap value width wmode wrap`;
94349
94349
  return '';
94350
94350
  }
94351
94351
  };
94352
- // Function to update the color of the SVG
94353
- const updateSvgColor = (svg, color, width, height) => {
94354
- const parser = new DOMParser();
94355
- const svgDoc = parser.parseFromString(svg, 'image/svg+xml');
94356
- const svgElement = svgDoc.getElementsByTagName('svg')[0];
94357
- const paths = svgDoc.getElementsByTagName('path');
94358
- // Update the fill color for all paths
94359
- for (let i = 0; i < paths.length; i++) {
94360
- paths[i].setAttribute('fill', color);
94361
- }
94362
- // Set width and height for the SVG element
94363
- if (svgElement) {
94364
- svgElement.setAttribute('width', width);
94365
- svgElement.setAttribute('height', height);
94366
- }
94367
- return new XMLSerializer().serializeToString(svgDoc);
94368
- };
94369
94352
  // Function to load and color the SVG
94370
94353
  const loadSvg = async (svgSrc) => {
94371
- const svg = await fetchSvg(svgSrc);
94372
- if (svg) {
94373
- svgContent.value = updateSvgColor(svg, props.color, props.width, props.height);
94374
- }
94354
+ await fetchSvg(svgSrc);
94355
+ // if (svg) {
94356
+ // svgContent.value = updateSvgColor(svg, props.color, props.width, props.height)
94357
+ // }
94375
94358
  };
94376
94359
  // watch(() => props.svgSrc, loadSvg, { immediate: true })
94377
94360
  // watch(() => props.color, loadSvg)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unika-components",
3
- "version": "1.0.179",
3
+ "version": "1.0.180",
4
4
  "private": false,
5
5
  "main": "dist/unika-components.umd.js",
6
6
  "module": "dist/unika-components.esm.js",