Skip to content

Commit 52f6e5d

Browse files
committed
fix css scoped and modules
1 parent e99bb4e commit 52f6e5d

File tree

9 files changed

+36
-12
lines changed

9 files changed

+36
-12
lines changed

example/src/components/pages/app/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ import template from './app.vue'
77
mixins: [template]
88
})
99
export default class App extends Vue {
10+
1011
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
@import "base/base";
22

3+
.h3 {
4+
color: goldenrod;
5+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
22
<div>
33
<h1>Hello, {{ name }}</h1>
4+
<slot></slot>
5+
<h3 class="h3">fff</h3>
46
</div>
57
</template>
68
<style src="./hello.scss" lang="scss" scoped></style>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
11
@import "base/base";
2+
3+
.view-home {
4+
color: red;
5+
6+
.hello {
7+
color: green;
8+
9+
/deep/ {
10+
.h3 {
11+
color: #0f8;
12+
}
13+
}
14+
}
15+
16+
.h2 {
17+
color: blue;
18+
}
19+
}

example/src/components/views/home/home.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<template>
2-
<div>
3-
<hello name="Vue-Typescript"></hello>
2+
<div class="view-home">
3+
<hello name="Vue-Typescript" class="hello">
4+
<h2 class="h2">This is H2</h2>
5+
</hello>
46
<router-link to="product">Product</router-link>
57
</div>
68
</template>

example/src/components/views/product/list/list.scss

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
*/
77
@import "base/base";
88

9-
.box {
10-
width: 100px;
11-
height: 100px;
12-
}
13-
149
.list {
15-
color: green;
10+
color: red;
1611
}

example/src/components/views/product/list/list.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
</div>
1111
</template>
1212
<style src="./list.scss" lang="scss" module></style>
13+
<!--<style lang="scss" module>
14+
.list {
15+
color: green;
16+
}
17+
</style>-->

example/tools/tpl/generate.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
22
* Generate component files
3-
* @date 2017-03-07 17:21:25
43
* @author Allenice
5-
* @link http://www.allenice233.com
4+
* @date 2017-03-07 17:21:25
65
*/
76

87
'use strict'

example/tools/util/confirm.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
22
* confirm
3-
* @date 2017-03-07 17:01:16
43
* @author Allenice
5-
* @link http://www.allenice233.com
4+
* @date 2017-03-07 17:01:16
65
*/
76

87
'use strict'

0 commit comments

Comments
 (0)