Skip to content

Commit 4e602b0

Browse files
committed
feat(src): implement
1 parent 16ac776 commit 4e602b0

File tree

9 files changed

+714
-128
lines changed

9 files changed

+714
-128
lines changed

Diff for: Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
lint:
2+
npm run lint
3+
local:
4+
npm run serve
5+
build:
6+
npm run build
7+
report:
8+
npm run report

Diff for: package-lock.json

+43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+10-2
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
7+
"build": "vue-cli-service build --target wc --name vue-simple-drawer src/components/Drawer/index.vue",
88
"lint": "vue-cli-service lint",
9-
"test:unit": "vue-cli-service test:unit"
9+
"test:unit": "vue-cli-service test:unit",
10+
"report": "vue-cli-service build --report",
11+
"version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
1012
},
1113
"dependencies": {
1214
"core-js": "^2.6.5",
1315
"vue": "^2.6.10"
1416
},
1517
"devDependencies": {
1618
"@vue/cli-plugin-babel": "^3.6.0",
19+
"cz-conventional-changelog": "^2.1.0",
1720
"@vue/cli-plugin-eslint": "^3.6.0",
1821
"@vue/cli-plugin-unit-jest": "^3.6.0",
1922
"@vue/cli-service": "^3.6.0",
@@ -27,5 +30,10 @@
2730
"sass": "^1.18.0",
2831
"sass-loader": "^7.1.0",
2932
"vue-template-compiler": "^2.5.21"
33+
},
34+
"config": {
35+
"commitizen": {
36+
"path": "./node_modules/cz-conventional-changelog"
37+
}
3038
}
3139
}

Diff for: src/App.vue

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
11
<template>
22
<div id="app">
3-
<img alt="Vue logo" src="./assets/logo.png" />
4-
<HelloWorld msg="Welcome to Your Vue.js App" />
3+
<button @click="close">toggle</button>
4+
<Drawer @close="close" align="left" :closeable="true">
5+
<div v-if="open">content here</div>
6+
</Drawer>
57
</div>
68
</template>
79

810
<script>
9-
import HelloWorld from "./components/HelloWorld.vue";
11+
import Drawer from "@/components/Drawer";
1012
1113
export default {
1214
name: "app",
15+
data() {
16+
return {
17+
open: true
18+
};
19+
},
1320
components: {
14-
HelloWorld
21+
Drawer
22+
},
23+
methods: {
24+
close() {
25+
this.open = !this.open;
26+
}
1527
}
1628
};
1729
</script>

Diff for: src/assets/logo.png

-6.69 KB
Binary file not shown.

Diff for: src/components/Drawer/_variable.scss

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$softorange: #f4a259;
2+
$tomatored: #f25c66;
3+
$mediumblu: #1e272d;
4+
$close-width: 28px;

0 commit comments

Comments
 (0)