# neutronium-vue-simple-command-mixin

> Vue mixin to integrate MVVM ISimpleCommand with vue.js

Latest version **1.1.0** (published 2017-06-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install neutronium-vue-simple-command-mixin
pnpm add neutronium-vue-simple-command-mixin
yarn add neutronium-vue-simple-command-mixin
bun add neutronium-vue-simple-command-mixin
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2017-06-17 |
| First published | 2017-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | David |
| Maintainers | davidesmaisons |
| Keywords | vue.js, Neutronium, command |

## Links

- npm: https://www.npmjs.com/package/neutronium-vue-simple-command-mixin
- Repository: https://github.com/NeutroniumCore/neutronium-vue-simple-command-mixin
- Homepage: https://github.com/NeutroniumCore/neutronium-vue-simple-command-mixin#readme
- Issues: https://github.com/NeutroniumCore/neutronium-vue-simple-command-mixin/issues
- npm.io page: https://npm.io/package/neutronium-vue-simple-command-mixin

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2017-06-17
- 1.0.0 — 2017-04-02

## README

# neutronium vue simple command mixin
<p align="center"><img width="100"src="https://raw.githubusercontent.com/NeutroniumCore/neutronium-vue/master/template/src/assets/logo.png"></p>
Mixin to integrate MVVM ISimpleCommand with vue

[![Npm version](https://img.shields.io/npm/v/neutronium-vue-simple-command-mixin.svg?maxAge=2592000)](https://www.npmjs.com/package/neutronium-vue-simple-command-mixin)
[![MIT License](https://img.shields.io/github/license/NeutroniumCore/neutronium-vue-simplecommand-mixin.svg)](https://github.com/NeutroniumCore/neutronium-vue-simplecommand-mixin/blob/master/LICENSE)
[![Npm version](https://img.shields.io/npm/v/neutronium-vue-simple-command-mixin.svg?maxAge=2592000)](https://www.npmjs.com/package/neutronium-vue-simple-command-mixin)


## Usage
Provide mixin to easily integrate ISimpleCommand in vue.js using Neutronium.
Component this mixin exposes:

## Props
#### `command`
Type: `Array`<br>
Required: `true`<br>

The property corresponding to the C# command.

### `arg`
Type: `Object`<br>
Required: `false`

The argument that will be passed to command when execute is called.

## Methods
### `execute`

Call the corresponding command with the argument `arg`

## Events
### `beforeExecute`

Called before calling command execute if CanExecute is true. 

The event argument provides two properties: 
* `arg`: `Object` the command argument, 
* `cancel`: `false` set it to true to cancel the execution

### `afterExecute`

Called after calling command execute. 

The event argument is the command argument. 


## Example
Declaring buttonCommand component in a .vue file (using semantic ui):
 
```javascript
<template>
  <div class="ui button" :arg="param" @click="execute">   
    <slot></slot>  
  </div>
</template>
<script>
import comandMixin from 'neutronium-vue-simple-command-mixin'

export default {
  mixins:[comandMixin]
}
</script>

<style>
</style>
```

Using button-command:

```html
<button-command :command="compute">
	Submit
</button-command> 
```

### Installation
- Available through:
``` js
 npm install neutronium-vue-simple-command-mixin --save
```

---
_Source: https://npm.io/package/neutronium-vue-simple-command-mixin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
