feature: vor und nachteile

This commit is contained in:
Hikyu
2026-05-31 13:54:31 +02:00
parent 552a947a1c
commit e3dad17446
23270 changed files with 3024794 additions and 200 deletions
+1
View File
@@ -0,0 +1 @@
.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}
+157
View File
@@ -0,0 +1,157 @@
import { nextTick, pushScopeId, popScopeId, openBlock, createBlock, withScopeId } from 'vue';
function getInternetExplorerVersion() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');
if (trident > 0) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
}
var edge = ua.indexOf('Edge/');
if (edge > 0) {
// Edge (IE 12+) => return version number
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
} // other browser
return -1;
}
let isIE;
function initCompat () {
if (!initCompat.init) {
initCompat.init = true;
isIE = getInternetExplorerVersion() !== -1;
}
}
var script = {
name: 'ResizeObserver',
props: {
emitOnMount: {
type: Boolean,
default: false,
},
ignoreWidth: {
type: Boolean,
default: false,
},
ignoreHeight: {
type: Boolean,
default: false,
},
},
emits: [
'notify',
],
mounted () {
initCompat();
nextTick(() => {
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
if (this.emitOnMount) {
this.emitSize();
}
});
const object = document.createElement('object');
this._resizeObject = object;
object.setAttribute('aria-hidden', 'true');
object.setAttribute('tabindex', -1);
object.onload = this.addResizeHandlers;
object.type = 'text/html';
if (isIE) {
this.$el.appendChild(object);
}
object.data = 'about:blank';
if (!isIE) {
this.$el.appendChild(object);
}
},
beforeUnmount () {
this.removeResizeHandlers();
},
methods: {
compareAndNotify () {
if ((!this.ignoreWidth && this._w !== this.$el.offsetWidth) || (!this.ignoreHeight && this._h !== this.$el.offsetHeight)) {
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
this.emitSize();
}
},
emitSize () {
this.$emit('notify', {
width: this._w,
height: this._h,
});
},
addResizeHandlers () {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.compareAndNotify);
this.compareAndNotify();
},
removeResizeHandlers () {
if (this._resizeObject && this._resizeObject.onload) {
if (!isIE && this._resizeObject.contentDocument) {
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.compareAndNotify);
}
this.$el.removeChild(this._resizeObject);
this._resizeObject.onload = null;
this._resizeObject = null;
}
},
},
};
const _withId = /*#__PURE__*/withScopeId("data-v-b329ee4c");
pushScopeId("data-v-b329ee4c");
const _hoisted_1 = {
class: "resize-observer",
tabindex: "-1"
};
popScopeId();
const render = /*#__PURE__*/_withId((_ctx, _cache, $props, $setup, $data, $options) => {
return (openBlock(), createBlock("div", _hoisted_1))
});
script.render = render;
script.__scopeId = "data-v-b329ee4c";
script.__file = "src/components/ResizeObserver.vue";
function install(app) {
// eslint-disable-next-line vue/component-definition-name-casing
app.component('resize-observer', script);
app.component('ResizeObserver', script);
}
var plugin = {
// eslint-disable-next-line no-undef
version: "2.0.0-alpha.1",
install: install
};
export default plugin;
export { script as ResizeObserver, install };
//# sourceMappingURL=vue-resize.esm.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
var VueResize=function(e,t){"use strict";let i;function s(){s.init||(s.init=!0,i=-1!==function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}())}var n={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){s(),t.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",i&&this.$el.appendChild(e),e.data="about:blank",i||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!i&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const r=t.withScopeId("data-v-b329ee4c");t.pushScopeId("data-v-b329ee4c");const o={class:"resize-observer",tabindex:"-1"};t.popScopeId();const d=r((e,i,s,n,r,d)=>(t.openBlock(),t.createBlock("div",o)));function h(e){e.component("resize-observer",n),e.component("ResizeObserver",n)}n.render=d,n.__scopeId="data-v-b329ee4c",n.__file="src/components/ResizeObserver.vue";var a={version:"2.0.0-alpha.1",install:h};return e.ResizeObserver=n,e.default=a,e.install=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({},Vue);
//# sourceMappingURL=vue-resize.min.js.map
File diff suppressed because one or more lines are too long
+166
View File
@@ -0,0 +1,166 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['vue-resize'] = {}, global.vue));
}(this, (function (exports, vue) { 'use strict';
function getInternetExplorerVersion() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10 or older => return version number
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');
if (trident > 0) {
// IE 11 => return version number
var rv = ua.indexOf('rv:');
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);
}
var edge = ua.indexOf('Edge/');
if (edge > 0) {
// Edge (IE 12+) => return version number
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);
} // other browser
return -1;
}
let isIE;
function initCompat () {
if (!initCompat.init) {
initCompat.init = true;
isIE = getInternetExplorerVersion() !== -1;
}
}
var script = {
name: 'ResizeObserver',
props: {
emitOnMount: {
type: Boolean,
default: false,
},
ignoreWidth: {
type: Boolean,
default: false,
},
ignoreHeight: {
type: Boolean,
default: false,
},
},
emits: [
'notify',
],
mounted () {
initCompat();
vue.nextTick(() => {
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
if (this.emitOnMount) {
this.emitSize();
}
});
const object = document.createElement('object');
this._resizeObject = object;
object.setAttribute('aria-hidden', 'true');
object.setAttribute('tabindex', -1);
object.onload = this.addResizeHandlers;
object.type = 'text/html';
if (isIE) {
this.$el.appendChild(object);
}
object.data = 'about:blank';
if (!isIE) {
this.$el.appendChild(object);
}
},
beforeUnmount () {
this.removeResizeHandlers();
},
methods: {
compareAndNotify () {
if ((!this.ignoreWidth && this._w !== this.$el.offsetWidth) || (!this.ignoreHeight && this._h !== this.$el.offsetHeight)) {
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
this.emitSize();
}
},
emitSize () {
this.$emit('notify', {
width: this._w,
height: this._h,
});
},
addResizeHandlers () {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.compareAndNotify);
this.compareAndNotify();
},
removeResizeHandlers () {
if (this._resizeObject && this._resizeObject.onload) {
if (!isIE && this._resizeObject.contentDocument) {
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.compareAndNotify);
}
this.$el.removeChild(this._resizeObject);
this._resizeObject.onload = null;
this._resizeObject = null;
}
},
},
};
const _withId = /*#__PURE__*/vue.withScopeId("data-v-b329ee4c");
vue.pushScopeId("data-v-b329ee4c");
const _hoisted_1 = {
class: "resize-observer",
tabindex: "-1"
};
vue.popScopeId();
const render = /*#__PURE__*/_withId((_ctx, _cache, $props, $setup, $data, $options) => {
return (vue.openBlock(), vue.createBlock("div", _hoisted_1))
});
script.render = render;
script.__scopeId = "data-v-b329ee4c";
script.__file = "src/components/ResizeObserver.vue";
function install(app) {
// eslint-disable-next-line vue/component-definition-name-casing
app.component('resize-observer', script);
app.component('ResizeObserver', script);
}
var plugin = {
// eslint-disable-next-line no-undef
version: "2.0.0-alpha.1",
install: install
};
exports.ResizeObserver = script;
exports.default = plugin;
exports.install = install;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=vue-resize.umd.js.map
File diff suppressed because one or more lines are too long