@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 1.08 kB
Source Map (JSON)
{"version":3,"file":"actionGlobal-BZFdtdJL.mjs","sources":["../../src/mixins/actionGlobal.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nexport default {\n\tbeforeUpdate() {\n\t\tthis.text = this.getText()\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\t// $slots are not reactive.\n\t\t\t// We need to update the content manually\n\t\t\ttext: this.getText(),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisLongText() {\n\t\t\treturn this.text && this.text.trim().length > 20\n\t\t},\n\t},\n\n\tmethods: {\n\t\tgetText() {\n\t\t\treturn this.$slots.default?.()[0].children?.trim?.() || ''\n\t\t},\n\t},\n}\n"],"names":[],"mappings":"AAKA,MAAA,oBAAe;AAAA,EACd,eAAe;AACd,SAAK,OAAO,KAAK,QAAO;AAAA,EACzB;AAAA,EAEA,OAAO;AACN,WAAO;AAAA;AAAA;AAAA,MAGN,MAAM,KAAK,QAAO;AAAA,IACrB;AAAA,EACC;AAAA,EAEA,UAAU;AAAA,IACT,aAAa;AACZ,aAAO,KAAK,QAAQ,KAAK,KAAK,KAAI,EAAG,SAAS;AAAA,IAC/C;AAAA,EACF;AAAA,EAEC,SAAS;AAAA,IACR,UAAU;AACT,aAAO,KAAK,OAAO,UAAO,EAAK,CAAC,EAAE,UAAU,YAAY;AAAA,IACzD;AAAA,EACF;AACA;"}