# @xxxxst/vue-decorator

> typescript decorator for vue3 or high

Latest version **0.0.5** (published 2021-08-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @xxxxst/vue-decorator
pnpm add @xxxxst/vue-decorator
yarn add @xxxxst/vue-decorator
bun add @xxxxst/vue-decorator
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-08-17 |
| First published | 2021-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 46.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | xxxxst |
| Maintainers | xxxxst |
| Keywords | vue, class, babel, typescript |

## Links

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

## 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

- 0.0.5 (latest) — 2021-08-17
- 0.0.4 — 2021-04-23
- 0.0.3 — 2021-04-23
- 0.0.2 — 2021-04-06
- 0.0.1 — 2021-03-29

## README

# vue-decorator

typescript decorator for vue3 or high

[https://github.com/xxxxst/vue-decorator](https://github.com/xxxxst/vue-decorator)

# install
Using npm:

```
npm install --save-dev @xxxxst/vue-hook-webpack-plugin
npm install @xxxxst/vue-decorator
```

or using yarn:

```
yarn add @xxxxst/vue-hook-webpack-plugin --dev
yarn add @xxxxst/vue-decorator
```

# Useage

```ts
createStore({
    state: {
        stateVal: "state attribute"
        rootAttr: {
            childAttr: "state child atribute",
        }
    },
})

// @Comp(mapChildComp?: Record<string, Component>, options?: ComponentOptions)
@Comp({}, { template: '<div>{{propVal}}</div>' })
class ChildComponent extends Vue {
	@State() stateVal: string;
    @State("rootAttr.childAttr") childAttr: string;
    @State(`["rootAttr"].childAttr`) childAttr2: string;

    // Prop type is any : [Object, Array, String, Number, Boolean, Function]
	@Prop() propVal = "prop attribute, I'm default value";
	@Model() modelValue = "default model attribute";
    @Model() modelAaa = "model attribute named with 'modelAaa'";
    
    @Inject() provideVal;
    
    mounted() {
        this.stateVal = "update state value";
        this.modelValue = "update model value";
    }
}

@Comp({ ChildComponent, { template: '<ChildComponent :propVal="aaa" v-model="bbb" v-model:modelAaa="ccc"/>'} })
class ParentComponent {
    aaa = "";
    bbb = "";
    ccc = "";
    
	@Provide() provideVal = "provide attribute";
}
```

# Build

```
npm run build
```

# License

MIT

[LICENSE](./LICENSE)

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