intact-vue-next
v3.0.39
Published
A compatibility layer for running intact component in vue3.0
Downloads
39
Readme
intact-vue
A compatibility layer for running Intact component in Vue-Next.
Usage
import {createApp} from 'vue';
import {Component} from 'intact-vue';
class IntactComponent extends Component {
static template = `
<button ev-click={this.onClick.bind(this)}>
click {this.get('value')}
</button>
`;
onClick() {
this.set('value', this.get('value') + 1);
this.trigger('click');
}
}
const container = document.createElement('div');
document.body.appendChild(container);
createApp({
data: {
count: 0,
},
template: `<div>
<IntactComponent @click="onClick" v-model="count"/>
<div>count: {{ count }}</div>
</div>`,
methods: {
onClick() {
console.log(this.count);
}
},
components: {IntactComponent}
}).mount(container);
webpack
You can use alias config of webpack to replace intact module.
resolve: {
alias: {
'intact$': 'intact-vue'
}
}
Incompatible
.native
modifier is not supported. For example:// native modifier <IntactComponent @click.native="onClick" />
Multiple values style is not supported.