Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit985576f

Browse files
committed
init demo
1 parent526f549 commit985576f

File tree

5 files changed

+61
-7
lines changed

5 files changed

+61
-7
lines changed

‎template/build/webpack.base.config.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ module.exports = {
2626
test:/\.css$/,
2727
loader:ExtractTextPlugin.extract('vue-style','css')
2828
},
29-
{
30-
test:/\.less$/,
31-
loader:ExtractTextPlugin.extract('vue-style','css!less?sourceMap')
32-
},
3329
{
3430
test:/\.(png|jpg|gif|jpeg)$/,
3531
loader:'url',

‎template/package.json‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
"babel-preset-es2015":"^6.18.0",
1818
"babel-preset-stage-2":"^6.18.0",
1919
"babel-runtime":"^6.20.0",
20-
"css-loader":"^0.26.1",
21-
"less":"^2.7.2",
22-
"less-loader":"^2.2.3",
2320
"vue-loader":"^10.0.2",
21+
"css-loader":"^0.26.1",
2422
"vue-style-loader":"^1.0.0",
2523
"file-loader":"^0.9.0",
2624
"url-loader":"^0.5.7",

‎template/src/app.vue‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<divid="app">
3+
<h3>{{name}}</h3>
4+
<hello />
5+
</div>
6+
</template>
7+
8+
<style scoped>
9+
h3{
10+
color:red;
11+
}
12+
</style>
13+
14+
<script>
15+
importHellofrom'@components/hello';
16+
17+
exportdefault{
18+
data(){
19+
return {
20+
name:'vue-webpack'
21+
}
22+
},
23+
24+
components:{
25+
Hello
26+
}
27+
}
28+
</script>

‎template/src/components/hello.vue‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<template lang="html">
2+
<pclass="desc">
3+
{{desc}}
4+
</p>
5+
</template>
6+
7+
<script>
8+
exportdefault {
9+
data(){
10+
return {
11+
desc:'A simple template webpack + vuejs setup for projects'
12+
}
13+
},
14+
}
15+
</script>
16+
17+
<style lang="css">
18+
.desc{
19+
color:blue
20+
}
21+
</style>

‎template/src/index.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use sreict';
2+
3+
importVuefrom'vue';
4+
5+
importAppfrom'./app';
6+
7+
constapp=newVue({
8+
...App
9+
});
10+
11+
app.$mount('#app');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp