Skip to content

Commit b3a4037

Browse files
committed
Removed scss support, working on gridWidth prop
1 parent 1fa9f24 commit b3a4037

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

src/Grid.vue

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export default {
3939
type: Array,
4040
default: () => []
4141
},
42+
gridWidth: {
43+
type: Number,
44+
default: -1
45+
},
4246
cellWidth: {
4347
type: Number,
4448
default: 80,
@@ -84,6 +88,14 @@ export default {
8488
}
8589
},
8690
computed: {
91+
gridResponsiveWidth () {
92+
if (this.gridWidth < 0) {
93+
return this.windowWidth
94+
} else {
95+
return Math.min(this.windowWidth, this.gridWidth)
96+
}
97+
},
98+
8799
height () {
88100
return Math.ceil(this.items.length / this.rowCount) *
89101
this.cellHeight
@@ -224,12 +236,7 @@ export default {
224236
}
225237
}
226238
</script>
227-
<style lang="scss">
228-
body {
229-
margin: 0;
230-
padding: 0;
231-
}
232-
239+
<style>
233240
.v-grid {
234241
display: block;
235242
position: relative;

src/GridItem.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export default {
214214
}
215215
</script>
216216

217-
<style lang="scss">
217+
<style>
218218
.v-grid-item-wrapper {
219219
display: block;
220220
position: absolute;
@@ -227,13 +227,9 @@ export default {
227227
transform: translate3d(0px, 0px, 0px);
228228
229229
z-index: 1;
230+
}
230231
231-
&.v-grid-item-animate {
232-
transition: transform 800ms ease;
233-
}
234-
235-
&.v-grid-item-dragging {
236-
// z-index: 9000 !important;
237-
}
232+
.v-grid-item-animate {
233+
transition: transform 800ms ease;
238234
}
239235
</style>

webpack.config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ module.exports = {
1515
rules: [
1616
{
1717
test: /\.vue$/,
18-
loader: 'vue-loader',
19-
options: {
20-
loaders: {
21-
'scss': 'vue-style-loader!css-loader!sass-loader'
22-
}
23-
}
18+
loader: 'vue-loader'
19+
// ,
20+
// options: {
21+
// loaders: {
22+
// 'scss': 'vue-style-loader!css-loader!sass-loader'
23+
// }
24+
// }
2425
},
2526
{
2627
test: /\.js$/,

0 commit comments

Comments
 (0)