31 lines
965 B
Plaintext
31 lines
965 B
Plaintext
@{
|
|
Layout = null;
|
|
var daycounts = Enum.GetNames(typeof(Qdp.Pricing.Base.Enums.DayCount));
|
|
}
|
|
|
|
<script>
|
|
var ylotc = ylotc || {};
|
|
ylotc.daycounts = @(Json.Serialize(daycounts));
|
|
const vueDayCount = function () {
|
|
return {
|
|
props: ['value', 'allow_empty'],
|
|
mounted() {
|
|
var self = this;
|
|
let lookup = ylotc.daycounts;
|
|
this.allow_empty && (lookup = [String.fromCharCode(160)].concat(lookup));
|
|
let autoCtrl = FastVue.autocomplete(this.$el, {
|
|
lookup: lookup,
|
|
onSelect(data) {
|
|
self.$emit('input', data);
|
|
}
|
|
});
|
|
this.value && (autoCtrl.setData(this.value));
|
|
},
|
|
destroyed() {
|
|
FastVue.autocomplete.dispose(this.$el);
|
|
},
|
|
template: '<input type="text" />'
|
|
};
|
|
};
|
|
</script>
|