@nextcloud/vue
Version:
Nextcloud vue components
16 lines (15 loc) • 543 B
JavaScript
import t from "vue";
const s = { before() {
(!this.$slots.default || this.text.trim() === "") && (t.util.warn(`${this.$options.name} cannot be empty and requires a meaningful text content`, this), this.$destroy(), this.$el.remove());
}, beforeUpdate() {
this.text = this.getText();
}, data() {
return { text: this.getText() };
}, computed: { isLongText() {
return this.text && this.text.trim().length > 20;
} }, methods: { getText() {
return this.$slots.default ? this.$slots.default[0].text.trim() : "";
} } };
export {
s as A
};