♻️ component
fix(utils): 调整计算内容高度公式中的偏移量 style(component): 移除 soulkey 的默认空字符串值 chore(component): 更新 layer-vue 依赖路径为本地路径 feat(layer): 为图片组件添加滚轮缩放功能 refactor(component): 优化 computedRefImpl 类的实现 docs(component): 更新依赖路径和版本信息 style(component): 统一 isObject 函数的命名和实现 refactor(component): 重构上传组件的代码结构
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, unref, createCommentVNode, toDisplayString, normalizeClass, ref, watch, onMounted, nextTick, createElementVNode, Fragment, renderList, shallowRef, createTextVNode, createVNode, useSlots, inject, Transition, withCtx, createBlock, renderSlot, h, render, isVNode } from "vue";
|
||||
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, unref, createCommentVNode, toDisplayString, normalizeClass, ref, watch, onMounted, nextTick, createElementVNode, withModifiers, Fragment, renderList, shallowRef, createTextVNode, createVNode, useSlots, inject, Transition, withCtx, createBlock, renderSlot, h, render, isVNode } from "vue";
|
||||
function _typeof$1(o) {
|
||||
"@babel/helpers - typeof";
|
||||
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
||||
@@ -628,7 +628,7 @@ function _objectSpread$3(e) {
|
||||
var _hoisted_1$2 = {
|
||||
class: "layui-layer-phimg"
|
||||
};
|
||||
var _hoisted_2$2 = ["src"];
|
||||
var _hoisted_2$2 = ["src", "onWheel"];
|
||||
var _hoisted_3$2 = {
|
||||
key: 0,
|
||||
class: "layui-layer-imgsee"
|
||||
@@ -697,10 +697,20 @@ var _sfc_main$2 = defineComponent(_objectSpread$3(_objectSpread$3({}, __default_
|
||||
});
|
||||
return res;
|
||||
});
|
||||
var scale = ref(1);
|
||||
var handleWheel = function handleWheel2(event) {
|
||||
var delta = event.deltaY > 0 ? -0.1 : 0.1;
|
||||
var newScale = scale.value + delta;
|
||||
scale.value = Math.min(Math.max(newScale, 0.5), 3);
|
||||
};
|
||||
return function(_ctx, _cache) {
|
||||
return openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("img", {
|
||||
src: __props.imgList[index2.value].src
|
||||
}, null, 8, _hoisted_2$2), __props.imgList.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$2, [__props.imgList.length > 1 ? (openBlock(), createElementBlock("span", _hoisted_4$1, [createElementVNode("a", {
|
||||
src: __props.imgList[index2.value].src,
|
||||
onWheel: withModifiers(handleWheel, ["prevent"]),
|
||||
style: normalizeStyle({
|
||||
transform: "scale(".concat(scale.value, ")")
|
||||
})
|
||||
}, null, 44, _hoisted_2$2), __props.imgList.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$2, [__props.imgList.length > 1 ? (openBlock(), createElementBlock("span", _hoisted_4$1, [createElementVNode("a", {
|
||||
href: "javascript:;",
|
||||
class: "layui-layer-iconext layui-layer-imgprev",
|
||||
onClick: _cache[0] || (_cache[0] = function($event) {
|
||||
@@ -950,7 +960,7 @@ function calculateContent(title2, height, btn, type, isMessage) {
|
||||
if (btn && btn.length > 0) {
|
||||
if (type == 0) {
|
||||
if (title2) {
|
||||
return "calc(" + height + " - 137px)";
|
||||
return "calc(" + height + " - 90px)";
|
||||
} else {
|
||||
return "calc(" + height + " - 86px)";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user