jeawin-astro 4.0.13 → 4.0.15
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.
package/package.json
CHANGED
|
@@ -260,7 +260,7 @@ if(num > 1){
|
|
|
260
260
|
) : (
|
|
261
261
|
<div class="content-wrapper border border-white p-1 h-full cursor-pointer overflow-hidden flex items-center justify-center relative">
|
|
262
262
|
<div class="relative magnifier w-full h-full">
|
|
263
|
-
<JeawinImage img_html={img_change_attrs(nodepics[0], {style:'width:100%;height:100%;'}, {})} add_classes="w-full h-full" />
|
|
263
|
+
<JeawinImage img_html={img_change_attrs(nodepics[0], {style:'width:100%;height:100%;'}, {})} add_classes="w-full h-full" loading="eager" />
|
|
264
264
|
</div>
|
|
265
265
|
|
|
266
266
|
</div>
|
package/src/scripts/util.js
CHANGED
|
@@ -98,11 +98,15 @@ export function render_date(locale = 'en', t, f = 'MMM DD, YYYY') {
|
|
|
98
98
|
* 安全输出数据
|
|
99
99
|
*/
|
|
100
100
|
export function render_value(obj, prop, def = '') {
|
|
101
|
-
const propValue = _.get(obj, prop
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
const propValue = _.get(obj, prop);
|
|
102
|
+
let returnValue = propValue;
|
|
103
|
+
if (returnValue === null || returnValue === undefined || returnValue === '') {
|
|
104
|
+
returnValue = def;
|
|
104
105
|
}
|
|
105
|
-
|
|
106
|
+
if (_.isString(returnValue)) {
|
|
107
|
+
return _.replace(returnValue, '{{YEAR}}', dayjs().format('YYYY'));
|
|
108
|
+
}
|
|
109
|
+
return returnValue;
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
/**
|