@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 1.65 kB
Source Map (JSON)
{"version":3,"file":"ScopeComponent-dbcd0e07.mjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":"AAsBK,MAACA,IAAkBC,CAAAA,MAAc;AAEhCA,EAAAA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;"}