Some checks failed
🚀 Deploy - Demo / deployment (push) Has been cancelled
- 웹훅 URL을 https://admin.youtooplay.com/webhook로 변경 - Nginx 리버스 프록시 설정 파일 추가 - 배포 가이드 업데이트
87 lines
2.9 KiB
JavaScript
87 lines
2.9 KiB
JavaScript
import { computed, ref, mergeProps, createVNode } from 'vue';
|
|
import { g as genericComponent, p as propsFactory, n as useProxiedModel, aB as useScopeId, a5 as getUid, a as useRender, aX as VOverlay, o as forwardRefs, r as omit, aW as makeVOverlayProps } from './server.mjs';
|
|
|
|
const makeVTooltipProps = propsFactory({
|
|
id: String,
|
|
text: String,
|
|
...omit(makeVOverlayProps({
|
|
closeOnBack: false,
|
|
location: "end",
|
|
locationStrategy: "connected",
|
|
eager: true,
|
|
minWidth: 0,
|
|
offset: 10,
|
|
openOnClick: false,
|
|
openOnHover: true,
|
|
origin: "auto",
|
|
scrim: false,
|
|
scrollStrategy: "reposition",
|
|
transition: false
|
|
}), ["absolute", "persistent"])
|
|
}, "VTooltip");
|
|
const VTooltip = genericComponent()({
|
|
name: "VTooltip",
|
|
props: makeVTooltipProps(),
|
|
emits: {
|
|
"update:modelValue": (value) => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const isActive = useProxiedModel(props, "modelValue");
|
|
const {
|
|
scopeId
|
|
} = useScopeId();
|
|
const uid = getUid();
|
|
const id = computed(() => props.id || `v-tooltip-${uid}`);
|
|
const overlay = ref();
|
|
const location = computed(() => {
|
|
return props.location.split(" ").length > 1 ? props.location : props.location + " center";
|
|
});
|
|
const origin = computed(() => {
|
|
return props.origin === "auto" || props.origin === "overlap" || props.origin.split(" ").length > 1 || props.location.split(" ").length > 1 ? props.origin : props.origin + " center";
|
|
});
|
|
const transition = computed(() => {
|
|
if (props.transition) return props.transition;
|
|
return isActive.value ? "scale-transition" : "fade-transition";
|
|
});
|
|
const activatorProps = computed(() => mergeProps({
|
|
"aria-describedby": id.value
|
|
}, props.activatorProps));
|
|
useRender(() => {
|
|
const overlayProps = VOverlay.filterProps(props);
|
|
return createVNode(VOverlay, mergeProps({
|
|
"ref": overlay,
|
|
"class": ["v-tooltip", props.class],
|
|
"style": props.style,
|
|
"id": id.value
|
|
}, overlayProps, {
|
|
"modelValue": isActive.value,
|
|
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
|
"transition": transition.value,
|
|
"absolute": true,
|
|
"location": location.value,
|
|
"origin": origin.value,
|
|
"persistent": true,
|
|
"role": "tooltip",
|
|
"activatorProps": activatorProps.value,
|
|
"_disableGlobalStack": true
|
|
}, scopeId), {
|
|
activator: slots.activator,
|
|
default: function() {
|
|
var _a2;
|
|
var _a;
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
return (_a2 = (_a = slots.default) == null ? void 0 : _a.call(slots, ...args)) != null ? _a2 : props.text;
|
|
}
|
|
});
|
|
});
|
|
return forwardRefs({}, overlay);
|
|
}
|
|
});
|
|
|
|
export { VTooltip as V };
|