Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-decorator

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-decorator - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "vue-decorator",
"version": "1.0.5",
"version": "1.0.6",
"description": "Custom decorators to vue-class-component that fits Vue 3",

@@ -5,0 +5,0 @@ "main": "lib/index.umd.js",

@@ -31,2 +31,3 @@ # vue-class-decorator

- [`@Watch`](#Watch)
- [`@Ref`](#Ref)

@@ -122,1 +123,28 @@ ### <a id="Prop"></a> `@Prop(options: (PropOptions | VueConstructor[] | VueConstructor) = {})`

### <a id="Ref"></a> `@Ref(refKey?: string)`
```ts
import { Vue, Options, Ref } from 'vue-decorator'
@Options({})
export default class YourComponent extends Vue {
@Ref('aButton') readonly button!: HTMLButtonElement
}
```
is equivalent to
```js
export default {
computed() {
button: {
cache: false,
get() {
return this.$refs.aButton as HTMLButtonElement
}
}
}
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc