File tree Expand file tree Collapse file tree 9 files changed +55
-7
lines changed Expand file tree Collapse file tree 9 files changed +55
-7
lines changed Original file line number Diff line number Diff line change
1
+ { "presets" : [" es2015" ] }
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+
3
+ new Vue ( {
4
+ el : '#app' ,
5
+ data ( ) {
6
+ return {
7
+ vueMessage : 'Message from Vue'
8
+ }
9
+ }
10
+ } )
Original file line number Diff line number Diff line change 1
1
import Vue from 'vue'
2
+ import FirstComponent from './FirstComponent.vue'
3
+ import { SweetModal , SweetModalTab } from 'sweet-modal-vue'
2
4
3
5
new Vue ( {
4
6
el : '#app' ,
7
+ components : {
8
+ FirstComponent,
9
+ SweetModal,
10
+ SweetModalTab
11
+ } ,
5
12
data ( ) {
6
13
return {
7
14
vueMessage : 'Message from Vue'
8
15
}
16
+ } ,
17
+ methods : {
18
+ toggleModal ( ) {
19
+ this . $refs . modal . open ( ) ;
20
+ }
9
21
}
10
22
} )
Original file line number Diff line number Diff line change
1
+ import 'bootstrap/dist/css/bootstrap.css'
Original file line number Diff line number Diff line change 3
3
ViewBag .Title = " Home Page" ;
4
4
}
5
5
6
- <div id =" app" >
7
- <h3 >@ViewBag.Message </h3 >
8
- {{ vueMessage }}
6
+ <div id =" app" class =" row" >
7
+ <div class =" text-center" >
8
+ <button class =" btn btn-primary" v-on:click =" toggleModal" >Show modal!</button >
9
+
10
+ <sweet-modal ref =" modal" >
11
+ <h3 >@ViewBag.Message </h3 >
12
+ </sweet-modal >
13
+ </div >
9
14
</div >
10
15
11
16
@section scripts {
Original file line number Diff line number Diff line change 1
- <!DOCTYPE html>
1
+ @using System .Web .Optimization
2
+ <!DOCTYPE html>
2
3
<html >
3
4
<head >
4
5
<meta charset =" utf-8" />
5
6
<meta name =" viewport" content =" width=device-width, initial-scale=1.0" />
6
7
<title >@ViewData ["Title"] - WebApplication</title >
7
8
</head >
8
9
<body >
9
- Hello!
10
10
@RenderBody()
11
11
12
+ @Scripts.Render( "~/Scripts/bundle/layout.js")
12
13
@RenderSection( "scripts", required: false)
13
14
</body >
14
15
</html >
Original file line number Diff line number Diff line change 96
96
<Compile Include =" Properties\AssemblyInfo.cs" />
97
97
</ItemGroup >
98
98
<ItemGroup >
99
+ <Content Include =" .babelrc" />
99
100
<Content Include =" .gitignore" />
100
101
<Content Include =" favicon.ico" />
101
102
<Content Include =" fonts\glyphicons-halflings-regular.eot" />
106
107
<Content Include =" Global.asax" />
107
108
<Content Include =" package.json" />
108
109
<Content Include =" packages.config" />
110
+ <Content Include =" Scripts\app\about\index.js" />
111
+ <Content Include =" Scripts\app\home\FirstComponent.vue" />
109
112
<Content Include =" Scripts\app\home\index.js" />
113
+ <Content Include =" Scripts\app\layout\index.js" />
114
+ <Content Include =" Scripts\bundle\about.js" />
115
+ <Content Include =" Scripts\bundle\home.js" />
110
116
<Content Include =" Views\Home\Index.cshtml" />
111
117
<Content Include =" Views\Shared\Error.cshtml" />
112
118
<Content Include =" Views\Shared\_Layout.cshtml" />
118
124
<ItemGroup >
119
125
<Folder Include =" Content" />
120
126
<Folder Include =" Models" />
121
- <Folder Include =" Scripts\bundle" />
122
127
</ItemGroup >
123
128
<ItemGroup >
124
129
<None Include =" packages.config" />
Original file line number Diff line number Diff line change 7
7
},
8
8
"dependencies" : {
9
9
"bootstrap" : " ^3.3.7" ,
10
+ "sweet-modal-vue" : " ^1.2.0" ,
10
11
"vue" : " ^2.1.6"
11
12
},
12
13
"devDependencies" : {
18
19
"css-loader" : " ^0.23.1" ,
19
20
"file-loader" : " ^0.8.5" ,
20
21
"fs" : " ^0.0.1-security" ,
22
+ "node-sass" : " ^4.5.3" ,
23
+ "sass-loader" : " ^6.0.6" ,
21
24
"style-loader" : " ^0.13.1" ,
22
25
"vue-loader" : " ^9.8.0" ,
23
26
"webpack" : " ^3.5.4" ,
Original file line number Diff line number Diff line change @@ -31,13 +31,23 @@ module.exports = {
31
31
loaders : [
32
32
{
33
33
test : / \. v u e $ / ,
34
- loader : 'vue-loader'
34
+ loader : 'vue-loader' ,
35
+ options : {
36
+ loaders : {
37
+ scss : 'vue-style-loader!css-loader!sass-loader' , // <style lang="scss">
38
+ sass : 'vue-style-loader!css-loader!sass-loader?indentedSyntax' // <style lang="sass">
39
+ }
40
+ }
35
41
} ,
36
42
{
37
43
test : / \. j s $ / ,
38
44
loader : 'babel-loader' ,
39
45
exclude : / n o d e _ m o d u l e s /
40
46
} ,
47
+ {
48
+ test : / \. s c s s $ / ,
49
+ loader : 'style-loader!css-loader!sass-loader'
50
+ } ,
41
51
{
42
52
test : / \. c s s $ / ,
43
53
loader : 'style-loader!css-loader'
You can’t perform that action at this time.
0 commit comments