Skip to content

Commit

Permalink
fix(打包): 语法报错
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed May 8, 2024
1 parent c966e75 commit 5b252a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/colorSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const setGradientBar = (val) => {
// Fabric渐变bar背景设置
const fabricGradientToBar = (val) => {
// 百分比排序
if (!val?.colorStops) return // 防止从模板加载后出现colorStops报错
if (!val?.colorStops) return; // 防止从模板加载后出现colorStops报错
val.colorStops.sort((a, b) => a.offset - b.offset);
const str = val.colorStops.map((item) => `${item.color} ${item.offset * 100}%`);
bgStr.value = `background: linear-gradient(124deg, ${str});`;
Expand Down

0 comments on commit 5b252a0

Please sign in to comment.