Skip to content

Commit 4ed0912

Browse files
committed
fix: add back missing .vue files - fix #121
1 parent 467b1c8 commit 4ed0912

File tree

5 files changed

+544
-391
lines changed

5 files changed

+544
-391
lines changed

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,44 @@
1414
"types": "lib",
1515
"files": [
1616
"lib",
17+
"typings.d.ts",
1718
"!*.tsbuildinfo"
1819
],
1920
"scripts": {
2021
"build": "run-p build:*",
2122
"build:docs": "w -e docs -p",
2223
"build:r": "r -p",
23-
"build:ts": "tsc -P src",
24+
"build:ts": "tsc -P src && cpy 'src/*.vue' lib",
2425
"dev": "w -e docs",
2526
"lint": "run-p lint:*",
2627
"lint:es": "cross-env PARSER_NO_WATCH=true eslint . --cache --ext js,vue -f friendly",
2728
"lint:style": "stylelint --cache '{docs,src}/*.{scss,vue}'",
28-
"lint:tsc": "tsc --noEmit",
29+
"lint:tsc": "tsc --incremental false --noEmit",
2930
"postinstall": "yarn-deduplicate || exit 0"
3031
},
3132
"peerDependencies": {
3233
"vue": "^2.0.0"
3334
},
3435
"devDependencies": {
35-
"@1stg/app-config": "^0.3.2",
36-
"@1stg/lib-config": "^0.3.2",
37-
"@d-ts/vue": "^0.4.2",
38-
"@pkgr/webpack": "^0.6.0",
39-
"@pkgr/webpack-vue": "^0.3.0",
40-
"@types/webpack": "^4.41.5",
36+
"@1stg/app-config": "^0.4.3",
37+
"@1stg/lib-config": "^0.4.3",
38+
"@d-ts/vue": "^0.4.3",
39+
"@pkgr/webpack": "^0.6.3",
40+
"@pkgr/webpack-vue": "^0.3.2",
41+
"@types/webpack": "^4.41.6",
4142
"@types/webpack-env": "^1.15.1",
4243
"bootstrap": "^4.4.1",
4344
"core-js": "^3.6.4",
45+
"cpy-cli": "^3.1.0",
4446
"npm-run-all": "^4.1.5",
45-
"rimraf": "^3.0.1",
46-
"typescript": "^3.7.5",
47+
"rimraf": "^3.0.2",
48+
"typescript": "^3.7.3",
4749
"vue": "^2.6.11",
4850
"vue-async-modal": "link:src",
4951
"vue-template-compiler": "^2.6.11",
50-
"yarn-deduplicate": "^1.1.1"
52+
"yarn-deduplicate": "^2.0.0"
5153
},
5254
"resolutions": {
53-
"@pkgr/rollup": "^0.10.0",
5455
"imagemin-gifsicle": "^6.0.1"
5556
}
5657
}

src/Modal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,19 @@ export default {
162162
return modalRef && modalRef.$children[0]
163163
},
164164
resetCurrModal(modalId) {
165-
modalId === this.currModalId && (this.currModal = null)
165+
if (modalId === this.currModalId) {
166+
this.currModal = null
167+
}
166168
},
167169
removeModal(modalId) {
168170
const modalIndex = this.getModalIndex(modalId)
169171
modalIndex + 1 && this.modals.splice(modalIndex, 1)
170172
this.resetCurrModal(modalId)
171173
},
172174
handleBackdrop(e, id, backdrop) {
173-
if (e.target !== e.currentTarget || backdrop === 'static') return
175+
if (e.target !== e.currentTarget || backdrop === 'static') {
176+
return
177+
}
174178
this.close(id)
175179
},
176180
},

src/ModalItem.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export default {
6161
this.$modal.close()
6262
},
6363
confirmModal() {
64-
if (this.disabled) return
64+
if (this.disabled) {
65+
return
66+
}
6567
this.$emit('confirm')
6668
},
6769
},

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/// <reference path="../typings.d.ts" />
12
export { default as Modal } from './Modal.vue'
23
export { default as ModalItem } from './ModalItem.vue'

0 commit comments

Comments
 (0)