build-dxf 0.1.40 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/NumberEditor.vue.d.ts +3 -1
- package/src/index.css +9 -9
- package/src/index3.js +58 -25
package/package.json
CHANGED
|
@@ -27,5 +27,7 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
27
27
|
showMax: boolean;
|
|
28
28
|
showMin: boolean;
|
|
29
29
|
showConfirm: boolean;
|
|
30
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
31
|
+
inputElRef: HTMLDivElement;
|
|
32
|
+
}, HTMLDivElement>;
|
|
31
33
|
export default _default;
|
package/src/index.css
CHANGED
|
@@ -1116,27 +1116,27 @@
|
|
|
1116
1116
|
-webkit-tap-highlight-color: transparent;
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
|
-
ul li[data-v-
|
|
1119
|
+
ul li[data-v-589e7961]{
|
|
1120
1120
|
background: white;
|
|
1121
1121
|
line-height: 38px;
|
|
1122
1122
|
text-align: center;
|
|
1123
1123
|
border-radius: 6px;
|
|
1124
1124
|
}
|
|
1125
|
-
ul li[data-v-
|
|
1125
|
+
ul li[data-v-589e7961]:active {
|
|
1126
1126
|
background: #eee;
|
|
1127
1127
|
}
|
|
1128
|
-
.confirm[data-v-
|
|
1128
|
+
.confirm[data-v-589e7961] {
|
|
1129
1129
|
background: var(--primary-color);
|
|
1130
1130
|
color: #fff;
|
|
1131
1131
|
}
|
|
1132
|
-
.confirm[data-v-
|
|
1132
|
+
.confirm[data-v-589e7961]:active {
|
|
1133
1133
|
filter: grayscale(0.4);
|
|
1134
1134
|
background: var(--primary-color);
|
|
1135
1135
|
}
|
|
1136
|
-
.flashing-ani[data-v-
|
|
1137
|
-
animation: flashing-
|
|
1136
|
+
.flashing-ani[data-v-589e7961] {
|
|
1137
|
+
animation: flashing-589e7961 1s linear infinite;
|
|
1138
1138
|
}
|
|
1139
|
-
button[data-v-
|
|
1139
|
+
button[data-v-589e7961] {
|
|
1140
1140
|
padding: 4px 10px;
|
|
1141
1141
|
border: none;
|
|
1142
1142
|
border-radius: 6px;
|
|
@@ -1144,10 +1144,10 @@ button[data-v-f2bc3db4] {
|
|
|
1144
1144
|
background: var(--primary-color);
|
|
1145
1145
|
font-size: 12px;
|
|
1146
1146
|
}
|
|
1147
|
-
button[data-v-
|
|
1147
|
+
button[data-v-589e7961]:active {
|
|
1148
1148
|
filter: grayscale(0.4);
|
|
1149
1149
|
}
|
|
1150
|
-
@keyframes flashing-
|
|
1150
|
+
@keyframes flashing-589e7961 {
|
|
1151
1151
|
0% {
|
|
1152
1152
|
opacity: 1;
|
|
1153
1153
|
}
|
package/src/index3.js
CHANGED
|
@@ -9881,8 +9881,11 @@ function createHtml(tagName, options) {
|
|
|
9881
9881
|
parent && parent.appendChild(element);
|
|
9882
9882
|
return element;
|
|
9883
9883
|
}
|
|
9884
|
-
const _hoisted_1$3 = { class: "
|
|
9885
|
-
const _hoisted_2$2 = {
|
|
9884
|
+
const _hoisted_1$3 = { class: "flex items-center flex-1" };
|
|
9885
|
+
const _hoisted_2$2 = {
|
|
9886
|
+
key: 0,
|
|
9887
|
+
class: "flashing-ani flex justify-center items-center"
|
|
9888
|
+
};
|
|
9886
9889
|
const _hoisted_3$2 = {
|
|
9887
9890
|
key: 0,
|
|
9888
9891
|
class: "m-[10px_0px] flex gap-[20px]"
|
|
@@ -9912,6 +9915,22 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9912
9915
|
}),
|
|
9913
9916
|
emits: /* @__PURE__ */ mergeModels(["confirm", "cancel", "max", "min"], ["update:modelValue"]),
|
|
9914
9917
|
setup(__props, { emit: __emit }) {
|
|
9918
|
+
const keys2 = new Array(10).fill(10).map((_, i) => String(i));
|
|
9919
|
+
function onKeydown(e) {
|
|
9920
|
+
if (keys2.includes(e.key)) {
|
|
9921
|
+
value.value += e.key;
|
|
9922
|
+
} else if (e.key === "Backspace") {
|
|
9923
|
+
value.value = value.value.slice(0, value.value.length - 1);
|
|
9924
|
+
} else if (e.key === "Enter" && props.showCancel) {
|
|
9925
|
+
emits("confirm", Number(value.value));
|
|
9926
|
+
} else if (e.key === "Delete") {
|
|
9927
|
+
value.value = "";
|
|
9928
|
+
} else if (e.key === "Escape" && props.showCancel) {
|
|
9929
|
+
emits("cancel");
|
|
9930
|
+
}
|
|
9931
|
+
e.stopPropagation();
|
|
9932
|
+
}
|
|
9933
|
+
const props = __props;
|
|
9915
9934
|
const value = useModel(__props, "modelValue", {
|
|
9916
9935
|
get(v) {
|
|
9917
9936
|
if (typeof v === "number") v = v + "";
|
|
@@ -9922,6 +9941,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9922
9941
|
}
|
|
9923
9942
|
});
|
|
9924
9943
|
const emits = __emit;
|
|
9944
|
+
const isFocus = ref(false);
|
|
9945
|
+
const inputElRef = ref();
|
|
9946
|
+
onMounted(() => {
|
|
9947
|
+
setTimeout(() => inputElRef.value?.focus(), 100);
|
|
9948
|
+
});
|
|
9925
9949
|
return (_ctx, _cache) => {
|
|
9926
9950
|
return openBlock(), createElementBlock("div", {
|
|
9927
9951
|
class: "bg-[whitesmoke] p-[10px]",
|
|
@@ -9929,69 +9953,77 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9929
9953
|
fontSize: unref(isMobileRef) ? "18px" : "12px"
|
|
9930
9954
|
})
|
|
9931
9955
|
}, [
|
|
9932
|
-
createElementVNode("div",
|
|
9933
|
-
|
|
9956
|
+
createElementVNode("div", {
|
|
9957
|
+
ref_key: "inputElRef",
|
|
9958
|
+
ref: inputElRef,
|
|
9959
|
+
onKeydown,
|
|
9960
|
+
onFocus: _cache[0] || (_cache[0] = ($event) => isFocus.value = true),
|
|
9961
|
+
onBlur: _cache[1] || (_cache[1] = ($event) => isFocus.value = false),
|
|
9962
|
+
tabindex: "1",
|
|
9963
|
+
class: "outline-0 w-full p-[5px] rounded-[6px] box-border border-0 bg-white leading-[30px] flex"
|
|
9964
|
+
}, [
|
|
9965
|
+
createElementVNode("p", _hoisted_1$3, [
|
|
9934
9966
|
createTextVNode(toDisplayString(value.value || "0"), 1),
|
|
9935
|
-
|
|
9967
|
+
isFocus.value ? (openBlock(), createElementBlock("span", _hoisted_2$2, "▏")) : createCommentVNode("", true)
|
|
9936
9968
|
]),
|
|
9937
|
-
_cache[
|
|
9938
|
-
]),
|
|
9969
|
+
_cache[18] || (_cache[18] = createElementVNode("p", null, "mm", -1))
|
|
9970
|
+
], 544),
|
|
9939
9971
|
_ctx.showMin || _ctx.showMax ? (openBlock(), createElementBlock("p", _hoisted_3$2, [
|
|
9940
9972
|
_ctx.showMax ? (openBlock(), createElementBlock("button", {
|
|
9941
9973
|
key: 0,
|
|
9942
|
-
onClick: _cache[
|
|
9974
|
+
onClick: _cache[2] || (_cache[2] = ($event) => emits("max"))
|
|
9943
9975
|
}, "设置最大值")) : createCommentVNode("", true),
|
|
9944
9976
|
_ctx.showMin ? (openBlock(), createElementBlock("button", {
|
|
9945
9977
|
key: 1,
|
|
9946
|
-
onClick: _cache[
|
|
9978
|
+
onClick: _cache[3] || (_cache[3] = ($event) => emits("min"))
|
|
9947
9979
|
}, "设置最小值")) : createCommentVNode("", true)
|
|
9948
9980
|
])) : (openBlock(), createElementBlock("p", _hoisted_4$2)),
|
|
9949
9981
|
createElementVNode("ul", _hoisted_5$2, [
|
|
9950
9982
|
createElementVNode("li", {
|
|
9951
|
-
onClick: _cache[
|
|
9983
|
+
onClick: _cache[4] || (_cache[4] = ($event) => value.value += "1")
|
|
9952
9984
|
}, "1"),
|
|
9953
9985
|
createElementVNode("li", {
|
|
9954
|
-
onClick: _cache[
|
|
9986
|
+
onClick: _cache[5] || (_cache[5] = ($event) => value.value += "2")
|
|
9955
9987
|
}, "2"),
|
|
9956
9988
|
createElementVNode("li", {
|
|
9957
|
-
onClick: _cache[
|
|
9989
|
+
onClick: _cache[6] || (_cache[6] = ($event) => value.value += "3")
|
|
9958
9990
|
}, "3"),
|
|
9959
9991
|
createElementVNode("li", {
|
|
9960
|
-
onClick: _cache[
|
|
9992
|
+
onClick: _cache[7] || (_cache[7] = ($event) => value.value = "")
|
|
9961
9993
|
}, "清空"),
|
|
9962
9994
|
createElementVNode("li", {
|
|
9963
|
-
onClick: _cache[
|
|
9995
|
+
onClick: _cache[8] || (_cache[8] = ($event) => value.value += "4")
|
|
9964
9996
|
}, "4"),
|
|
9965
9997
|
createElementVNode("li", {
|
|
9966
|
-
onClick: _cache[
|
|
9998
|
+
onClick: _cache[9] || (_cache[9] = ($event) => value.value += "5")
|
|
9967
9999
|
}, "5"),
|
|
9968
10000
|
createElementVNode("li", {
|
|
9969
|
-
onClick: _cache[
|
|
10001
|
+
onClick: _cache[10] || (_cache[10] = ($event) => value.value += "6")
|
|
9970
10002
|
}, "6"),
|
|
9971
10003
|
createElementVNode("li", {
|
|
9972
|
-
onClick: _cache[
|
|
10004
|
+
onClick: _cache[11] || (_cache[11] = ($event) => value.value = value.value.slice(0, value.value.length - 1))
|
|
9973
10005
|
}, "✖"),
|
|
9974
10006
|
createElementVNode("li", {
|
|
9975
|
-
onClick: _cache[
|
|
10007
|
+
onClick: _cache[12] || (_cache[12] = ($event) => value.value += "7")
|
|
9976
10008
|
}, "7"),
|
|
9977
10009
|
createElementVNode("li", {
|
|
9978
|
-
onClick: _cache[
|
|
10010
|
+
onClick: _cache[13] || (_cache[13] = ($event) => value.value += "8")
|
|
9979
10011
|
}, "8"),
|
|
9980
10012
|
createElementVNode("li", {
|
|
9981
|
-
onClick: _cache[
|
|
10013
|
+
onClick: _cache[14] || (_cache[14] = ($event) => value.value += "9")
|
|
9982
10014
|
}, "9"),
|
|
9983
10015
|
_ctx.showConfirm ? (openBlock(), createElementBlock("li", {
|
|
9984
10016
|
key: 0,
|
|
9985
10017
|
class: "row-start-3 row-end-5 col-start-4 col-end-4 !leading-[88px] confirm",
|
|
9986
|
-
onClick: _cache[
|
|
10018
|
+
onClick: _cache[15] || (_cache[15] = ($event) => emits("confirm", Number(value.value)))
|
|
9987
10019
|
}, "确认")) : (openBlock(), createElementBlock("li", _hoisted_6$2)),
|
|
9988
10020
|
createElementVNode("li", {
|
|
9989
|
-
onClick: _cache[
|
|
10021
|
+
onClick: _cache[16] || (_cache[16] = ($event) => value.value += "0"),
|
|
9990
10022
|
class: "col-start-1 col-end-3"
|
|
9991
10023
|
}, "0"),
|
|
9992
10024
|
_ctx.showCancel ? (openBlock(), createElementBlock("li", {
|
|
9993
10025
|
key: 2,
|
|
9994
|
-
onClick: _cache[
|
|
10026
|
+
onClick: _cache[17] || (_cache[17] = ($event) => emits("cancel"))
|
|
9995
10027
|
}, "取消")) : (openBlock(), createElementBlock("li", _hoisted_7$2))
|
|
9996
10028
|
])
|
|
9997
10029
|
], 4);
|
|
@@ -10005,7 +10037,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
10005
10037
|
}
|
|
10006
10038
|
return target;
|
|
10007
10039
|
};
|
|
10008
|
-
const NumberEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
10040
|
+
const NumberEditor = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-589e7961"]]);
|
|
10009
10041
|
function createPromise() {
|
|
10010
10042
|
let resolve, reject;
|
|
10011
10043
|
const promise = new Promise((re, rt2) => {
|
|
@@ -11680,7 +11712,8 @@ class DrawLine extends CommandFlowComponent {
|
|
|
11680
11712
|
const len = Number((p2.distanceTo(p1) * 1e3).toFixed(0));
|
|
11681
11713
|
const value = await this.openWidthEditor({
|
|
11682
11714
|
defaultWidth: len,
|
|
11683
|
-
showCancel: true
|
|
11715
|
+
showCancel: true,
|
|
11716
|
+
minWidth: 100
|
|
11684
11717
|
});
|
|
11685
11718
|
const increment = p2.clone().sub(p1).normalize().multiplyScalar(value / 1e3);
|
|
11686
11719
|
p2.copy(p1).add(increment);
|