forked from jchomaz/Vulture
Tracking de l'application VApp (IHM du jeu)
This commit is contained in:
52
VApp/node_modules/vuetify/lib/components/VStepper/VStepperWindow.mjs
generated
vendored
Normal file
52
VApp/node_modules/vuetify/lib/components/VStepper/VStepperWindow.mjs
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
|
||||
// Components
|
||||
import { makeVWindowProps, VWindow } from "../VWindow/VWindow.mjs"; // Composables
|
||||
import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
|
||||
import { computed, inject } from 'vue';
|
||||
import { genericComponent, omit, propsFactory, useRender } from "../../util/index.mjs"; // Types
|
||||
export const VStepperSymbol = Symbol.for('vuetify:v-stepper');
|
||||
export const makeVStepperWindowProps = propsFactory({
|
||||
...omit(makeVWindowProps(), ['continuous', 'nextIcon', 'prevIcon', 'showArrows', 'touch', 'mandatory'])
|
||||
}, 'VStepperWindow');
|
||||
export const VStepperWindow = genericComponent()({
|
||||
name: 'VStepperWindow',
|
||||
props: makeVStepperWindowProps(),
|
||||
emits: {
|
||||
'update:modelValue': v => true
|
||||
},
|
||||
setup(props, _ref) {
|
||||
let {
|
||||
slots
|
||||
} = _ref;
|
||||
const group = inject(VStepperSymbol, null);
|
||||
const _model = useProxiedModel(props, 'modelValue');
|
||||
const model = computed({
|
||||
get() {
|
||||
// Always return modelValue if defined
|
||||
// or if not within a VStepper group
|
||||
if (_model.value != null || !group) return _model.value;
|
||||
|
||||
// If inside of a VStepper, find the currently selected
|
||||
// item by id. Item value may be assigned by its index
|
||||
return group.items.value.find(item => group.selected.value.includes(item.id))?.value;
|
||||
},
|
||||
set(val) {
|
||||
_model.value = val;
|
||||
}
|
||||
});
|
||||
useRender(() => {
|
||||
const windowProps = VWindow.filterProps(props);
|
||||
return _createVNode(VWindow, _mergeProps({
|
||||
"_as": "VStepperWindow"
|
||||
}, windowProps, {
|
||||
"modelValue": model.value,
|
||||
"onUpdate:modelValue": $event => model.value = $event,
|
||||
"class": "v-stepper-window",
|
||||
"mandatory": false,
|
||||
"touch": false
|
||||
}), slots);
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
//# sourceMappingURL=VStepperWindow.mjs.map
|
||||
Reference in New Issue
Block a user