Skip to content

Commit 6682d7c

Browse files
committed
docs
1 parent b5e4b70 commit 6682d7c

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

docs/quick-start/quick-start.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ Install `vue-facing-decorator` with your favorite package manager.
1414
npm install --save vue-facing-decorator
1515
```
1616

17+
Enable `experimentalDecorators` in `tsconfig.json` in project root directory.
18+
19+
```json
20+
{
21+
"compilerOptions": {
22+
"experimentalDecorators": true
23+
}
24+
}
25+
```
26+
1727
## How to use?
1828

1929
### Define a class component

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-facing-decorator",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"description": "Vue typescript class and decorator based component.",
55
"main": "dist/index.js",
66
"keywords": [

src/component.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,27 +103,21 @@ function build(cons: Cons, option: ComponentOption) {
103103
}
104104
function _Component(arg: ComponentConsOption, cb: (cons: Cons, option: ComponentOption) => any) {
105105
if (typeof arg === 'function') {
106-
console.log('zxzxzx A')
107106
return cb(arg, {})
108107
}
109-
console.log('zxzxzx B')
110108
return function (cons: Cons) {
111-
console.log('zxzxzx C')
112109
return cb(cons, arg)
113110
}
114111
}
115112
export function ComponentBase(arg: ComponentConsOption): any {
116113
return _Component(arg, function (cons: Cons, option: ComponentOption) {
117-
console.log('zxzxzx D')
118114
build(cons, option)
119115
return cons
120116
})
121117
}
122118

123119
export function Component(arg: ComponentConsOption): any {
124-
console.log('zxzxzx', arg)
125120
return _Component(arg, function (cons: Cons, option: ComponentOption) {
126-
console.log('zxzxzx 2')
127121
build(cons, option)
128122
// const slot = getSlot(cons.prototype)!
129123
// Object.defineProperty(cons, '__vccOpts', {

0 commit comments

Comments
 (0)