Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/bootstrap-vue/esm/mixins/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // SSR safe client-side ID attribute generation
// ID's can only be generated client-side, after mount
// `this._uid` is not synched between server and client
import { COMPONENT_UID_KEY, Vue } from '../vue';
import { PROP_TYPE_STRING } from '../constants/props';
import { makeProp } from '../utils/props'; // --- Props ---
export var props = {
id: makeProp(PROP_TYPE_STRING)
}; // --- Mixin ---
// @vue/component
export var idMixin = Vue.extend({
props: props,
data: function data() {
return {
localId_: null
};
},
computed: {
safeId: function safeId() {
// Computed property that returns a dynamic function for creating the ID
// Reacts to changes in both `.id` and `.localId_` and regenerates a new function
var id = this.id || this.localId_; // We return a function that accepts an optional suffix string
// So this computed prop looks and works like a method
// but benefits from Vue's computed prop caching
var fn = function fn(suffix) {
if (!id) {
return null;
}
suffix = String(suffix || '').replace(/\s+/g, '_');
return suffix ? id + '_' + suffix : id;
};
return fn;
}
},
mounted: function mounted() {
var _this = this;
// `mounted()` only occurs client-side
this.$nextTick(function () {
// Update DOM with auto-generated ID after mount
// to prevent SSR hydration errors
_this.localId_ = "__BVID__".concat(_this[COMPONENT_UID_KEY]);
});
}
}); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0032 ]-- |