snail.vue 2.0.26 → 2.0.28
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/dist/snail.vue.d.ts +405 -364
- package/dist/snail.vue.js +82 -67
- package/dist/snail.vue.umd.js +81 -66
- package/dist/styles/snail.vue.vue.css +5 -5
- package/package.json +1 -1
package/dist/snail.vue.umd.js
CHANGED
|
@@ -42,13 +42,15 @@
|
|
|
42
42
|
case "close":
|
|
43
43
|
return ["M 571.733 512 l 187.733 -187.733 c 17.0667 -17.0667 17.0667 -42.6667 0 -59.7333 c -17.0667 -17.0667 -42.6667 -17.0667 -59.7333 0 L 512 452.267 L 324.267 268.8 c -17.0667 -17.0667 -42.6667 -17.0667 -59.7333 0 c -17.0667 17.0667 -17.0667 42.6667 0 59.7333 l 187.733 187.733 l -187.733 187.733 c -17.0667 17.0667 -17.0667 42.6667 0 59.7333 c 17.0667 17.0667 42.6667 17.0667 59.7333 0 l 187.733 -187.733 l 187.733 187.733 c 17.0667 17.0667 42.6667 17.0667 59.7333 0 c 17.0667 -17.0667 17.0667 -42.6667 0 -59.7333 L 571.733 512 Z"];
|
|
44
44
|
case "trash":
|
|
45
|
-
return ["
|
|
45
|
+
return ["M736 352.032L736.096 800h-0.128L288 799.968 288.032 352 736 352.032zM384 224h256v64h-256V224z m448 64h-128V202.624C704 182.048 687.232 160 640.16 160h-256.32C336.768 160 320 182.048 320 202.624V288H192a32 32 0 1 0 0 64h32V799.968C224 835.296 252.704 864 288.032 864h447.936A64.064 64.064 0 0 0 800 799.968V352h32a32 32 0 1 0 0-64z", "M608 690.56a32 32 0 0 0 32-32V448a32 32 0 1 0-64 0v210.56a32 32 0 0 0 32 32M416 690.56a32 32 0 0 0 32-32V448a32 32 0 1 0-64 0v210.56a32 32 0 0 0 32 32"];
|
|
46
46
|
case "download":
|
|
47
47
|
return ["M47.234 979.775v-210.45h102.303v70.151h724.874v-70.15h102.3v210.45H47.233zM149.54 359.948l242.595 0.175V44.451h242.6v309.827h242.6L517.821 734.253 149.539 359.948z"];
|
|
48
48
|
case "print":
|
|
49
49
|
return ["M896 256H128a96 96 0 0 0-96 96v256a96 96 0 0 0 96 96h32v-160h704v160h32a96 96 0 0 0 96-96v-256a96 96 0 0 0-96-96z m-67.52 208a64 64 0 1 1 64-64 64 64 0 0 1-64 64zM224 960a32 32 0 0 0 32 32h512a32 32 0 0 0 32-32V608H224zM800 96a35.2 35.2 0 0 0-35.52-32h-512A29.12 29.12 0 0 0 224 96v96h576z"];
|
|
50
50
|
case "edit":
|
|
51
51
|
return ["M 780.8 366.933 c 34.1333 -34.1333 34.1333 -93.8667 0 -128 c -38.4 -34.1333 -93.8667 -34.1333 -132.267 0 l -68.2667 68.2667 l 132.267 128 l 68.2667 -68.2667 Z M 541.867 349.867 l -277.333 277.333 L 213.333 806.4 l 179.2 -51.2 l 281.6 -277.333 Z M 469.333 768 h 341.333 v 42.6667 h -341.333 Z"];
|
|
52
|
+
case "pause":
|
|
53
|
+
return ["M716.805057 780.798397V243.199797c0-21.204979-17.196985-38.40377-38.40377-38.403771s-38.401964 17.196985-38.401964 38.403771v537.5986c0 21.204979 17.196985 38.392933 38.401964 38.392933s38.40377-17.187954 38.40377-38.392933zM384.000677 780.798397V243.199797c0-21.204979-17.187954-38.40377-38.391127-38.403771-21.215816 0-38.40377 17.196985-38.40377 38.403771v537.5986c0 21.204979 17.187954 38.392933 38.40377 38.392933 21.203173 0 38.391127-17.187954 38.391127-38.392933z"];
|
|
52
54
|
case "arrow":
|
|
53
55
|
return ["M651.3 514.2c0 8.2-3.1 16.4-9.4 22.6L426.4 752.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L574 514.2 381.1 321.4c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l215.5 215.5c6.2 6.3 9.4 14.5 9.4 22.6z"];
|
|
54
56
|
case "datepicker":
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
return ["M 768 469.333 h -213.333 V 256 c 0 -25.6 -17.0667 -42.6667 -42.6667 -42.6667 s -42.6667 17.0667 -42.6667 42.6667 v 213.333 H 256 c -25.6 0 -42.6667 17.0667 -42.6667 42.6667 s 17.0667 42.6667 42.6667 42.6667 h 213.333 v 213.333 c 0 25.6 17.0667 42.6667 42.6667 42.6667 s 42.6667 -17.0667 42.6667 -42.6667 v -213.333 h 213.333 c 25.6 0 42.6667 -17.0667 42.6667 -42.6667 s -17.0667 -42.6667 -42.6667 -42.6667 Z"];
|
|
60
62
|
case "subtract":
|
|
61
63
|
return ["M768 554.666667H256c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667h512c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666667z"];
|
|
64
|
+
case "more":
|
|
65
|
+
return ["M415.93 223.79c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.003-95.984-95.984zM415.93 511.742c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.004-95.984-95.984zM415.93 799.866c0-52.98 43.004-95.984 95.984-95.984s95.984 43.003 95.984 95.984-43.004 95.983-95.984 95.983-95.984-43.175-95.984-95.983z"];
|
|
62
66
|
case "grip":
|
|
63
67
|
return ["M 384 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 384 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 256 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 426.667 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 597.333 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z", "M 640 768 m -42.6667 0 a 42.6667 42.6667 0 1 0 85.3333 0 a 42.6667 42.6667 0 1 0 -85.3333 0 Z"];
|
|
64
68
|
default:
|
|
@@ -87,6 +91,10 @@
|
|
|
87
91
|
color: {},
|
|
88
92
|
hoverColor: {},
|
|
89
93
|
rotate: {},
|
|
94
|
+
opacity: {},
|
|
95
|
+
border: {},
|
|
96
|
+
radius: {},
|
|
97
|
+
background: {},
|
|
90
98
|
viewBox: {}
|
|
91
99
|
},
|
|
92
100
|
setup(__props) {
|
|
@@ -113,6 +121,11 @@
|
|
|
113
121
|
fill && (style.fill = fill);
|
|
114
122
|
const rotate = snail_core.correctNumber(props.rotate, 0);
|
|
115
123
|
rotate != 0 && (style.transform = `rotate(${rotate}deg)`);
|
|
124
|
+
const opacity = snail_core.correctNumber(props.opacity, void 0);
|
|
125
|
+
opacity >= 0 && (style.opacity = opacity);
|
|
126
|
+
style.border = snail_core.correctString(props.border, void 0, true);
|
|
127
|
+
style.borderRadius = snail_core.correctString(props.radius, void 0, true);
|
|
128
|
+
style.background = snail_core.correctString(props.background, void 0, true);
|
|
116
129
|
return style;
|
|
117
130
|
});
|
|
118
131
|
return (_ctx, _cache) => {
|
|
@@ -1592,10 +1605,7 @@
|
|
|
1592
1605
|
};
|
|
1593
1606
|
async function onWrapperConfirm() {
|
|
1594
1607
|
if (fn_onBuildData != void 0) {
|
|
1595
|
-
const rt =
|
|
1596
|
-
success: true,
|
|
1597
|
-
data: void 0
|
|
1598
|
-
};
|
|
1608
|
+
const rt = await snail_core.runAsync(fn_onBuildData);
|
|
1599
1609
|
console.log("onBuildData result:", rt);
|
|
1600
1610
|
rt.success !== false && closePopup(rt.data);
|
|
1601
1611
|
} else {
|
|
@@ -2790,7 +2800,11 @@
|
|
|
2790
2800
|
type: Boolean
|
|
2791
2801
|
},
|
|
2792
2802
|
trigger: {},
|
|
2793
|
-
actions: {}
|
|
2803
|
+
actions: {},
|
|
2804
|
+
followX: {},
|
|
2805
|
+
followY: {},
|
|
2806
|
+
spaceX: {},
|
|
2807
|
+
spaceY: {}
|
|
2794
2808
|
},
|
|
2795
2809
|
emits: ["trigger"],
|
|
2796
2810
|
setup(__props, _ref) {
|
|
@@ -2806,30 +2820,35 @@
|
|
|
2806
2820
|
onEvent
|
|
2807
2821
|
} = snail_view.useObserver();
|
|
2808
2822
|
const rootDom = vue.useTemplateRef("snail-action");
|
|
2809
|
-
|
|
2823
|
+
const popupScopeRef = vue.shallowRef(void 0);
|
|
2810
2824
|
let pressStartDate = void 0;
|
|
2825
|
+
const slotHandle = Object.freeze({
|
|
2826
|
+
isActived: () => popupScopeRef.value != void 0,
|
|
2827
|
+
trigger: () => onFollowShow(props.trigger == "long-press")
|
|
2828
|
+
});
|
|
2811
2829
|
async function onFollowShow(longPress) {
|
|
2812
|
-
if (
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
if (props.disabled != true) {
|
|
2817
|
-
popupScope = follow(rootDom.value, {
|
|
2830
|
+
if (popupScopeRef.value && popupScopeRef.value.destroyed != true) {
|
|
2831
|
+
popupScopeRef.value.destroy();
|
|
2832
|
+
} else if (props.disabled != true) {
|
|
2833
|
+
popupScopeRef.value = follow(rootDom.value, {
|
|
2818
2834
|
component: _sfc_main$h,
|
|
2819
2835
|
closeOnEscape: true,
|
|
2820
2836
|
closeOnMask: true,
|
|
2821
2837
|
closeOnResize: true,
|
|
2822
2838
|
closeOnTarget: true,
|
|
2823
|
-
followX:
|
|
2824
|
-
followY:
|
|
2839
|
+
followX: props.followX || ["center", "start", "end", "after", "before", "ratio"],
|
|
2840
|
+
followY: props.followY || ["after", "before", "center", "end", "start", "ratio"],
|
|
2841
|
+
spaceX: props.spaceX,
|
|
2842
|
+
spaceY: props.spaceY,
|
|
2825
2843
|
props: {
|
|
2826
2844
|
mode: "vertical",
|
|
2827
2845
|
actions: props.actions
|
|
2828
2846
|
}
|
|
2829
2847
|
});
|
|
2830
|
-
const code = await
|
|
2848
|
+
const code = await popupScopeRef.value;
|
|
2831
2849
|
snail_core.isStringNotEmpty(code) && emits("trigger", code);
|
|
2832
2850
|
}
|
|
2851
|
+
popupScopeRef.value = void 0;
|
|
2833
2852
|
}
|
|
2834
2853
|
function onMouseDown() {
|
|
2835
2854
|
if (props.trigger == "long-press" && pressStartDate == void 0) {
|
|
@@ -2842,7 +2861,7 @@
|
|
|
2842
2861
|
pressStartDate = void 0;
|
|
2843
2862
|
if (time >= 0.5) {
|
|
2844
2863
|
navigator.vibrate && navigator.vibrate(200);
|
|
2845
|
-
onFollowShow(
|
|
2864
|
+
onFollowShow();
|
|
2846
2865
|
}
|
|
2847
2866
|
}
|
|
2848
2867
|
}
|
|
@@ -2863,19 +2882,17 @@
|
|
|
2863
2882
|
}
|
|
2864
2883
|
});
|
|
2865
2884
|
return (_ctx, _cache) => {
|
|
2866
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$5, [vue.renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover"
|
|
2885
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$5, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))))]), __props.disabled != true && (__props.trigger == "hover" || __props.trigger == "always") ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2867
2886
|
key: 0,
|
|
2868
|
-
class: "
|
|
2887
|
+
class: vue.normalizeClass(["trigger-area", {
|
|
2888
|
+
hidden: __props.trigger == "hover"
|
|
2889
|
+
}])
|
|
2890
|
+
}, [vue.renderSlot(_ctx.$slots, "trigger", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotHandle))), () => [vue.createVNode(_sfc_main$E, {
|
|
2869
2891
|
button: "",
|
|
2870
|
-
|
|
2892
|
+
type: "more",
|
|
2871
2893
|
size: 16,
|
|
2872
|
-
onClick: _cache[0] || (_cache[0] = $event => onFollowShow(
|
|
2873
|
-
},
|
|
2874
|
-
default: vue.withCtx(() => [...(_cache[1] || (_cache[1] = [vue.createElementVNode("path", {
|
|
2875
|
-
d: "M415.93 223.79c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.003-95.984-95.984zM415.93 511.742c0-52.98 43.004-95.984 95.984-95.984s95.984 43.004 95.984 95.984-43.004 95.984-95.984 95.984-95.984-43.004-95.984-95.984zM415.93 799.866c0-52.98 43.004-95.984 95.984-95.984s95.984 43.003 95.984 95.984-43.004 95.983-95.984 95.983-95.984-43.175-95.984-95.983z"
|
|
2876
|
-
}, null, -1)]))]),
|
|
2877
|
-
_: 1
|
|
2878
|
-
})) : vue.createCommentVNode("", true)], 512);
|
|
2894
|
+
onClick: _cache[0] || (_cache[0] = $event => onFollowShow())
|
|
2895
|
+
})])], 2)) : vue.createCommentVNode("", true)], 512);
|
|
2879
2896
|
};
|
|
2880
2897
|
}
|
|
2881
2898
|
});
|
|
@@ -4006,18 +4023,18 @@
|
|
|
4006
4023
|
class: "tz-item",
|
|
4007
4024
|
ref: "hour-items"
|
|
4008
4025
|
};
|
|
4009
|
-
const _hoisted_2$1 = ["textContent", "onClick"];
|
|
4026
|
+
const _hoisted_2$1 = ["textContent", "onClick", "onDblclick"];
|
|
4010
4027
|
const _hoisted_3$1 = {
|
|
4011
4028
|
class: "tz-item",
|
|
4012
4029
|
ref: "minute-items"
|
|
4013
4030
|
};
|
|
4014
|
-
const _hoisted_4$1 = ["textContent", "onClick"];
|
|
4031
|
+
const _hoisted_4$1 = ["textContent", "onClick", "onDblclick"];
|
|
4015
4032
|
const _hoisted_5$1 = {
|
|
4016
4033
|
key: 0,
|
|
4017
4034
|
class: "tz-item",
|
|
4018
4035
|
ref: "second-items"
|
|
4019
4036
|
};
|
|
4020
|
-
const _hoisted_6$1 = ["textContent", "onClick"];
|
|
4037
|
+
const _hoisted_6$1 = ["textContent", "onClick", "onDblclick"];
|
|
4021
4038
|
var _sfc_main$4 = vue.defineComponent({
|
|
4022
4039
|
__name: "time-pc",
|
|
4023
4040
|
props: {
|
|
@@ -4087,29 +4104,27 @@
|
|
|
4087
4104
|
block: "center"
|
|
4088
4105
|
});
|
|
4089
4106
|
}
|
|
4090
|
-
function onHourClick(item) {
|
|
4107
|
+
function onHourClick(item, dbClick) {
|
|
4091
4108
|
if (item.disabled != true && timeRef.value.hour != item.hour) {
|
|
4092
4109
|
timeRef.value.hour = item.hour;
|
|
4093
4110
|
minuteItems.value = buildMinuteItems(item, min, max);
|
|
4094
4111
|
secondItems.value = buildSecondItems(minuteItems.value[timeRef.value.minute], min, max);
|
|
4095
4112
|
}
|
|
4096
4113
|
}
|
|
4097
|
-
function onMinuteClick(item) {
|
|
4114
|
+
function onMinuteClick(item, dbClick) {
|
|
4098
4115
|
if (item.disabled != true) {
|
|
4116
|
+
timeRef.value.minute = item.minute;
|
|
4099
4117
|
if (format == "HH:mm") {
|
|
4100
|
-
|
|
4101
|
-
emits("confirm", value);
|
|
4102
|
-
props.inPopup && props.closePopup(value);
|
|
4118
|
+
dbClick && onConfirm();
|
|
4103
4119
|
} else if (timeRef.value.minute != item.minute) {
|
|
4104
|
-
timeRef.value.minute = item.minute;
|
|
4105
4120
|
secondItems.value = buildSecondItems(item, min, max);
|
|
4106
4121
|
}
|
|
4107
4122
|
}
|
|
4108
4123
|
}
|
|
4109
|
-
function onSecondClick(item) {
|
|
4124
|
+
function onSecondClick(item, dbClick) {
|
|
4110
4125
|
if (item.disabled != true) {
|
|
4111
4126
|
timeRef.value.second = item.second;
|
|
4112
|
-
onConfirm();
|
|
4127
|
+
dbClick && onConfirm();
|
|
4113
4128
|
}
|
|
4114
4129
|
}
|
|
4115
4130
|
function onConfirm() {
|
|
@@ -4139,8 +4154,9 @@
|
|
|
4139
4154
|
}]),
|
|
4140
4155
|
key: item.hour,
|
|
4141
4156
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.hour, 2, "0")),
|
|
4142
|
-
onClick: $event => onHourClick(item)
|
|
4143
|
-
|
|
4157
|
+
onClick: $event => onHourClick(item),
|
|
4158
|
+
onDblclick: $event => onHourClick(item)
|
|
4159
|
+
}, null, 42, _hoisted_2$1);
|
|
4144
4160
|
}), 128))], 512), vue.createElementVNode("div", _hoisted_3$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(minuteItems.value, item => {
|
|
4145
4161
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4146
4162
|
class: vue.normalizeClass(["tzi-number", {
|
|
@@ -4149,8 +4165,9 @@
|
|
|
4149
4165
|
}]),
|
|
4150
4166
|
key: `${item.hour}:${item.minute}`,
|
|
4151
4167
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.minute, 2, "0")),
|
|
4152
|
-
onClick: $event => onMinuteClick(item)
|
|
4153
|
-
|
|
4168
|
+
onClick: $event => onMinuteClick(item),
|
|
4169
|
+
onDblclick: $event => onMinuteClick(item, true)
|
|
4170
|
+
}, null, 42, _hoisted_4$1);
|
|
4154
4171
|
}), 128))], 512), vue.unref(format) == "HH:mm:ss" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(secondItems.value, item => {
|
|
4155
4172
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
4156
4173
|
class: vue.normalizeClass(["tzi-number", {
|
|
@@ -4159,8 +4176,9 @@
|
|
|
4159
4176
|
}]),
|
|
4160
4177
|
key: `${item.hour}:${item.minute}:${item.second}`,
|
|
4161
4178
|
textContent: vue.toDisplayString(vue.unref(snail_core.padStart)(item.second, 2, "0")),
|
|
4162
|
-
onClick: $event => onSecondClick(item)
|
|
4163
|
-
|
|
4179
|
+
onClick: $event => onSecondClick(item),
|
|
4180
|
+
onDblclick: $event => onSecondClick(item, true)
|
|
4181
|
+
}, null, 42, _hoisted_6$1);
|
|
4164
4182
|
}), 128))], 512)) : vue.createCommentVNode("", true)]),
|
|
4165
4183
|
_: 1
|
|
4166
4184
|
}, 8, ["effect"])]),
|
|
@@ -4197,10 +4215,10 @@
|
|
|
4197
4215
|
const _hoisted_1$3 = ["textContent"];
|
|
4198
4216
|
const _hoisted_2 = ["textContent"];
|
|
4199
4217
|
const _hoisted_3 = ["textContent"];
|
|
4200
|
-
const _hoisted_4 = ["textContent", "onClick"];
|
|
4201
|
-
const _hoisted_5 = ["textContent", "onClick"];
|
|
4218
|
+
const _hoisted_4 = ["textContent", "onClick", "onDblclick"];
|
|
4219
|
+
const _hoisted_5 = ["textContent", "onClick", "onDblclick"];
|
|
4202
4220
|
const _hoisted_6 = ["textContent"];
|
|
4203
|
-
const _hoisted_7 = ["textContent", "onClick"];
|
|
4221
|
+
const _hoisted_7 = ["textContent", "onClick", "onDblclick"];
|
|
4204
4222
|
const _hoisted_8 = ["textContent"];
|
|
4205
4223
|
var _sfc_main$3 = vue.defineComponent({
|
|
4206
4224
|
__name: "date-pc",
|
|
@@ -4331,13 +4349,11 @@
|
|
|
4331
4349
|
function onSwitchStepClick(newValue) {
|
|
4332
4350
|
setTimeout(() => stepRef.value = newValue);
|
|
4333
4351
|
}
|
|
4334
|
-
function onYearItemClick(item) {
|
|
4352
|
+
function onYearItemClick(item, dbClick) {
|
|
4335
4353
|
if (item.disabled != true) {
|
|
4336
4354
|
dateRef.value.year = item.year;
|
|
4337
4355
|
if (format == "yyyy") {
|
|
4338
|
-
|
|
4339
|
-
emits("confirm", value);
|
|
4340
|
-
props.inPopup && props.closePopup(value);
|
|
4356
|
+
dbClick && onConfirm();
|
|
4341
4357
|
} else {
|
|
4342
4358
|
dateRef.value.month = 1;
|
|
4343
4359
|
monthItems.value = buildMonthItems(item, min, max);
|
|
@@ -4345,14 +4361,12 @@
|
|
|
4345
4361
|
}
|
|
4346
4362
|
}
|
|
4347
4363
|
}
|
|
4348
|
-
function onMonthItemClick(item) {
|
|
4364
|
+
function onMonthItemClick(item, dbClick) {
|
|
4349
4365
|
if (item.disabled != true) {
|
|
4350
4366
|
dateRef.value.year = item.year;
|
|
4351
4367
|
dateRef.value.month = item.month;
|
|
4352
4368
|
if (format == "yyyy-MM") {
|
|
4353
|
-
|
|
4354
|
-
emits("confirm", value);
|
|
4355
|
-
props.inPopup && props.closePopup(value);
|
|
4369
|
+
dbClick && onConfirm();
|
|
4356
4370
|
} else {
|
|
4357
4371
|
dateRef.value.day = 1;
|
|
4358
4372
|
dayItemsRef.value = buildDayItems(item, min, max);
|
|
@@ -4360,19 +4374,17 @@
|
|
|
4360
4374
|
}
|
|
4361
4375
|
}
|
|
4362
4376
|
}
|
|
4363
|
-
function onDayItemClick(item) {
|
|
4377
|
+
function onDayItemClick(item, dbClick) {
|
|
4364
4378
|
if (item.disabled != true) {
|
|
4365
|
-
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4366
4379
|
Object.assign(dateRef.value, {
|
|
4367
4380
|
year: item.year,
|
|
4368
4381
|
month: item.month,
|
|
4369
4382
|
day: item.day
|
|
4370
4383
|
});
|
|
4371
4384
|
if (format == "yyyy-MM-dd") {
|
|
4372
|
-
|
|
4373
|
-
emits("confirm", value);
|
|
4374
|
-
props.inPopup && props.closePopup(value);
|
|
4385
|
+
dbClick && onConfirm();
|
|
4375
4386
|
} else {
|
|
4387
|
+
const isNowMonth = item.year == dateRef.value.year && item.month == dateRef.value.month;
|
|
4376
4388
|
isNowMonth || buildPickerItems("day", 0);
|
|
4377
4389
|
}
|
|
4378
4390
|
}
|
|
@@ -4470,8 +4482,9 @@
|
|
|
4470
4482
|
key: item.year
|
|
4471
4483
|
}, [vue.createElementVNode("span", {
|
|
4472
4484
|
textContent: vue.toDisplayString(item.year),
|
|
4473
|
-
onClick: $event => onYearItemClick(item)
|
|
4474
|
-
|
|
4485
|
+
onClick: $event => onYearItemClick(item),
|
|
4486
|
+
onDblclick: $event => onYearItemClick(item, true)
|
|
4487
|
+
}, null, 40, _hoisted_4)], 2);
|
|
4475
4488
|
}), 128)) : stepRef.value == "month" ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
4476
4489
|
key: 1
|
|
4477
4490
|
}, vue.renderList(monthItems.value, item => {
|
|
@@ -4483,8 +4496,9 @@
|
|
|
4483
4496
|
key: `${item.year}-${item.month}`
|
|
4484
4497
|
}, [vue.createElementVNode("span", {
|
|
4485
4498
|
textContent: vue.toDisplayString(item.text),
|
|
4486
|
-
onClick: $event => onMonthItemClick(item)
|
|
4487
|
-
|
|
4499
|
+
onClick: $event => onMonthItemClick(item),
|
|
4500
|
+
onDblclick: $event => onMonthItemClick(item, true)
|
|
4501
|
+
}, null, 40, _hoisted_5)], 2);
|
|
4488
4502
|
}), 128)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
4489
4503
|
key: 2
|
|
4490
4504
|
}, [(vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(["日", "一", "二", "三", "四", "五", "六"], item => {
|
|
@@ -4503,8 +4517,9 @@
|
|
|
4503
4517
|
key: `${item.year}-${item.month}-${item.day}`
|
|
4504
4518
|
}, [vue.createElementVNode("span", {
|
|
4505
4519
|
textContent: vue.toDisplayString(item.day),
|
|
4506
|
-
onClick: $event => onDayItemClick(item)
|
|
4507
|
-
|
|
4520
|
+
onClick: $event => onDayItemClick(item),
|
|
4521
|
+
onDblclick: $event => onDayItemClick(item, true)
|
|
4522
|
+
}, null, 40, _hoisted_7)], 2);
|
|
4508
4523
|
}), 128))], 64))]),
|
|
4509
4524
|
_: 2
|
|
4510
4525
|
}, [vue.unref(endStep) == stepRef.value && (__props.toolbarDisabled != true || vue.unref(timeFormat) != void 0) ? {
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
.snail-search{align-items:center;background:#fff;display:flex;flex-shrink:0;height:34px}.snail-search>input{border-radius:0!important;flex:1;height:100%}.snail-search>div{align-items:center;border:1px solid #dddfed;border-left:none;display:flex;flex-shrink:0;height:100%;justify-content:center;width:34px}
|
|
17
17
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/select.vue index:0 */
|
|
18
18
|
.snail-select{align-items:center;border:1px solid #dddfed;border-radius:4px;color:#2e3033;display:flex;height:32px;width:100%}.snail-select:not(.readonly){background-color:#fff}.snail-select:not(.readonly,.empty){cursor:pointer}.snail-select>div.select-result{align-items:center;display:flex;flex:1;flex-wrap:nowrap;height:30px;overflow:hidden;padding:0 10px 0 6px}.snail-select>div.placeholder{flex:1;padding:0 10px 0 6px}.snail-select>svg.snail-icon{flex-shrink:0;margin-right:4px}.snail-select>div.no-items{flex:1;padding:0 8px}
|
|
19
|
+
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/textarea.vue index:0 */
|
|
20
|
+
textarea.snail-textarea{font-size:14px;line-height:1.5em;overflow-x:hidden;overflow-y:auto;resize:none;width:100%}
|
|
19
21
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/switch.vue index:0 */
|
|
20
22
|
.snail-switch{cursor:pointer;overflow:hidden;position:relative}.snail-switch.readonly{cursor:not-allowed}.snail-switch.switch{border-radius:10px 10px 10px 10px;height:20px!important;width:36px!important}.snail-switch.switch>div.on{background-color:#5ca3ff}.snail-switch.switch>div.off{background-color:#c4c8cc;position:absolute;transition:left .2s ease}.snail-switch.switch>div.status{background:#fff;border-radius:10px 10px 10px 10px;height:16px;position:absolute;top:2px;transition:left .2s ease;width:16px}.snail-switch.switch.on>div.off{left:100%;top:0}.snail-switch.switch.on>div.status{left:calc(100% - 18px)}.snail-switch.switch.off>div.off{left:0;top:0}.snail-switch.switch.off>div.status{left:2px}
|
|
21
23
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/switch.vue index:1 */
|
|
22
24
|
.snail-switch.checkbox,.snail-switch.radio{align-items:center;display:flex;flex-shrink:0;height:18px;justify-content:center;width:18px}.snail-switch.checkbox.off,.snail-switch.radio.off{border:1px solid #dcdfe6}.snail-switch.checkbox.on,.snail-switch.radio.on{background-color:#4c9aff;border:1px solid #4c9aff}.snail-switch.radio{border-radius:50%}
|
|
23
|
-
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/textarea.vue index:0 */
|
|
24
|
-
textarea.snail-textarea{font-size:14px;line-height:1.5em;overflow-x:hidden;overflow-y:auto;resize:none;width:100%}
|
|
25
25
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/container/action.vue index:0 */
|
|
26
|
-
.snail-action,.snail-action *{-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-action>.action-slot{flex:1;overflow:hidden;position:relative}.snail-action>.
|
|
26
|
+
.snail-action,.snail-action *{-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-action>.action-slot{flex:1;overflow:hidden;position:relative}.snail-action>.trigger-area{align-items:center;flex-shrink:0;width:-moz-fit-content;width:fit-content}.snail-action>.trigger-area.hidden{display:none}.snail-action:hover>.trigger-area{display:flex}
|
|
27
27
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/container/dynamic.vue index:0 */
|
|
28
28
|
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
29
29
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/container/elastic.vue index:0 */
|
|
@@ -68,14 +68,14 @@ textarea.snail-textarea{font-size:14px;line-height:1.5em;overflow-x:hidden;overf
|
|
|
68
68
|
.snail-layout.date-picker.pc{background-color:#fff;border:1px solid rgba(0,0,0,.12);border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.12);height:300px!important;overflow:hidden!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:280px!important}.snail-layout.date-picker.pc.time-now:after{background-color:gray;content:"";height:100%;left:0;opacity:.6;position:absolute;top:0;width:100%}.snail-layout.date-picker.pc>.top-area{align-items:center;border-bottom:1px solid #eee;display:flex;flex-wrap:nowrap;padding:0 4px}.snail-layout.date-picker.pc>.top-area>svg{fill:#8a9099;flex-shrink:0}.snail-layout.date-picker.pc>.top-area>svg:hover{fill:#58a4fd}.snail-layout.date-picker.pc>.top-area>div.header-content{align-items:center;display:flex;flex:1;justify-content:center}.snail-layout.date-picker.pc>.top-area>div.header-content>div{align-items:center;display:flex;font-size:16px;height:100%}.snail-layout.date-picker.pc>.top-area>div.header-content>div:nth-child(2){margin-left:8px}.snail-layout.date-picker.pc>.top-area>div.header-content:not(.year)>div:hover{color:#58a4fd;cursor:pointer}.snail-layout.date-picker.pc>.main-area{display:flex;flex-wrap:wrap;justify-content:space-between}.snail-layout.date-picker.pc>.main-area>div{align-items:center;display:flex;flex-shrink:0;font-size:13px;justify-content:center;position:relative}.snail-layout.date-picker.pc>.main-area>div>span{align-items:center;display:flex;height:28px;justify-content:center}.snail-layout.date-picker.pc>.main-area>div>span:hover{background:#f4f4f4;cursor:pointer}.snail-layout.date-picker.pc>.main-area>div.active>span{background-color:#58a4fd;color:#fff!important}.snail-layout.date-picker.pc>.main-area>div.active.disabled{opacity:.6}.snail-layout.date-picker.pc>.main-area>div.disabled>span{color:#aaa;cursor:not-allowed}.snail-layout.date-picker.pc>.main-area>div.day-item{height:30px;width:36px}.snail-layout.date-picker.pc>.main-area>div.day-item.week{font-weight:bold}.snail-layout.date-picker.pc>.main-area>div.day-item.active>span,.snail-layout.date-picker.pc>.main-area>div.day-item:hover>span{border-radius:100%;width:28px}.snail-layout.date-picker.pc>.main-area>div.day-item:not(.now-month)>span{color:#aaa}.snail-layout.date-picker.pc>.main-area>div.month-item,.snail-layout.date-picker.pc>.main-area>div.year-item{width:30%}.snail-layout.date-picker.pc>.main-area>div.month-item.active>span,.snail-layout.date-picker.pc>.main-area>div.month-item:hover>span,.snail-layout.date-picker.pc>.main-area>div.year-item.active>span,.snail-layout.date-picker.pc>.main-area>div.year-item:hover>span{border-radius:15px;padding:0 8px;width:-moz-fit-content;width:fit-content}.snail-layout.date-picker.pc>.bottom-area{align-items:center;border-top:1px solid #eee;display:flex;height:30px;justify-content:flex-end;padding-right:10px}.snail-layout.date-picker.pc>.bottom-area>.time-area{color:#58a4fd;cursor:pointer;font-size:12px;margin-left:10px;margin-right:auto}.snail-layout.date-picker.pc>.bottom-area>.snail-button{color:#999;font-size:12px;margin-left:4px}.snail-layout.date-picker.pc>.bottom-area>.snail-button:hover,.snail-layout.date-picker.pc>.bottom-area>.snail-button:last-child{color:#58a4fd}.snail-layout.date-picker.pc>.bottom-area>.snail-button.disabled{cursor:not-allowed;opacity:.6}
|
|
69
69
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/confirm-container.vue index:0 */
|
|
70
70
|
.snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>div.confirm-body{flex:1;margin:20px 40px;overflow:auto;word-wrap:break-word}
|
|
71
|
+
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/dialog-container.vue index:0 */
|
|
72
|
+
.snail-dialog{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;opacity:1;position:absolute;transition:opacity .4s ease-in-out;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);position:relative}.snail-dialog>.snail-wrapper{height:-moz-fit-content;height:fit-content;min-height:auto;min-width:auto;width:-moz-fit-content;width:fit-content}.snail-dialog>.snail-wrapper>.wrapper-body{padding:0 40px}.snail-dialog.unactive:before{opacity:0}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}
|
|
71
73
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/follow-container.vue index:0 */
|
|
72
74
|
.snail-follow{background-color:#fff;max-height:100%;max-width:100%;position:fixed;transition-duration:.1s;transition-property:left,top;transition-timing-function:ease}.snail-follow.initial{top:100%;transition:none}
|
|
73
75
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/popup-container.vue index:0 */
|
|
74
76
|
.snail-popup{left:0;position:fixed;top:0}
|
|
75
77
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/toast-container.vue index:0 */
|
|
76
78
|
.snail-toast{background:rgba(0,0,0,.7);border-radius:10px;color:#fff;display:flex;left:50%;max-height:200px;max-width:400px;min-width:200px;overflow:hidden;padding:20px 35px 20px 15px;position:fixed;top:50%;transform:translate(-50%,-50%)}.snail-toast>svg.close-icon{position:absolute;right:10px;top:12px}.snail-toast>div.icon{align-items:center;align-self:center;background:hsla(0,0%,100%,.15);border-radius:50%;display:flex;height:26px;justify-content:center;margin-right:6px;width:26px}.snail-toast>div.icon>svg{background:#fff;border-radius:50%;cursor:none!important;padding:2px}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
|
|
77
|
-
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/dialog-container.vue index:0 */
|
|
78
|
-
.snail-dialog{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;opacity:1;position:absolute;transition:opacity .4s ease-in-out;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);position:relative}.snail-dialog>.snail-wrapper{height:-moz-fit-content;height:fit-content;min-height:auto;min-width:auto;width:-moz-fit-content;width:fit-content}.snail-dialog>.snail-wrapper>.wrapper-body{padding:0 40px}.snail-dialog.unactive:before{opacity:0}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}
|
|
79
79
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/components/select-popup.vue index:0 */
|
|
80
80
|
.snail-select-popup{background:#fff;border:1px solid #dddfed;border-radius:4px;box-shadow:0 1px 5px 1px #dddfed;display:flex;flex-direction:column;max-height:90%;min-height:32px;overflow:auto}.snail-select-popup>div.snail-search{margin:12px}.snail-select-popup>div.clear-all{align-items:center;background-color:#fff;border-top:1px solid #dddfed;bottom:0;color:#8a9099;cursor:pointer;display:flex;flex-shrink:0;height:32px;padding:0 12px;position:sticky!important;z-index:1}.snail-select-popup>div.clear-all:hover{color:#ff4c4c}.snail-select-popup.child-popup{max-width:250px;min-width:200px;padding-bottom:6px;padding-top:6px}.snail-select-popup.child-popup.placeholder{justify-content:center;padding:0 12px;width:100px!important}
|
|
81
81
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/container/components/action-items.vue index:0 */
|