salix/front/core/components/chip/index.js

24 lines
545 B
JavaScript
Raw Normal View History

2018-09-04 09:49:00 +00:00
import ngModule from '../../module';
2019-10-18 19:36:30 +00:00
import Component from '../../lib/component';
2018-09-04 09:49:00 +00:00
import './style.scss';
2019-10-18 19:36:30 +00:00
export default class Chip extends Component {
2021-06-17 13:09:04 +00:00
onRemove($event) {
if (!this.disabled) this.emit('remove', {$event});
2018-09-04 09:49:00 +00:00
}
}
Chip.$inject = ['$element', '$scope', '$transclude'];
ngModule.vnComponent('vnChip', {
2018-09-04 09:49:00 +00:00
template: require('./index.html'),
2021-06-17 13:09:04 +00:00
transclude: {
prepend: '?prepend',
append: '?append'
},
2018-09-04 09:49:00 +00:00
controller: Chip,
bindings: {
2018-09-07 10:20:57 +00:00
disabled: '<?',
2019-10-18 19:36:30 +00:00
removable: '<?'
2018-09-04 09:49:00 +00:00
}
});