@vipl520/dk-ui 1.0.55 → 1.0.57
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +21 -4
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +21 -4
- package/dist/web-types.json +1 -1
- package/es/style-box-input/src/style-box-input.vue2.mjs +1 -1
- package/es/style-box-input/src/style-box-input.vue2.mjs.map +1 -1
- package/es/url-input/index.d.ts +3 -1
- package/es/url-input/src/url-input-content.vue2.mjs +11 -3
- package/es/url-input/src/url-input-content.vue2.mjs.map +1 -1
- package/es/url-input/src/url-input.vue.d.ts +3 -1
- package/es/url-input/src/url-input.vue2.mjs +11 -2
- package/es/url-input/src/url-input.vue2.mjs.map +1 -1
- package/lib/style-box-input/src/style-box-input.vue2.js +1 -1
- package/lib/style-box-input/src/style-box-input.vue2.js.map +1 -1
- package/lib/url-input/index.d.ts +3 -1
- package/lib/url-input/src/url-input-content.vue2.js +10 -2
- package/lib/url-input/src/url-input-content.vue2.js.map +1 -1
- package/lib/url-input/src/url-input.vue.d.ts +3 -1
- package/lib/url-input/src/url-input.vue2.js +10 -1
- package/lib/url-input/src/url-input.vue2.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -5677,7 +5677,7 @@ var _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
5677
5677
|
const height = computed(() => {
|
5678
5678
|
if (props.height === "auto") {
|
5679
5679
|
const h = width.value / 1.8;
|
5680
|
-
return h >
|
5680
|
+
return h > 200 ? 200 : h;
|
5681
5681
|
} else {
|
5682
5682
|
return props.height;
|
5683
5683
|
}
|
@@ -27139,12 +27139,20 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
27139
27139
|
emits: ["submit"],
|
27140
27140
|
setup(__props, { emit }) {
|
27141
27141
|
const props = __props;
|
27142
|
+
const urlInputData = inject("urlInputData", []);
|
27142
27143
|
const _urlData = computed(() => {
|
27143
27144
|
console.log("urlData", props.urlData);
|
27144
27145
|
if (props.urlData?.length > 0) {
|
27145
27146
|
return props.urlData;
|
27146
27147
|
} else {
|
27147
|
-
return
|
27148
|
+
return urlInputData.urlData;
|
27149
|
+
}
|
27150
|
+
});
|
27151
|
+
const _jumpMinApp = computed(() => {
|
27152
|
+
if (urlInputData.jumpMinApp !== void 0) {
|
27153
|
+
return urlInputData.jumpMinApp;
|
27154
|
+
} else {
|
27155
|
+
return props.jumpMinApp;
|
27148
27156
|
}
|
27149
27157
|
});
|
27150
27158
|
const minapp = reactive({
|
@@ -27280,7 +27288,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
27280
27288
|
createVNode(_component_el_tab_pane, { label: "\u81EA\u5B9A\u4E49\u94FE\u63A5" }, {
|
27281
27289
|
default: withCtx(() => [
|
27282
27290
|
createElementVNode("div", _hoisted_12, [
|
27283
|
-
|
27291
|
+
_jumpMinApp.value ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
27284
27292
|
createVNode(_component_el_radio_group, {
|
27285
27293
|
modelValue: urlType.value,
|
27286
27294
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => urlType.value = $event),
|
@@ -27416,16 +27424,25 @@ const __default__ = defineComponent({
|
|
27416
27424
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
27417
27425
|
...__default__,
|
27418
27426
|
props: urlInputProps,
|
27419
|
-
emits: ["update:modelValue"],
|
27427
|
+
emits: ["input", "update:modelValue", "change"],
|
27420
27428
|
setup(__props, { emit }) {
|
27421
27429
|
const props = __props;
|
27422
27430
|
const show = ref(false);
|
27423
27431
|
const url = ref(props.modelValue);
|
27424
27432
|
const updateUrl = (value) => {
|
27433
|
+
console.log("url", url);
|
27425
27434
|
url.value = value;
|
27426
27435
|
emit("update:modelValue", value);
|
27427
27436
|
show.value = false;
|
27428
27437
|
};
|
27438
|
+
watch(
|
27439
|
+
() => url.value,
|
27440
|
+
(val) => {
|
27441
|
+
emit("update:modelValue", val);
|
27442
|
+
emit("input", val);
|
27443
|
+
emit("change", val);
|
27444
|
+
}
|
27445
|
+
);
|
27429
27446
|
return (_ctx, _cache) => {
|
27430
27447
|
const _component_el_button = resolveComponent("el-button");
|
27431
27448
|
const _component_el_input = resolveComponent("el-input");
|
package/dist/web-types.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-box-input.vue2.mjs","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover ref=\"popover\" placement=\"bottom\" title=\"说明\" :width=\"280\" trigger=\"hover\" :content=\"props.help\">\n <template #reference>\n <dk-icon icon=\"QuestionFilled\" class=\"m-l-5px vertical-text-top\"></dk-icon>\n </template>\n </el-popover>\n </label>\n <!-- <div class=\"float-right cursor-pointer\">-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置高宽\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('widthHeight')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置内边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-success)\" @click=\"onRefresh('padding')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-warning)\" @click=\"onRefresh('margin')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- </div>-->\n <div ref=\"box\" tabindex=\"0\" class=\"wrapper\" style=\"margin-top: 10px\" :style=\"{ height: height + 'px' }\">\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div style=\"position: absolute; display: none; width: 100%; height: 100%\"></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.margin ? '#f00' : '#303133'\"\n @click=\"onBind('margin')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('margin')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.padding ? '#f00' : '#303133'\"\n @click=\"onBind('padding')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip\n :show-after=\"1000\"\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置内边距\"\n placement=\"top-start\"\n >\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('padding')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span class=\"content-unit left-0\" @dblclick=\"onDblclick('width', 9)\">\n <em>{{ getValue(styles['width']) }}</em>\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span class=\"content-unit right-0\" @dblclick=\"onDblclick('height', 9)\">\n <em>{{ getValue(styles['height']) }}</em>\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch, computed } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst box: any = ref(null)\nconst { width } = useElementSize(box) // 当前组件宽度\nconst bind: any = reactive({\n padding: false,\n margin: false,\n size: false,\n})\nconst height: any = computed(() => {\n if (props.height === 'auto') {\n const h = width.value / 1.8\n return h > 300 ? 300 : h\n } else {\n return props.height\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (axis: 'x' | 'y', position: 'top' | 'bottom' | 'left' | 'right') => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n\n if (bind[type]) {\n styles[type + 'Top'] = styles[value]\n styles[type + 'Bottom'] = styles[value]\n styles[type + 'Left'] = styles[value]\n styles[type + 'Right'] = styles[value]\n }\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n // const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (cursor: string, left: string, top: string, width: string, height: string) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height.value * 0.5 * multiples[type] + 'px',\n '0.1px',\n height.value * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n if (value.indexOf('padding') == 0 && bind.padding) {\n styles.paddingTop = styles[value]\n styles.paddingRight = styles[value]\n styles.paddingBottom = styles[value]\n styles.paddingLeft = styles[value]\n }\n if (value.indexOf('margin') == 0 && bind.padding) {\n styles.marginTop = styles[value]\n styles.marginRight = styles[value]\n styles.marginBottom = styles[value]\n styles.marginLeft = styles[value]\n }\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n\nconst onBind = (type: string) => {\n bind[type] = !bind[type]\n}\n</script>\n"],"names":["__MACROS_defineComponent","width","height"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAkND,IAAA,MAAM,QAAa,QAAS,CAAA;AAAA,MAC1B,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA,KAAA;AAAA,MACT,WAAa,EAAA,KAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,aAAa,GAAI,EAAA,CAAA;AACvB,IAAA,MAAM,aAAa,GAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAc,GAAI,EAAA,CAAA;AAExB,IAAA,MAAM,SAAc,QAAS,CAAA;AAAA,MAC3B,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,MAC/C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,MAC/C,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC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A,CAAA;AACpB,QAAA,MAAA,CAAO,WAAc,GAAA,EAAA,CAAA;AACrB,QAAA,MAAA,CAAO,SAAY,GAAA,EAAA,CAAA;AACnB,QAAA,MAAA,CAAO,YAAe,GAAA,EAAA,CAAA;AAAA,OACxB,MAAA,IAAW,SAAS,SAAW,EAAA;AAC7B,QAAA,MAAA,CAAO,WAAc,GAAA,EAAA,CAAA;AACrB,QAAA,MAAA,CAAO,YAAe,GAAA,EAAA,CAAA;AACtB,QAAA,MAAA,CAAO,UAAa,GAAA,EAAA,CAAA;AACpB,QAAA,MAAA,CAAO,aAAgB,GAAA,EAAA,CAAA;AAAA,OACzB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,MAAA,GAAS,CAAC,IAAiB,KAAA;AAC/B,MAAA,IAAA,CAAK,IAAI,CAAA,GAAI,CAAC,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,KACzB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"style-box-input.vue2.mjs","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover ref=\"popover\" placement=\"bottom\" title=\"说明\" :width=\"280\" trigger=\"hover\" :content=\"props.help\">\n <template #reference>\n <dk-icon icon=\"QuestionFilled\" class=\"m-l-5px vertical-text-top\"></dk-icon>\n </template>\n </el-popover>\n </label>\n <!-- <div class=\"float-right cursor-pointer\">-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置高宽\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('widthHeight')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置内边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-success)\" @click=\"onRefresh('padding')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-warning)\" @click=\"onRefresh('margin')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- </div>-->\n <div ref=\"box\" tabindex=\"0\" class=\"wrapper\" style=\"margin-top: 10px\" :style=\"{ height: height + 'px' }\">\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div style=\"position: absolute; display: none; width: 100%; height: 100%\"></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.margin ? '#f00' : '#303133'\"\n @click=\"onBind('margin')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('margin')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.padding ? '#f00' : '#303133'\"\n @click=\"onBind('padding')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip\n :show-after=\"1000\"\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置内边距\"\n placement=\"top-start\"\n >\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('padding')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span class=\"content-unit left-0\" @dblclick=\"onDblclick('width', 9)\">\n <em>{{ getValue(styles['width']) }}</em>\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span class=\"content-unit right-0\" @dblclick=\"onDblclick('height', 9)\">\n <em>{{ getValue(styles['height']) }}</em>\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch, computed } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst box: any = ref(null)\nconst { width } = useElementSize(box) // 当前组件宽度\nconst bind: any = reactive({\n padding: false,\n margin: false,\n size: false,\n})\nconst height: any = computed(() => {\n if (props.height === 'auto') {\n const h = width.value / 1.8\n return h > 200 ? 200 : h\n } else {\n return props.height\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (axis: 'x' | 'y', position: 'top' | 'bottom' | 'left' | 'right') => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n\n if (bind[type]) {\n styles[type + 'Top'] = styles[value]\n styles[type + 'Bottom'] = styles[value]\n styles[type + 'Left'] = styles[value]\n styles[type + 'Right'] = styles[value]\n }\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n // const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (cursor: string, left: string, top: string, width: string, height: string) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height.value * 0.5 * multiples[type] + 'px',\n '0.1px',\n height.value * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n if (value.indexOf('padding') == 0 && bind.padding) {\n styles.paddingTop = styles[value]\n styles.paddingRight = styles[value]\n styles.paddingBottom = styles[value]\n styles.paddingLeft = styles[value]\n }\n if (value.indexOf('margin') == 0 && bind.padding) {\n styles.marginTop = styles[value]\n styles.marginRight = styles[value]\n styles.marginBottom = styles[value]\n styles.marginLeft = styles[value]\n }\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n\nconst onBind = (type: string) => {\n bind[type] = !bind[type]\n}\n</script>\n"],"names":["__MACROS_defineComponent","width","height"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAA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;AAEA,IAAM,MAAA,MAAA,GAAS,CAAC,IAAiB,KAAA;AAC/B,MAAA,IAAA,CAAK,IAAI,CAAA,GAAI,CAAC,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,KACzB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/url-input/index.d.ts
CHANGED
@@ -11,7 +11,7 @@ export declare const UrlInput: import("@vipl520/utils").WithInstall<import("vue"
|
|
11
11
|
default: () => never[];
|
12
12
|
type: ArrayConstructor;
|
13
13
|
};
|
14
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "change")[], "input" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
15
|
modelValue: {
|
16
16
|
default: string;
|
17
17
|
type: StringConstructor;
|
@@ -25,7 +25,9 @@ export declare const UrlInput: import("@vipl520/utils").WithInstall<import("vue"
|
|
25
25
|
type: ArrayConstructor;
|
26
26
|
};
|
27
27
|
}>> & {
|
28
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
28
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
30
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
29
31
|
}, {
|
30
32
|
modelValue: string;
|
31
33
|
urlData: unknown[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent,
|
1
|
+
import { defineComponent, inject, computed, reactive, ref, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, renderList, createBlock, createElementVNode, resolveDynamicComponent, toDisplayString, normalizeClass, createCommentVNode, createTextVNode } from 'vue';
|
2
2
|
import DkUrlInputTable from './url-input-table.vue.mjs';
|
3
3
|
|
4
4
|
const _hoisted_1 = { style: { "padding": "10px" } };
|
@@ -40,12 +40,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
40
|
emits: ["submit"],
|
41
41
|
setup(__props, { emit }) {
|
42
42
|
const props = __props;
|
43
|
+
const urlInputData = inject("urlInputData", []);
|
43
44
|
const _urlData = computed(() => {
|
44
45
|
console.log("urlData", props.urlData);
|
45
46
|
if (props.urlData?.length > 0) {
|
46
47
|
return props.urlData;
|
47
48
|
} else {
|
48
|
-
return
|
49
|
+
return urlInputData.urlData;
|
50
|
+
}
|
51
|
+
});
|
52
|
+
const _jumpMinApp = computed(() => {
|
53
|
+
if (urlInputData.jumpMinApp !== void 0) {
|
54
|
+
return urlInputData.jumpMinApp;
|
55
|
+
} else {
|
56
|
+
return props.jumpMinApp;
|
49
57
|
}
|
50
58
|
});
|
51
59
|
const minapp = reactive({
|
@@ -181,7 +189,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
181
189
|
createVNode(_component_el_tab_pane, { label: "\u81EA\u5B9A\u4E49\u94FE\u63A5" }, {
|
182
190
|
default: withCtx(() => [
|
183
191
|
createElementVNode("div", _hoisted_12, [
|
184
|
-
|
192
|
+
_jumpMinApp.value ? (openBlock(), createElementBlock("div", _hoisted_13, [
|
185
193
|
createVNode(_component_el_radio_group, {
|
186
194
|
modelValue: urlType.value,
|
187
195
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => urlType.value = $event),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url-input-content.vue2.mjs","sources":["../../../src/url-input/src/url-input-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInputContent',\n});\n</script>\n<template>\n <el-tabs tab-position=\"left\" style=\"height: 430px\" class=\"dk-url-input-content\" @tab-change=\"onTabChange()\">\n <el-tab-pane v-for=\"(item, key) in _urlData\" :key=\"key\" :label=\"item.title\">\n <div style=\"padding: 10px\">\n <div v-if=\"item.type === 'table'\">\n <dk-url-input-table :item=\"item\" @on-choose-url=\"onChooseUrl\"></dk-url-input-table>\n </div>\n <div v-else-if=\"item.type === 'component'\">\n <component :is=\"item.componentName\" @on-choose-url=\"onChooseUrl\"></component>\n </div>\n <div v-else>\n <div v-if=\"item.lists?.length > 0\">\n <div v-for=\"(val, k) in item.lists\" :key=\"k\">\n <div v-if=\"val.list\">\n <div style=\"padding-bottom: 10px; font-weight: 700; color: #000\">\n {{ val.title }}\n </div>\n <div class=\"url-list\">\n <div\n v-for=\"(v, k) in val.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == v.url ? 'choose' : ''\"\n @click=\"chooseUrl = v.url\"\n >\n {{ v.title }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"url-list\">\n <div\n v-for=\"(val, k) in item.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == val.url ? 'choose' : ''\"\n @click=\"chooseUrl = val.url\"\n >\n {{ val.title }}\n </div>\n </div>\n </div>\n </div>\n </el-tab-pane>\n <el-tab-pane label=\"自定义链接\">\n <div style=\"width: 500px; margin: 100px auto\">\n <div v-if=\"
|
1
|
+
{"version":3,"file":"url-input-content.vue2.mjs","sources":["../../../src/url-input/src/url-input-content.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInputContent',\n});\n</script>\n<template>\n <el-tabs tab-position=\"left\" style=\"height: 430px\" class=\"dk-url-input-content\" @tab-change=\"onTabChange()\">\n <el-tab-pane v-for=\"(item, key) in _urlData\" :key=\"key\" :label=\"item.title\">\n <div style=\"padding: 10px\">\n <div v-if=\"item.type === 'table'\">\n <dk-url-input-table :item=\"item\" @on-choose-url=\"onChooseUrl\"></dk-url-input-table>\n </div>\n <div v-else-if=\"item.type === 'component'\">\n <component :is=\"item.componentName\" @on-choose-url=\"onChooseUrl\"></component>\n </div>\n <div v-else>\n <div v-if=\"item.lists?.length > 0\">\n <div v-for=\"(val, k) in item.lists\" :key=\"k\">\n <div v-if=\"val.list\">\n <div style=\"padding-bottom: 10px; font-weight: 700; color: #000\">\n {{ val.title }}\n </div>\n <div class=\"url-list\">\n <div\n v-for=\"(v, k) in val.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == v.url ? 'choose' : ''\"\n @click=\"chooseUrl = v.url\"\n >\n {{ v.title }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div v-else class=\"url-list\">\n <div\n v-for=\"(val, k) in item.list\"\n :key=\"k\"\n class=\"url-box\"\n :class=\"chooseUrl == val.url ? 'choose' : ''\"\n @click=\"chooseUrl = val.url\"\n >\n {{ val.title }}\n </div>\n </div>\n </div>\n </div>\n </el-tab-pane>\n <el-tab-pane label=\"自定义链接\">\n <div style=\"width: 500px; margin: 100px auto\">\n <div v-if=\"_jumpMinApp\" style=\"padding-bottom: 20px\">\n <el-radio-group v-model=\"urlType\" class=\"ml-4\">\n <el-radio :value=\"1\" size=\"large\">链接或路径</el-radio>\n <el-radio :value=\"2\" size=\"large\">跳转其他小程序</el-radio>\n </el-radio-group>\n </div>\n <el-form label-width=\"100px\" label-position=\"top\" size=\"default\">\n <div v-if=\"urlType === 1\">\n <el-form-item label=\"填写地址或路径\" required>\n <el-input v-model=\"chooseUrl\" size=\"default\" />\n </el-form-item>\n </div>\n <div v-else>\n <el-form-item label=\"填写小程序APPID\" required>\n <el-input v-model=\"minapp.appid\" size=\"default\" />\n </el-form-item>\n <el-form-item label=\"填写小程序路径\">\n <el-input v-model=\"minapp.path\" size=\"default\" />\n </el-form-item>\n </div>\n </el-form>\n </div>\n </el-tab-pane>\n </el-tabs>\n <div style=\"text-align: center\">\n <el-button size=\"default\" style=\"width: 200px\" type=\"primary\" :disabled=\"!chooseUrl\" @click=\"onSubmit()\">\n 确定\n </el-button>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { computed, reactive, ref, watch, inject } from 'vue'\nimport DkUrlInputTable from './url-input-table.vue'\n\n\nconst emit = defineEmits(['submit'])\n\nconst props = defineProps({\n urlData: {\n default: () => {\n return []\n },\n type: Array,\n },\n jumpMinApp: { default: false, type: Boolean },\n})\n\nconst urlInputData: any = inject('urlInputData', [])\n\nconst _urlData: any = computed(() => {\n console.log('urlData', props.urlData)\n if (props.urlData?.length > 0) {\n return props.urlData\n } else {\n return urlInputData.urlData\n }\n})\n\nconst _jumpMinApp = computed(() => {\n if (urlInputData.jumpMinApp !== undefined) {\n return urlInputData.jumpMinApp\n } else {\n return props.jumpMinApp\n }\n})\n\nconst minapp = reactive({\n appid: '',\n path: '',\n})\nconst chooseUrl = ref('')\nconst urlType = ref(1)\n\nconst onTabChange = () => {\n chooseUrl.value = ''\n}\n\nconst onChooseUrl = (url: any) => {\n chooseUrl.value = url\n}\n\nwatch(\n () => minapp,\n () => {\n if (minapp.appid) {\n chooseUrl.value = minapp.appid + '@' + minapp.path || '/'\n }\n },\n {\n deep: true,\n }\n)\n\nconst onSubmit = () => {\n emit('submit', chooseUrl.value)\n}\n</script>\n"],"names":["__MAC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KAAA;AAAA,MACE,MAAM,MAAA;AAAA,MACN,MAAM;AACJ,QAAA,IAAI,OAAO,KAAO,EAAA;AAChB,UAAA,SAAA,CAAU,KAAQ,GAAA,MAAA,CAAO,KAAQ,GAAA,GAAA,GAAM,OAAO,IAAQ,IAAA,GAAA,CAAA;AAAA,SACxD;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,WAAW,MAAM;AACrB,MAAK,IAAA,CAAA,QAAA,EAAU,UAAU,KAAK,CAAA,CAAA;AAAA,KAChC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
default: () => never[];
|
12
12
|
type: ArrayConstructor;
|
13
13
|
};
|
14
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "change")[], "input" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
15
|
modelValue: {
|
16
16
|
default: string;
|
17
17
|
type: StringConstructor;
|
@@ -25,7 +25,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
25
25
|
type: ArrayConstructor;
|
26
26
|
};
|
27
27
|
}>> & {
|
28
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
28
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
30
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
29
31
|
}, {
|
30
32
|
modelValue: string;
|
31
33
|
urlData: unknown[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, createBlock, createCommentVNode } from 'vue';
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, createBlock, createCommentVNode } from 'vue';
|
2
2
|
import DkUrlInputContent from './url-input-content.vue.mjs';
|
3
3
|
import { urlInputProps } from './props.mjs';
|
4
4
|
|
@@ -9,16 +9,25 @@ const __default__ = defineComponent({
|
|
9
9
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
10
10
|
...__default__,
|
11
11
|
props: urlInputProps,
|
12
|
-
emits: ["update:modelValue"],
|
12
|
+
emits: ["input", "update:modelValue", "change"],
|
13
13
|
setup(__props, { emit }) {
|
14
14
|
const props = __props;
|
15
15
|
const show = ref(false);
|
16
16
|
const url = ref(props.modelValue);
|
17
17
|
const updateUrl = (value) => {
|
18
|
+
console.log("url", url);
|
18
19
|
url.value = value;
|
19
20
|
emit("update:modelValue", value);
|
20
21
|
show.value = false;
|
21
22
|
};
|
23
|
+
watch(
|
24
|
+
() => url.value,
|
25
|
+
(val) => {
|
26
|
+
emit("update:modelValue", val);
|
27
|
+
emit("input", val);
|
28
|
+
emit("change", val);
|
29
|
+
}
|
30
|
+
);
|
22
31
|
return (_ctx, _cache) => {
|
23
32
|
const _component_el_button = resolveComponent("el-button");
|
24
33
|
const _component_el_input = resolveComponent("el-input");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"url-input.vue2.mjs","sources":["../../../src/url-input/src/url-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInput',\n});\n</script>\n<template>\n <div class=\"dk-url-input\">\n <el-input v-model=\"url\">\n <template #append>\n <el-button @click=\"show = true\">选择</el-button>\n </template>\n </el-input>\n <dk-dialog v-model=\"show\" title=\"选择链接\" width=\"1000px\" append-to-body>\n <DkUrlInputContent\n v-if=\"show\"\n :url-data=\"urlData\"\n :jump-min-app=\"jumpMinApp\"\n @submit=\"updateUrl\"\n ></DkUrlInputContent>\n </dk-dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport DkUrlInputContent from './url-input-content.vue'\nimport { urlInputProps } from './props'\n\n\nconst show = ref(false)\n\nconst props = defineProps(urlInputProps)\n\nconst emit = defineEmits(['update:modelValue'])\nconst url = ref(props.modelValue)\nconst updateUrl = (value: string) => {\n url.value = value\n emit('update:modelValue', value)\n show.value = false\n}\n</script>\n\n<style></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,YAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0BD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AAKtB,IAAM,MAAA,GAAA,GAAM,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAChC,IAAM,MAAA,SAAA,GAAY,CAAC,KAAkB,KAAA;AACnC,MAAA,GAAA,CAAI,KAAQ,GAAA,KAAA,CAAA;AACZ,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"url-input.vue2.mjs","sources":["../../../src/url-input/src/url-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUrlInput',\n});\n</script>\n<template>\n <div class=\"dk-url-input\">\n <el-input v-model=\"url\">\n <template #append>\n <el-button @click=\"show = true\">选择</el-button>\n </template>\n </el-input>\n <dk-dialog v-model=\"show\" title=\"选择链接\" width=\"1000px\" append-to-body>\n <DkUrlInputContent\n v-if=\"show\"\n :url-data=\"urlData\"\n :jump-min-app=\"jumpMinApp\"\n @submit=\"updateUrl\"\n ></DkUrlInputContent>\n </dk-dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue'\nimport DkUrlInputContent from './url-input-content.vue'\nimport { urlInputProps } from './props'\n\n\nconst show = ref(false)\n\nconst props = defineProps(urlInputProps)\n\nconst emit = defineEmits(['input', 'update:modelValue', 'change'])\nconst url = ref(props.modelValue)\nconst updateUrl = (value: string) => {\n console.log('url', url)\n url.value = value\n emit('update:modelValue', value)\n show.value = false\n}\n\nwatch(\n () => url.value,\n (val) => {\n emit('update:modelValue', val)\n emit('input', val)\n emit('change', val)\n }\n)\n</script>\n\n<style></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,YAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA0BD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AAKtB,IAAM,MAAA,GAAA,GAAM,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAChC,IAAM,MAAA,SAAA,GAAY,CAAC,KAAkB,KAAA;AACnC,MAAQ,OAAA,CAAA,GAAA,CAAI,OAAO,GAAG,CAAA,CAAA;AACtB,MAAA,GAAA,CAAI,KAAQ,GAAA,KAAA,CAAA;AACZ,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AAAA,KACf,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,GAAI,CAAA,KAAA;AAAA,MACV,CAAC,GAAQ,KAAA;AACP,QAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAC7B,QAAA,IAAA,CAAK,SAAS,GAAG,CAAA,CAAA;AACjB,QAAA,IAAA,CAAK,UAAU,GAAG,CAAA,CAAA;AAAA,OACpB;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-box-input.vue2.js","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover ref=\"popover\" placement=\"bottom\" title=\"说明\" :width=\"280\" trigger=\"hover\" :content=\"props.help\">\n <template #reference>\n <dk-icon icon=\"QuestionFilled\" class=\"m-l-5px vertical-text-top\"></dk-icon>\n </template>\n </el-popover>\n </label>\n <!-- <div class=\"float-right cursor-pointer\">-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置高宽\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('widthHeight')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置内边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-success)\" @click=\"onRefresh('padding')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-warning)\" @click=\"onRefresh('margin')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- </div>-->\n <div ref=\"box\" tabindex=\"0\" class=\"wrapper\" style=\"margin-top: 10px\" :style=\"{ height: height + 'px' }\">\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div style=\"position: absolute; display: none; width: 100%; height: 100%\"></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.margin ? '#f00' : '#303133'\"\n @click=\"onBind('margin')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('margin')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.padding ? '#f00' : '#303133'\"\n @click=\"onBind('padding')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip\n :show-after=\"1000\"\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置内边距\"\n placement=\"top-start\"\n >\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('padding')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span class=\"content-unit left-0\" @dblclick=\"onDblclick('width', 9)\">\n <em>{{ getValue(styles['width']) }}</em>\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span class=\"content-unit right-0\" @dblclick=\"onDblclick('height', 9)\">\n <em>{{ getValue(styles['height']) }}</em>\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch, computed } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst box: any = ref(null)\nconst { width } = useElementSize(box) // 当前组件宽度\nconst bind: any = reactive({\n padding: false,\n margin: false,\n size: false,\n})\nconst height: any = computed(() => {\n if (props.height === 'auto') {\n const h = width.value / 1.8\n return h > 300 ? 300 : h\n } else {\n return props.height\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (axis: 'x' | 'y', position: 'top' | 'bottom' | 'left' | 'right') => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n\n if (bind[type]) {\n styles[type + 'Top'] = styles[value]\n styles[type + 'Bottom'] = styles[value]\n styles[type + 'Left'] = styles[value]\n styles[type + 'Right'] = styles[value]\n }\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n // const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (cursor: string, left: string, top: string, width: string, height: string) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height.value * 0.5 * multiples[type] + 'px',\n '0.1px',\n height.value * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n if (value.indexOf('padding') == 0 && bind.padding) {\n styles.paddingTop = styles[value]\n styles.paddingRight = styles[value]\n styles.paddingBottom = styles[value]\n styles.paddingLeft = styles[value]\n }\n if (value.indexOf('margin') == 0 && bind.padding) {\n styles.marginTop = styles[value]\n styles.marginRight = styles[value]\n styles.marginBottom = styles[value]\n styles.marginLeft = styles[value]\n }\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n\nconst onBind = (type: string) => {\n bind[type] = !bind[type]\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","ref","useElementSize","computed","watch","upper","width","height","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAkND,IAAA,MAAM,QAAaC,YAAS,CAAA;AAAA,MAC1B,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA,KAAA;AAAA,MACT,WAAa,EAAA,KAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,aAAaA,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAcA,OAAI,EAAA,CAAA;AAExB,IAAA,MAAM,SAAcD,YAAS,CAAA;AAAA,MAC3B,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,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;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"style-box-input.vue2.js","sources":["../../../src/style-box-input/src/style-box-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleBoxInput',\n});\n</script>\n<template>\n <div class=\"dk-style-box-input\">\n <div class=\"position-line\" :style=\"positionStyle\"></div>\n <div class=\"header\">\n <label class=\"items-center\">\n 内外边距 | 高宽\n <el-popover ref=\"popover\" placement=\"bottom\" title=\"说明\" :width=\"280\" trigger=\"hover\" :content=\"props.help\">\n <template #reference>\n <dk-icon icon=\"QuestionFilled\" class=\"m-l-5px vertical-text-top\"></dk-icon>\n </template>\n </el-popover>\n </label>\n <!-- <div class=\"float-right cursor-pointer\">-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置高宽\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('widthHeight')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置内边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-success)\" @click=\"onRefresh('padding')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- <div class=\"name-header-operations\">-->\n <!-- <el-tooltip class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">-->\n <!-- <dk-icon icon=\"Refresh\" color=\"var(--el-color-warning)\" @click=\"onRefresh('margin')\"></dk-icon>-->\n <!-- </el-tooltip>-->\n <!-- </div>-->\n <!-- </div>-->\n <div ref=\"box\" tabindex=\"0\" class=\"wrapper\" style=\"margin-top: 10px\" :style=\"{ height: height + 'px' }\">\n <div\n class=\"thumnail margin\"\n :class=\"moves.margin ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('margin', 'move', $event)\"\n @mouseleave=\"onMouseMove('margin', 'leave', $event)\"\n >\n <!--外边距 Margin-->\n <div>\n <div v-for=\"(item, key) in margins\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div style=\"position: absolute; display: none; width: 100%; height: 100%\"></div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('margin', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 外边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.margin ? '#f00' : '#303133'\"\n @click=\"onBind('margin')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"重置外边距\" placement=\"top-start\">\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('margin')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--外边距 Margin END-->\n\n <!--内边距 Padding-->\n <div class=\"thumnail border\">\n <div\n class=\"thumnail padding\"\n :class=\"moves.padding ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('padding', 'move', $event)\"\n @mouseleave=\"onMouseMove('padding', 'leave', $event)\"\n >\n <div>\n <div v-for=\"(item, key) in paddings\" :key=\"key\">\n <span\n :title=\"item.title\"\n :class=\"`anchor-tip-${item.position} value-indicator`\"\n @dblclick=\"onDblclick(item.value, key + 4)\"\n >\n <span> {{ getValue(styles[item.value]) }}</span>\n </span>\n <input\n ref=\"inputField\"\n v-model=\"styles[item.value]\"\n :class=\"'input-box anchor-tip-' + item.position + (showStyles[item.value] ? ' show' : '')\"\n @blur=\"onBlur(item.value)\"\n />\n <svg\n :width=\"item.svg.width\"\n :height=\"item.svg.height\"\n :viewBox=\"item.svg.viewBox\"\n preserveAspectRatio=\"none\"\n :data-link-anchor=\"item.value\"\n :style=\"item.svg.style\"\n class=\"esm-modal-svg\"\n v-html=\"item.svg.content\"\n ></svg>\n </div>\n </div>\n <div class=\"anchor-wrapper\">\n <div\n v-for=\"(item, key) in ['left', 'right', 'top', 'bottom']\"\n :key=\"key\"\n class=\"anchor\"\n :class=\"'anchor-' + item\"\n @mousemove=\"handleMouseMove\"\n @mousedown=\"handleMouseDown('padding', item, $event)\"\n @mouseup=\"handleMouseUp\"\n ></div>\n </div>\n <span class=\"title\"> 内边距 </span>\n <div class=\"tools\">\n <el-tooltip :show-after=\"1000\" class=\"box-item\" effect=\"dark\" content=\"联动\" placement=\"top-start\">\n <dk-icon\n style=\"margin-right: 5px\"\n icon=\"Connection\"\n :color=\"bind.padding ? '#f00' : '#303133'\"\n @click=\"onBind('padding')\"\n ></dk-icon>\n </el-tooltip>\n <el-tooltip\n :show-after=\"1000\"\n class=\"box-item\"\n effect=\"dark\"\n content=\"重置内边距\"\n placement=\"top-start\"\n >\n <dk-icon icon=\"Refresh\" color=\"#303133\" @click=\"onRefresh('padding')\"></dk-icon>\n </el-tooltip>\n </div>\n <!--内边距 END-->\n <div\n class=\"thumnail width-height\"\n :class=\"moves.widthHeight ? 'thumnail-heightlight' : ''\"\n @mousemove=\"onMouseMove('widthHeight', 'move', $event)\"\n @mouseleave=\"onMouseMove('widthHeight', 'leave', $event)\"\n >\n <span class=\"title\">\n <span class=\"content-unit left-0\" @dblclick=\"onDblclick('width', 9)\">\n <em>{{ getValue(styles['width']) }}</em>\n </span>\n <input\n ref=\"inputWidth\"\n v-model=\"styles.width\"\n class=\"input-box absolute left-5% top-10px\"\n :class=\"showStyles['width'] ? ' show' : ''\"\n @blur=\"onBlur('width')\"\n />\n <span> x </span>\n <span class=\"content-unit right-0\" @dblclick=\"onDblclick('height', 9)\">\n <em>{{ getValue(styles['height']) }}</em>\n </span>\n <input\n ref=\"inputHeight\"\n v-model=\"styles.height\"\n class=\"input-box absolute right-5% top-10px\"\n :class=\"showStyles['height'] ? ' show' : ''\"\n @blur=\"onBlur('height')\"\n />\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleBoxInputProps } from './props'\nimport { nextTick, reactive, ref, watch, computed } from 'vue'\nimport { margins, paddings } from './html'\nimport { upper } from '@vipl520/utils'\nimport { useElementSize } from '@vueuse/core'\n\n\n\nconst props = defineProps(styleBoxInputProps)\n\nconst moves: any = reactive({\n margin: false,\n padding: false,\n widthHeight: false,\n})\n\nconst inputField = ref()\nconst inputWidth = ref()\nconst inputHeight = ref()\n\nconst styles: any = reactive({\n marginLeft: props.modelValue.marginLeft || '',\n marginRight: props.modelValue.marginRight || '',\n marginTop: props.modelValue.marginTop || '',\n marginBottom: props.modelValue.marginBottom || '',\n paddingLeft: props.modelValue.paddingLeft || '',\n paddingRight: props.modelValue.paddingRight || '',\n paddingTop: props.modelValue.paddingTop || '',\n paddingBottom: props.modelValue.paddingBottom || '',\n width: props.modelValue.width || '',\n height: props.modelValue.height || '',\n})\nconst emit = defineEmits(['update:modelValue', 'change'])\n\nconst box: any = ref(null)\nconst { width } = useElementSize(box) // 当前组件宽度\nconst bind: any = reactive({\n padding: false,\n margin: false,\n size: false,\n})\nconst height: any = computed(() => {\n if (props.height === 'auto') {\n const h = width.value / 1.8\n return h > 200 ? 200 : h\n } else {\n return props.height\n }\n})\n\nwatch(\n () => props.modelValue,\n (newVal, oldVal) => {\n const propertiesToWatch = [\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'width',\n 'height',\n ]\n propertiesToWatch.forEach((property) => {\n if (newVal[property] !== oldVal[property]) {\n styles[property] = newVal[property] || ''\n }\n })\n },\n { deep: true }\n)\n\nwatch(styles, () => {\n // 过滤 styles 中值为''\n const _styles = Object.keys(styles).reduce((acc: any, key) => {\n if (styles[key] !== '') {\n acc[key] = styles[key]\n }\n return acc\n }, {})\n emit('update:modelValue', _styles)\n emit('change', _styles)\n})\n\nconst showStyles: any = reactive({\n marginLeft: false,\n marginRight: false,\n marginTop: false,\n marginBottom: false,\n paddingLeft: false,\n paddingRight: false,\n paddingTop: false,\n paddingBottom: false,\n width: false,\n height: false,\n})\n\nconst dragging = ref(false)\nconst startPosition: any = reactive({\n x: 0,\n y: 0,\n})\n\nconst trackMouseBound: any = ref(null)\nconst stopChangeBound: any = ref(null)\nconst dragPosition = reactive({\n type: '',\n position: '',\n})\nconst positionStyle: any = reactive({\n display: 'none',\n width: '0px',\n height: '0px',\n left: '0px',\n top: '0px',\n})\n\nconst handleMouseMove = (event: any) => {\n // 处理鼠标移动事件\n if (!dragging.value) return\n\n const p = dragPosition.position\n const type = dragPosition.type\n const value = type + upper(p)\n\n const updateStyle = (axis: 'x' | 'y', position: 'top' | 'bottom' | 'left' | 'right') => {\n const clientAxis = axis === 'x' ? 'clientX' : 'clientY'\n positionStyle[position] = event[clientAxis] + 'px'\n\n let difference = event[clientAxis] - startPosition[axis]\n if (p === 'top' || p === 'left') {\n difference = -difference\n }\n styles[value] = (parseInt(styles[value]) || 0) + difference + 'px'\n\n if (bind[type]) {\n styles[type + 'Top'] = styles[value]\n styles[type + 'Bottom'] = styles[value]\n styles[type + 'Left'] = styles[value]\n styles[type + 'Right'] = styles[value]\n }\n startPosition[axis] = event[clientAxis]\n }\n\n if (p === 'left' || p === 'right') {\n // 说明是左右移动\n updateStyle('x', 'left')\n } else if (p === 'top' || p === 'bottom') {\n updateStyle('y', 'top')\n }\n}\n\nconst handleMouseDown = (type: string, position: string, event: any) => {\n // 处理鼠标按下事件\n Object.assign(dragPosition, { position, type })\n trackMouseBound.value = handleMouseMove.bind(event)\n document.addEventListener('mousemove', trackMouseBound.value)\n stopChangeBound.value = handleMouseUp.bind(event)\n document.addEventListener('mouseup', stopChangeBound.value)\n dragging.value = true\n\n // const height = props.height\n const wrapperElement: any = document.querySelector('.wrapper')\n const width = wrapperElement ? wrapperElement.offsetWidth : 0\n const multiples: any = {\n margin: 0.9,\n padding: 0.9 * 0.7,\n }\n\n const { clientX, clientY } = event\n\n const setCursorAndDimensions = (cursor: string, left: string, top: string, width: string, height: string) => {\n document.body.style.cursor = cursor\n Object.assign(positionStyle, { left, top, width, height, display: 'block' })\n }\n\n startPosition.x = clientX\n startPosition.y = clientY\n\n if (position === 'left' || position === 'right') {\n setCursorAndDimensions(\n 'ew-resize',\n clientX + 'px',\n clientY - height.value * 0.5 * multiples[type] + 'px',\n '0.1px',\n height.value * multiples[type] + 'px'\n )\n } else {\n setCursorAndDimensions(\n 'ns-resize',\n clientX - width * 0.5 * multiples[type] + 'px',\n clientY + 'px',\n width * multiples[type] + 'px',\n '0.1px'\n )\n }\n}\n\nconst handleMouseUp = () => {\n // 处理鼠标抬起事件\n document.removeEventListener('mousemove', trackMouseBound.value)\n document.removeEventListener('mouseup', stopChangeBound.value)\n dragging.value = false\n positionStyle.display = 'none'\n document.body.style.cursor = 'default'\n startPosition.x = null\n startPosition.y = null\n}\n\nconst onMouseMove = (value: string, type: string = 'move', event: any) => {\n if (!dragging.value) {\n event.stopPropagation()\n }\n if (type !== 'move') {\n moves[value] = false\n } else {\n // 其他的为false\n Object.keys(moves).forEach((key) => {\n if (key !== value) {\n moves[key] = false\n }\n })\n // 当前的为true\n moves[value] = true\n }\n}\n\nconst onDblclick = (value: any, key: number) => {\n showStyles[value] = true\n nextTick(() => {\n if (value === 'width') {\n inputWidth.value.focus()\n } else if (value === 'height') {\n inputHeight.value.focus()\n } else {\n inputField.value[key].focus()\n }\n })\n}\n\nconst getValue = (value: any) => {\n // 判断value结尾是否存在px、vh、%、rem等\n if (value === 'auto') {\n return value\n }\n if (value === '0' || value === 0) {\n return 0\n }\n if (value === '') {\n return '-'\n }\n return value\n}\n\nconst onBlur = (value: any) => {\n showStyles[value] = false\n // styles[value] 这是一个css的值,用户会自己填写,内容不确定,但是我希望是:数字+单位,单位为:px/rem/%/vh这些,如果不是的话,则默认为px\n if (styles[value] === '' || styles[value] === 'auto') {\n return\n }\n const validValueRegex = /^(\\d*\\.?\\d+)(px|rem|%|vh)$/\n // 检查value是否匹配有效单位,如果不匹配则默认为px\n if (!validValueRegex.test(styles[value])) {\n const number = parseInt(styles[value])\n if (isNaN(number)) {\n styles[value] = ''\n } else {\n styles[value] = number + 'px'\n if (value.indexOf('padding') == 0 && bind.padding) {\n styles.paddingTop = styles[value]\n styles.paddingRight = styles[value]\n styles.paddingBottom = styles[value]\n styles.paddingLeft = styles[value]\n }\n if (value.indexOf('margin') == 0 && bind.padding) {\n styles.marginTop = styles[value]\n styles.marginRight = styles[value]\n styles.marginBottom = styles[value]\n styles.marginLeft = styles[value]\n }\n }\n }\n}\n\nconst onRefresh = (type: string) => {\n if (type === 'widthHeight') {\n styles.width = ''\n styles.height = ''\n } else if (type === 'margin') {\n styles.marginLeft = ''\n styles.marginRight = ''\n styles.marginTop = ''\n styles.marginBottom = ''\n } else if (type === 'padding') {\n styles.paddingLeft = ''\n styles.paddingRight = ''\n styles.paddingTop = ''\n styles.paddingBottom = ''\n }\n}\n\nconst onBind = (type: string) => {\n bind[type] = !bind[type]\n}\n</script>\n"],"names":["__MACROS_defineComponent","reactive","ref","useElementSize","computed","watch","upper","width","height","nextTick"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,iBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAkND,IAAA,MAAM,QAAaC,YAAS,CAAA;AAAA,MAC1B,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA,KAAA;AAAA,MACT,WAAa,EAAA,KAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAA,MAAM,aAAaC,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,aAAaA,OAAI,EAAA,CAAA;AACvB,IAAA,MAAM,cAAcA,OAAI,EAAA,CAAA;AAExB,IAAA,MAAM,SAAcD,YAAS,CAAA;AAAA,MAC3B,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,SAAA,EAAW,KAAM,CAAA,UAAA,CAAW,SAAa,IAAA,EAAA;AAAA,MACzC,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,MAC/C,WAAA,EAAa,KAAM,CAAA,UAAA,CAAW,WAAe,IAAA,EAAA;AAAA,MAC7C,YAAA,EAAc,KAAM,CAAA,UAAA,CAAW,YAAgB,IAAA,EAAA;AAAA,MAC/C,UAAA,EAAY,KAAM,CAAA,UAAA,CAAW,UAAc,IAAA,EAAA;AAAA,MAC3C,aAAA,EAAe,KAAM,CAAA,UAAA,CAAW,aAAiB,IAAA,EAAA;AAAA,MACjD,KAAA,EAAO,KAAM,CAAA,UAAA,CAAW,KAAS,IAAA,EAAA;AAAA,MACjC,MAAA,EAAQ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,YAAe,GAAA,EAAA,CAAA;AAAA,OACxB,MAAA,IAAW,SAAS,SAAW,EAAA;AAC7B,QAAA,MAAA,CAAO,WAAc,GAAA,EAAA,CAAA;AACrB,QAAA,MAAA,CAAO,YAAe,GAAA,EAAA,CAAA;AACtB,QAAA,MAAA,CAAO,UAAa,GAAA,EAAA,CAAA;AACpB,QAAA,MAAA,CAAO,aAAgB,GAAA,EAAA,CAAA;AAAA,OACzB;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,MAAA,GAAS,CAAC,IAAiB,KAAA;AAC/B,MAAA,IAAA,CAAK,IAAI,CAAA,GAAI,CAAC,IAAA,CAAK,IAAI,CAAA,CAAA;AAAA,KACzB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/url-input/index.d.ts
CHANGED
@@ -11,7 +11,7 @@ export declare const UrlInput: import("@vipl520/utils").WithInstall<import("vue"
|
|
11
11
|
default: () => never[];
|
12
12
|
type: ArrayConstructor;
|
13
13
|
};
|
14
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
14
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("input" | "update:modelValue" | "change")[], "input" | "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
15
|
modelValue: {
|
16
16
|
default: string;
|
17
17
|
type: StringConstructor;
|
@@ -25,7 +25,9 @@ export declare const UrlInput: import("@vipl520/utils").WithInstall<import("vue"
|
|
25
25
|
type: ArrayConstructor;
|
26
26
|
};
|
27
27
|
}>> & {
|
28
|
+
onInput?: ((...args: any[]) => any) | undefined;
|
28
29
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
30
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
29
31
|
}, {
|
30
32
|
modelValue: string;
|
31
33
|
urlData: unknown[];
|