Skip to content

Commit fe49c20

Browse files
committed
chore: example update
1 parent 627c826 commit fe49c20

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

Diff for: example/App.vue

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
<template>
2-
<img class="logo" src="./logo.png">
3-
<Button>slotttt</Button>
4-
<Button>slot content</Button>
5-
<Button>slot content</Button>
2+
<img :class="$style.logo" src="./logo.png">
3+
<div>
4+
{{ count }}
5+
<span>{{ count }}</span>
6+
<Button>slotttt</Button>
7+
</div>
68
</template>
79

810
<script>
11+
import { useCSSModule } from 'vue'
912
import Button from './Button.vue'
1013
1114
export default {
15+
setup() {
16+
const styles = useCSSModule()
17+
console.log('hmm')
18+
},
19+
data() {
20+
return { count: 0 }
21+
},
1222
components: {
1323
Button
1424
}
1525
}
1626
</script>
1727

18-
<style>
28+
<style module>
1929
.logo {
2030
width: 100px;
2131
border: 1px solid red;

Diff for: example/Button.vue

+6
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ export default {
1616
}
1717
}
1818
</script>
19+
20+
<style scoped>
21+
::v-slotted(*) {
22+
color: red;
23+
}
24+
</style>

Diff for: example/webpack.config.js

-8
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ module.exports = {
1515
stats: "minimal",
1616
contentBase: __dirname
1717
},
18-
optimization: {
19-
minimize: false
20-
},
2118
module: {
2219
rules: [
2320
{
@@ -49,11 +46,6 @@ module.exports = {
4946
}
5047
]
5148
},
52-
resolve: {
53-
alias: {
54-
'vue': '@vue/runtime-dom'
55-
}
56-
},
5749
resolveLoader: {
5850
alias: {
5951
'vue-loader': require.resolve('../')

0 commit comments

Comments
 (0)