# qh-vue-property-decorator

> property decorators for Vue Component

Latest version **3.2.1** (published 2016-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install qh-vue-property-decorator
pnpm add qh-vue-property-decorator
yarn add qh-vue-property-decorator
bun add qh-vue-property-decorator
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.2.1 |
| Published | 2016-12-25 |
| First published | 2016-12-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5464 |
| Author | kaorun343, qinghai |
| Maintainers | noteon |
| Keywords | typescript, decorator |

## Links

- npm: https://www.npmjs.com/package/qh-vue-property-decorator
- Repository: https://github.com/kaorun343/vue-property-decorator
- Homepage: https://github.com/kaorun343/vue-property-decorator#readme
- Issues: https://github.com/kaorun343/vue-property-decorator/issues
- npm.io page: https://npm.io/package/qh-vue-property-decorator

## Dependencies (1)

- [vue-class-component](https://npm.io/package/vue-class-component.md) ^4.3.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 3.2.1 (latest) — 2016-12-25

## README

# Vue Property Decorator

This library fully depends on [vue-class-component](https://github.com/vuejs/vue-class-component).

qh: add @NoCache

## License
MIT License

## Install
```
npm i -S vue-property-decorator
```

## Usage
```typescript
'use strict';
import { Component, prop, watch } from 'vue-property-decorator';

@Component
export class Component {
    @prop(Number)
    propA: number;

    @prop({
      type: String,
      default: 'default value'
    })
    propB: string;

    @watch('child')
    onChildChanged(val: string, oldVal: string) {}
}

```

is equivalent to

```js
'use strict'
export const Component = Vue.extend({
    props: {
        propA: Number,
        propB: {
            type: String,
            required: true,
            default: ''
        }
    },
    methods: {
        onChildChanged(val, oldVal) {}
    },
    watch: {
        'child': 'onChildChanged'
    }
})
```

---
_Source: https://npm.io/package/qh-vue-property-decorator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
