Skip to content

Commit 9c5a1da

Browse files
authoredOct 30, 2022
fix(theme:setting-drawer): add lessJs property (#1544)
1 parent 0889f39 commit 9c5a1da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎packages/theme/setting-drawer/setting-drawer.component.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class SettingDrawerComponent implements OnInit, OnDestroy {
3636
@Input() @InputBoolean() autoApplyColor = true;
3737
@Input() compilingText = 'Compiling...';
3838
@Input() devTips = `When the color can't be switched, you need to run it once: npm run color-less`;
39+
@Input() lessJs = 'https://cdn.jsdelivr.net/npm/less';
3940

4041
private loadedLess = false;
4142
private destroy$ = new Subject<void>();
@@ -99,7 +100,7 @@ export class SettingDrawerComponent implements OnInit, OnDestroy {
99100
`;
100101
this.doc.body.appendChild(lessConfigNode);
101102
})
102-
.then(() => this.lazy.loadScript('https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js'))
103+
.then(() => this.lazy.loadScript(this.lessJs))
103104
.then(() => {
104105
this.loadedLess = true;
105106
});

0 commit comments

Comments
 (0)
Please sign in to comment.