Compare commits
6 Commits
29c1daeda9
...
v1.7.0
| Author | SHA1 | Date | |
|---|---|---|---|
| d3d004b835 | |||
| 3e44d6eb9c | |||
| 03dda7b4ee | |||
| 1a117f55ce | |||
| 371ea1495b | |||
| 74e66728f8 |
@@ -1510,7 +1510,7 @@ const _sfc_main = defineComponent({
|
||||
const soultop = ref(0);
|
||||
const soulleft = ref(0);
|
||||
const selcolumn = ref({});
|
||||
const soulkey = ref();
|
||||
const soulkey = ref("");
|
||||
const sxlist = ref({});
|
||||
function showsoul(event, column, key) {
|
||||
console.log(event);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
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, getCurrentInstance, onUnmounted } from "vue";
|
||||
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, getCurrentInstance, onUnmounted, withModifiers } from "vue";
|
||||
import { I as ImageCompressor } from "../_chunks/js-image-compressor/index.js";
|
||||
import { t as templateRef } from "../_chunks/@vueuse/index.js";
|
||||
import { _ as _sfc_main$9 } from "../button/index2.js";
|
||||
@@ -635,7 +635,7 @@ function _objectSpread$3(e) {
|
||||
var _hoisted_1$2 = {
|
||||
class: "layui-layer-phimg"
|
||||
};
|
||||
var _hoisted_2$2 = ["src", "onWheel"];
|
||||
var _hoisted_2$2 = ["src"];
|
||||
var _hoisted_3$2 = {
|
||||
key: 0,
|
||||
class: "layui-layer-imgsee"
|
||||
@@ -704,20 +704,10 @@ 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,
|
||||
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", {
|
||||
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", {
|
||||
href: "javascript:;",
|
||||
class: "layui-layer-iconext layui-layer-imgprev",
|
||||
onClick: _cache[0] || (_cache[0] = function($event) {
|
||||
@@ -964,10 +954,11 @@ function calculateContent(title2, height, btn, type, isMessage) {
|
||||
if (height && height.indexOf("%") != -1) {
|
||||
height = "100%";
|
||||
}
|
||||
console.log("btn", height + "px");
|
||||
if (btn && btn.length > 0) {
|
||||
if (type == 0) {
|
||||
if (title2) {
|
||||
return "calc(" + height + " - 90px)";
|
||||
return "calc(" + height + " - 135px)";
|
||||
} else {
|
||||
return "calc(" + height + " - 86px)";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@layui/icons-vue": "^1.0.9",
|
||||
"@layui/layer-vue": "workspace:*",
|
||||
"@layui/layer-vue": "file:../layer",
|
||||
"@layui/layui-vue": "file:",
|
||||
"@umijs/ssr-darkreader": "^4.9.45",
|
||||
"@vueuse/core": "^9.2.0",
|
||||
|
||||
@@ -27,9 +27,9 @@ export default (): UserConfigExport => {
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_console: false,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ["console.log"],
|
||||
pure_funcs: [],
|
||||
},
|
||||
output: {
|
||||
comments: true,
|
||||
|
||||
@@ -77,9 +77,9 @@ export default (): UserConfigExport => {
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_console: false,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ["console.log"],
|
||||
pure_funcs: [],
|
||||
},
|
||||
output: {
|
||||
comments: true,
|
||||
|
||||
@@ -27,9 +27,9 @@ export default (): UserConfigExport => {
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_console: false,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ["console.log"],
|
||||
pure_funcs: [],
|
||||
},
|
||||
output: {
|
||||
comments: true,
|
||||
|
||||
@@ -826,7 +826,7 @@ const soulstatus = ref(false);
|
||||
const soultop = ref(0);
|
||||
const soulleft = ref(0);
|
||||
const selcolumn = ref<any>({});
|
||||
const soulkey = ref<string>();
|
||||
const soulkey = ref("");
|
||||
const sxlist: any = ref({});
|
||||
function showsoul(event: MouseEvent, column: any, key: string) {
|
||||
console.log(event);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,6 +8,9 @@ export default defineConfig({
|
||||
"/@src": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 3005,
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
|
||||
@@ -22,9 +22,9 @@ export default defineConfig({
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_console: false,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ["console.log"],
|
||||
pure_funcs: [],
|
||||
},
|
||||
output: {
|
||||
comments: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
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";
|
||||
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";
|
||||
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", "onWheel"];
|
||||
var _hoisted_2$2 = ["src"];
|
||||
var _hoisted_3$2 = {
|
||||
key: 0,
|
||||
class: "layui-layer-imgsee"
|
||||
@@ -697,20 +697,10 @@ 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,
|
||||
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", {
|
||||
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", {
|
||||
href: "javascript:;",
|
||||
class: "layui-layer-iconext layui-layer-imgprev",
|
||||
onClick: _cache[0] || (_cache[0] = function($event) {
|
||||
@@ -957,10 +947,11 @@ function calculateContent(title2, height, btn, type, isMessage) {
|
||||
if (height && height.indexOf("%") != -1) {
|
||||
height = "100%";
|
||||
}
|
||||
console.log("btn", height + "px");
|
||||
if (btn && btn.length > 0) {
|
||||
if (type == 0) {
|
||||
if (title2) {
|
||||
return "calc(" + height + " - 90px)";
|
||||
return "calc(" + height + " - 135px)";
|
||||
} else {
|
||||
return "calc(" + height + " - 86px)";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,6 @@
|
||||
<template>
|
||||
<div class="layui-layer-phimg">
|
||||
<!-- 给 img 标签添加滚轮事件监听 -->
|
||||
<img
|
||||
:src="imgList[index].src"
|
||||
@wheel.prevent="handleWheel"
|
||||
:style="{ transform: `scale(${scale})` }"
|
||||
/>
|
||||
<img :src="imgList[index].src" />
|
||||
<div class="layui-layer-imgsee" v-if="imgList.length > 0">
|
||||
<span class="layui-layer-imguide" v-if="imgList.length > 1">
|
||||
<a
|
||||
@@ -102,14 +97,4 @@ const ifSetThumb = computed(() => {
|
||||
});
|
||||
return res;
|
||||
});
|
||||
|
||||
// 添加缩放比例的响应式变量
|
||||
const scale = ref(1);
|
||||
// 定义处理滚轮事件的方法
|
||||
const handleWheel = (event: WheelEvent) => {
|
||||
const delta = event.deltaY > 0 ? -0.1 : 0.1;
|
||||
const newScale = scale.value + delta;
|
||||
// 限制缩放范围
|
||||
scale.value = Math.min(Math.max(newScale, 0.5), 3);
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -142,10 +142,11 @@ export function calculateContent(
|
||||
if (height && height.indexOf("%") != -1) {
|
||||
height = "100%";
|
||||
}
|
||||
console.log("btn", height + "px");
|
||||
if (btn && btn.length > 0) {
|
||||
if (type == 0) {
|
||||
if (title) {
|
||||
return "calc(" + height + " - 90px)";
|
||||
return "calc(" + height + " - 135px)";
|
||||
} else {
|
||||
return "calc(" + height + " - 86px)";
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ export default defineConfig({
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_console: false,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ["console.log"],
|
||||
pure_funcs: [],
|
||||
},
|
||||
output: {
|
||||
comments: true,
|
||||
|
||||
28
pnpm-lock.yaml
generated
28
pnpm-lock.yaml
generated
@@ -118,8 +118,8 @@ importers:
|
||||
specifier: ^1.0.9
|
||||
version: 1.1.0
|
||||
'@layui/layer-vue':
|
||||
specifier: workspace:*
|
||||
version: link:../layer
|
||||
specifier: git+https://git.theluyuan.com/theluyuan/layui-layer.git
|
||||
version: git+https://git.theluyuan.com/theluyuan/layui-layer.git#e35e9d8eb94e9cb2985b00830a3ed6cd20509127(vue@3.2.40)
|
||||
'@layui/layui-vue':
|
||||
specifier: 'file:'
|
||||
version: file:package/component(vue@3.2.40)
|
||||
@@ -1099,6 +1099,14 @@ packages:
|
||||
'@layui/icons-vue@1.1.0':
|
||||
resolution: {integrity: sha512-ndc53qyUZSslUkO8ZHeBMh6i4gSTtAUqsPpKQZWML0JH6E/X3LIySe6LATeqEMmD7wWSnHJ+WBVGO4ij85Dk1g==}
|
||||
|
||||
'@layui/layer-vue@git+https://git.theluyuan.com/theluyuan/layui-layer.git#4148c78700b236c67e229fc7938e133d1490fb06':
|
||||
resolution: {commit: 4148c78700b236c67e229fc7938e133d1490fb06, repo: https://git.theluyuan.com/theluyuan/layui-layer.git, type: git}
|
||||
version: 1.4.7
|
||||
|
||||
'@layui/layer-vue@git+https://git.theluyuan.com/theluyuan/layui-layer.git#e35e9d8eb94e9cb2985b00830a3ed6cd20509127':
|
||||
resolution: {commit: e35e9d8eb94e9cb2985b00830a3ed6cd20509127, repo: https://git.theluyuan.com/theluyuan/layui-layer.git, type: git}
|
||||
version: 1.4.7
|
||||
|
||||
'@layui/layui-vue@file:package/component':
|
||||
resolution: {directory: package/component, type: directory}
|
||||
|
||||
@@ -4553,11 +4561,25 @@ snapshots:
|
||||
|
||||
'@layui/icons-vue@1.1.0': {}
|
||||
|
||||
'@layui/layer-vue@git+https://git.theluyuan.com/theluyuan/layui-layer.git#4148c78700b236c67e229fc7938e133d1490fb06(vue@3.2.40)':
|
||||
dependencies:
|
||||
'@layui/layer-vue': '@layui/layui-vue@file:package/component(vue@3.2.40)'
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
||||
'@layui/layer-vue@git+https://git.theluyuan.com/theluyuan/layui-layer.git#e35e9d8eb94e9cb2985b00830a3ed6cd20509127(vue@3.2.40)':
|
||||
dependencies:
|
||||
'@layui/layer-vue': '@layui/layui-vue@file:package/component(vue@3.2.40)'
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
|
||||
'@layui/layui-vue@file:package/component(vue@3.2.40)':
|
||||
dependencies:
|
||||
'@ctrl/tinycolor': 3.4.1
|
||||
'@layui/icons-vue': 1.1.0
|
||||
'@layui/layer-vue': link:package/layer
|
||||
'@layui/layer-vue': git+https://git.theluyuan.com/theluyuan/layui-layer.git#4148c78700b236c67e229fc7938e133d1490fb06(vue@3.2.40)
|
||||
'@umijs/ssr-darkreader': 4.9.45
|
||||
'@vueuse/core': 9.2.0(vue@3.2.40)
|
||||
async-validator: 4.1.1
|
||||
|
||||
Reference in New Issue
Block a user