File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,11 @@ module.exports = function(sSource) {
125
125
sHtmlString = sSource . match ( / < t e m p l a t e > ( [ \s \S ] * ) < \/ t e m p l a t e > / g) ;
126
126
127
127
// html 文本需要特殊处理
128
- sClassString = sPugString ? sPugString [ 0 ] : '.' + ( sHtmlString [ 0 ] . match ( / c l a s s = ( " | ' ) ( [ a - z A - Z 0 - 9 \- _ ] * ) ( " | ' ) / ig) || [ ] ) . map ( item => item . replace ( / c l a s s = ( ' | " ) | ( " | ' ) / g, '' ) . split ( ' ' ) . join ( '.' ) ) . join ( '.' ) ;
128
+ if ( sPugString ) {
129
+ sClassString = sPugString [ 0 ]
130
+ } else if ( sHtmlString ) {
131
+ sClassString = '.' + ( sHtmlString [ 0 ] . match ( / c l a s s = ( " | ' ) ( [ a - z A - Z 0 - 9 \- _ ] * ) ( " | ' ) / ig) || [ ] ) . map ( item => item . replace ( / c l a s s = ( ' | " ) | ( " | ' ) / g, '' ) . split ( ' ' ) . join ( '.' ) ) . join ( '.' ) ;
132
+ }
129
133
} catch ( e ) {
130
134
console . warn ( e ) ;
131
135
return sSource ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-atomcss-loader" ,
3
- "version" : " 1.1.6 " ,
3
+ "version" : " 1.1.7 " ,
4
4
"description" : " 基于 vue 的按需生成原子类样式的 loader" ,
5
5
"homepage" : " https://github.com/wujr5/vue-atomcss-loader" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments