snail.vue 2.0.22 → 2.0.23
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 +53 -12
- package/dist/snail.vue.js +95 -65
- package/dist/snail.vue.umd.js +95 -65
- package/dist/styles/snail.vue.vue.css +6 -6
- package/package.json +3 -3
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as snail_core from 'snail.core';
|
|
2
2
|
import { DateFormat, DateValue, TimeValue, IScope, RunResult, IAsyncScope } from 'snail.core';
|
|
3
3
|
import * as snail_view from 'snail.view';
|
|
4
|
-
import { ScrollbarOptions, ScrollStatus, BaseStyle, HeightStyle, FlexBoxStyle, WidthStyle, BorderStyle, PaddingStyle, MarginStyle } from 'snail.view';
|
|
4
|
+
import { ScrollbarOptions, ScrollStatus, BaseStyle, HeightStyle, FlexBoxStyle, WidthStyle, BorderStyle, PaddingStyle, CSSClassOptions, MarginStyle } from 'snail.view';
|
|
5
5
|
import * as vue from 'vue';
|
|
6
6
|
import { Component, ShallowRef, Ref, WatchSource, App } from 'vue';
|
|
7
7
|
|
|
@@ -1061,12 +1061,7 @@ type LayoutOptions = {
|
|
|
1061
1061
|
/**
|
|
1062
1062
|
* 布局组件子区域 配置选项
|
|
1063
1063
|
*/
|
|
1064
|
-
type LayoutAraeOptions<Style extends WidthStyle | HeightStyle | void> = Style & {
|
|
1065
|
-
/**
|
|
1066
|
-
* 子区域自定义类样式
|
|
1067
|
-
* - 多个类样式,使用“ ”隔开
|
|
1068
|
-
*/
|
|
1069
|
-
class?: string;
|
|
1064
|
+
type LayoutAraeOptions<Style extends WidthStyle | HeightStyle | void> = Style & CSSClassOptions & {
|
|
1070
1065
|
/**
|
|
1071
1066
|
* 滚动视图配置
|
|
1072
1067
|
* - 视图属性:滚动条大小、显示时机
|
|
@@ -1086,7 +1081,7 @@ type LayoutAreaItem = {
|
|
|
1086
1081
|
/**
|
|
1087
1082
|
* 内容区域元素的类样式名
|
|
1088
1083
|
*/
|
|
1089
|
-
class: string;
|
|
1084
|
+
class: string[];
|
|
1090
1085
|
/**
|
|
1091
1086
|
* css样式
|
|
1092
1087
|
*/
|
|
@@ -1155,6 +1150,16 @@ type FoldOptions = DisabledOptions & TitleOptions & {
|
|
|
1155
1150
|
* - 跟随在title后
|
|
1156
1151
|
*/
|
|
1157
1152
|
subtitle?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* 面板头部区域配置
|
|
1155
|
+
* - 如指定特定的css式
|
|
1156
|
+
*/
|
|
1157
|
+
header?: CSSClassOptions;
|
|
1158
|
+
/**
|
|
1159
|
+
* 面板内容区域配置
|
|
1160
|
+
* - 如指定特定的css样式
|
|
1161
|
+
*/
|
|
1162
|
+
body?: CSSClassOptions;
|
|
1158
1163
|
};
|
|
1159
1164
|
/**
|
|
1160
1165
|
* 折叠状态
|
|
@@ -1162,6 +1167,27 @@ type FoldOptions = DisabledOptions & TitleOptions & {
|
|
|
1162
1167
|
* - fold : 折叠状态
|
|
1163
1168
|
*/
|
|
1164
1169
|
type FoldStatus = "expand" | "fold";
|
|
1170
|
+
/**
|
|
1171
|
+
* 折叠面板组件插槽句柄
|
|
1172
|
+
* - 将折叠面板状态和操作共享给插槽中自定义组件使用
|
|
1173
|
+
*/
|
|
1174
|
+
type FoldSlotHandle = {
|
|
1175
|
+
/**
|
|
1176
|
+
* 获取折叠面板状态
|
|
1177
|
+
* @returns
|
|
1178
|
+
*/
|
|
1179
|
+
getStatus(): FoldStatus;
|
|
1180
|
+
/**
|
|
1181
|
+
* 设置折叠面板状态
|
|
1182
|
+
* @param status 新的状态
|
|
1183
|
+
*/
|
|
1184
|
+
setStatus(status: FoldStatus): void;
|
|
1185
|
+
/**
|
|
1186
|
+
* 切换面板状态
|
|
1187
|
+
* @returns 新的状态
|
|
1188
|
+
*/
|
|
1189
|
+
toggle(): FoldStatus;
|
|
1190
|
+
};
|
|
1165
1191
|
/**
|
|
1166
1192
|
* 折叠面板事件
|
|
1167
1193
|
*/
|
|
@@ -1976,8 +2002,9 @@ type ButtonOptions = TitleOptions & {
|
|
|
1976
2002
|
|
|
1977
2003
|
/**
|
|
1978
2004
|
* 可操作项组件 的配置选项
|
|
2005
|
+
* - disabled 为true时,不响应操作项触发
|
|
1979
2006
|
*/
|
|
1980
|
-
type ActionOptions = {
|
|
2007
|
+
type ActionOptions = DisabledOptions & {
|
|
1981
2008
|
/**
|
|
1982
2009
|
* 触发方式
|
|
1983
2010
|
* - hover:鼠标移入显示
|
|
@@ -3161,6 +3188,8 @@ declare const components: {
|
|
|
3161
3188
|
Fold: {
|
|
3162
3189
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<DisabledOptions & TitleOptions & {
|
|
3163
3190
|
subtitle?: string;
|
|
3191
|
+
header?: snail_view.CSSClassOptions;
|
|
3192
|
+
body?: snail_view.CSSClassOptions;
|
|
3164
3193
|
} & {
|
|
3165
3194
|
status?: FoldStatus;
|
|
3166
3195
|
}> & Readonly<{
|
|
@@ -3178,6 +3207,8 @@ declare const components: {
|
|
|
3178
3207
|
Defaults: {};
|
|
3179
3208
|
}, Readonly<DisabledOptions & TitleOptions & {
|
|
3180
3209
|
subtitle?: string;
|
|
3210
|
+
header?: snail_view.CSSClassOptions;
|
|
3211
|
+
body?: snail_view.CSSClassOptions;
|
|
3181
3212
|
} & {
|
|
3182
3213
|
status?: FoldStatus;
|
|
3183
3214
|
}> & Readonly<{
|
|
@@ -3189,6 +3220,8 @@ declare const components: {
|
|
|
3189
3220
|
__isSuspense?: never;
|
|
3190
3221
|
} & vue.ComponentOptionsBase<Readonly<DisabledOptions & TitleOptions & {
|
|
3191
3222
|
subtitle?: string;
|
|
3223
|
+
header?: snail_view.CSSClassOptions;
|
|
3224
|
+
body?: snail_view.CSSClassOptions;
|
|
3192
3225
|
} & {
|
|
3193
3226
|
status?: FoldStatus;
|
|
3194
3227
|
}> & Readonly<{
|
|
@@ -3199,9 +3232,17 @@ declare const components: {
|
|
|
3199
3232
|
"update:status": (value: FoldStatus) => any;
|
|
3200
3233
|
}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
3201
3234
|
$slots: {
|
|
3202
|
-
header?: (props: {
|
|
3235
|
+
header?: (props: {
|
|
3236
|
+
getStatus(): FoldStatus;
|
|
3237
|
+
setStatus(status: FoldStatus): void;
|
|
3238
|
+
toggle(): FoldStatus;
|
|
3239
|
+
}) => any;
|
|
3203
3240
|
} & {
|
|
3204
|
-
default?: (props: {
|
|
3241
|
+
default?: (props: {
|
|
3242
|
+
getStatus(): FoldStatus;
|
|
3243
|
+
setStatus(status: FoldStatus): void;
|
|
3244
|
+
toggle(): FoldStatus;
|
|
3245
|
+
}) => any;
|
|
3205
3246
|
};
|
|
3206
3247
|
});
|
|
3207
3248
|
Motion: {
|
|
@@ -3612,4 +3653,4 @@ declare const components: {
|
|
|
3612
3653
|
};
|
|
3613
3654
|
|
|
3614
3655
|
export { MOTION, components, getBuiltinIcon, mount, onAppCreated, triggerAppCreated, usePicker, usePopup, useReactive, useTreeContext };
|
|
3615
|
-
export type { ActionEvents, ActionItem, ActionItemsOptions, ActionOptions, ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DatePickerDayItem, DatePickerMonthItem, DatePickerOptions, DatePickerYearItem, DatetimeDisabledOptions, DatetimePickerEvents, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, ElasticEvents, ElasticExpose, ElasticOptions, ElasticSpringStatus, EmitterType, EmptyOptions, EventsType, FlexOptions, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowPositionOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, INumberFormatter, IPickerManager, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutAraeOptions, LayoutAreaItem, LayoutOptions, LoadingOptions, MessageOptions, MotionEffectOptions, MotionOptions, MoveEvents, NumberBaseOptions, NumberEvents, NumberFormatResult, NumberOptions, PickerExtend, PickerPopupOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollExpose, ScrollOptions, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SlotsType, SortEvent, SortEvents, SortGroupHook, SortGroupOptions, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TextareaEvents, TextareaOptions, TimePickerHourItem, TimePickerMinuteItem, TimePickerOptions, TimePickerSecondItem, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|
|
3656
|
+
export type { ActionEvents, ActionItem, ActionItemsOptions, ActionOptions, ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DatePickerDayItem, DatePickerMonthItem, DatePickerOptions, DatePickerYearItem, DatetimeDisabledOptions, DatetimePickerEvents, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, ElasticEvents, ElasticExpose, ElasticOptions, ElasticSpringStatus, EmitterType, EmptyOptions, EventsType, FlexOptions, FoldEvents, FoldOptions, FoldSlotHandle, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowPositionOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, INumberFormatter, IPickerManager, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutAraeOptions, LayoutAreaItem, LayoutOptions, LoadingOptions, MessageOptions, MotionEffectOptions, MotionOptions, MoveEvents, NumberBaseOptions, NumberEvents, NumberFormatResult, NumberOptions, PickerExtend, PickerPopupOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollExpose, ScrollOptions, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SlotsType, SortEvent, SortEvents, SortGroupHook, SortGroupOptions, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TextareaEvents, TextareaOptions, TimePickerHourItem, TimePickerMinuteItem, TimePickerOptions, TimePickerSecondItem, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|
package/dist/snail.vue.js
CHANGED
|
@@ -141,7 +141,7 @@ var _sfc_main$E = defineComponent({
|
|
|
141
141
|
const _hoisted_1$m = ["title", "onClick"];
|
|
142
142
|
const _hoisted_2$e = ["type", "checked"];
|
|
143
143
|
const _hoisted_3$9 = ["textContent"];
|
|
144
|
-
const _hoisted_4$
|
|
144
|
+
const _hoisted_4$6 = ["textContent"];
|
|
145
145
|
var _sfc_main$D = defineComponent({
|
|
146
146
|
...{
|
|
147
147
|
name: "Choose",
|
|
@@ -234,7 +234,7 @@ var _sfc_main$D = defineComponent({
|
|
|
234
234
|
key: 3,
|
|
235
235
|
class: "item-des",
|
|
236
236
|
textContent: toDisplayString(node.item.description)
|
|
237
|
-
}, null, 8, _hoisted_4$
|
|
237
|
+
}, null, 8, _hoisted_4$6)) : createCommentVNode("", true)], 14, _hoisted_1$m);
|
|
238
238
|
}), 128))], 2);
|
|
239
239
|
};
|
|
240
240
|
}
|
|
@@ -350,8 +350,8 @@ const _hoisted_2$d = {
|
|
|
350
350
|
const _hoisted_3$8 = {
|
|
351
351
|
class: "input-body"
|
|
352
352
|
};
|
|
353
|
-
const _hoisted_4$
|
|
354
|
-
const _hoisted_5$
|
|
353
|
+
const _hoisted_4$5 = ["type", "value", "readonly", "placeholder", "title"];
|
|
354
|
+
const _hoisted_5$3 = ["title"];
|
|
355
355
|
var _sfc_main$A = defineComponent({
|
|
356
356
|
...{
|
|
357
357
|
name: "Input",
|
|
@@ -413,7 +413,7 @@ var _sfc_main$A = defineComponent({
|
|
|
413
413
|
title: inputModel.value,
|
|
414
414
|
onChange: onValueChange,
|
|
415
415
|
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
416
|
-
}, null, 40, _hoisted_4$
|
|
416
|
+
}, null, 40, _hoisted_4$5), !!validateRef.value ? (openBlock(), createElementBlock("span", {
|
|
417
417
|
key: 0,
|
|
418
418
|
class: "validate",
|
|
419
419
|
title: validateRef.value
|
|
@@ -422,7 +422,7 @@ var _sfc_main$A = defineComponent({
|
|
|
422
422
|
button: "",
|
|
423
423
|
size: 16,
|
|
424
424
|
color: "red"
|
|
425
|
-
})], 8, _hoisted_5$
|
|
425
|
+
})], 8, _hoisted_5$3)) : createCommentVNode("", true)])], 2);
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
});
|
|
@@ -633,11 +633,11 @@ const _hoisted_1$j = {
|
|
|
633
633
|
};
|
|
634
634
|
const _hoisted_2$c = ["textContent"];
|
|
635
635
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
636
|
-
const _hoisted_4$
|
|
636
|
+
const _hoisted_4$4 = {
|
|
637
637
|
key: 1,
|
|
638
638
|
class: "number-suffix"
|
|
639
639
|
};
|
|
640
|
-
const _hoisted_5$
|
|
640
|
+
const _hoisted_5$2 = ["textContent"];
|
|
641
641
|
const _hoisted_6$2 = ["title", "textContent"];
|
|
642
642
|
const _hoisted_7$1 = ["title", "textContent"];
|
|
643
643
|
var _sfc_main$z = defineComponent({
|
|
@@ -836,10 +836,10 @@ var _sfc_main$z = defineComponent({
|
|
|
836
836
|
button: "",
|
|
837
837
|
size: 20,
|
|
838
838
|
rotate: 90
|
|
839
|
-
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
839
|
+
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$4, [createElementVNode("span", {
|
|
840
840
|
class: "ellipsis",
|
|
841
841
|
textContent: toDisplayString(unref(suffix))
|
|
842
|
-
}, null, 8, _hoisted_5$
|
|
842
|
+
}, null, 8, _hoisted_5$2)])) : createCommentVNode("", true), unref(upper) ? (openBlock(), createElementBlock("div", {
|
|
843
843
|
key: 2,
|
|
844
844
|
class: "number-util ellipsis",
|
|
845
845
|
title: upperTextRef.value,
|
|
@@ -2254,7 +2254,7 @@ const _hoisted_1$d = {
|
|
|
2254
2254
|
};
|
|
2255
2255
|
const _hoisted_2$7 = ["title", "textContent"];
|
|
2256
2256
|
const _hoisted_3$4 = ["textContent"];
|
|
2257
|
-
const _hoisted_4$
|
|
2257
|
+
const _hoisted_4$3 = {
|
|
2258
2258
|
key: 1,
|
|
2259
2259
|
class: "placeholder"
|
|
2260
2260
|
};
|
|
@@ -2407,7 +2407,7 @@ var _sfc_main$m = defineComponent({
|
|
|
2407
2407
|
button: "",
|
|
2408
2408
|
size: 24,
|
|
2409
2409
|
rotate: 90
|
|
2410
|
-
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2410
|
+
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$3, "暂无可选项"))], 2);
|
|
2411
2411
|
};
|
|
2412
2412
|
}
|
|
2413
2413
|
});
|
|
@@ -2592,6 +2592,9 @@ const _hoisted_2$5 = {
|
|
|
2592
2592
|
var _sfc_main$i = defineComponent({
|
|
2593
2593
|
__name: "action",
|
|
2594
2594
|
props: {
|
|
2595
|
+
disabled: {
|
|
2596
|
+
type: Boolean
|
|
2597
|
+
},
|
|
2595
2598
|
trigger: {},
|
|
2596
2599
|
actions: {}
|
|
2597
2600
|
},
|
|
@@ -2616,21 +2619,23 @@ var _sfc_main$i = defineComponent({
|
|
|
2616
2619
|
popupScope.destroy();
|
|
2617
2620
|
return;
|
|
2618
2621
|
}
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2622
|
+
if (props.disabled != true) {
|
|
2623
|
+
popupScope = follow(rootDom.value, {
|
|
2624
|
+
component: _sfc_main$j,
|
|
2625
|
+
closeOnEscape: true,
|
|
2626
|
+
closeOnMask: true,
|
|
2627
|
+
closeOnResize: true,
|
|
2628
|
+
closeOnTarget: true,
|
|
2629
|
+
followX: longPress ? ["center", "start", "end"] : ["after", "end", "start", "end", "center"],
|
|
2630
|
+
followY: longPress ? ["center", "after", "before"] : ["after", "before", "center", "end", "after"],
|
|
2631
|
+
props: {
|
|
2632
|
+
mode: "vertical",
|
|
2633
|
+
actions: props.actions
|
|
2634
|
+
}
|
|
2635
|
+
});
|
|
2636
|
+
const code = await popupScope;
|
|
2637
|
+
isStringNotEmpty(code) && emits("trigger", code);
|
|
2638
|
+
}
|
|
2634
2639
|
}
|
|
2635
2640
|
function onMouseDown() {
|
|
2636
2641
|
if (props.trigger == "long-press" && pressStartDate == void 0) {
|
|
@@ -2664,7 +2669,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2664
2669
|
}
|
|
2665
2670
|
});
|
|
2666
2671
|
return (_ctx, _cache) => {
|
|
2667
|
-
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2672
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" && __props.disabled != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2668
2673
|
key: 0,
|
|
2669
2674
|
class: "hover-tips",
|
|
2670
2675
|
button: "",
|
|
@@ -3040,19 +3045,12 @@ var _sfc_main$g = defineComponent({
|
|
|
3040
3045
|
}
|
|
3041
3046
|
});
|
|
3042
3047
|
|
|
3043
|
-
const _hoisted_1$9 =
|
|
3044
|
-
class: "fold-header"
|
|
3045
|
-
};
|
|
3048
|
+
const _hoisted_1$9 = ["textContent"];
|
|
3046
3049
|
const _hoisted_2$4 = ["textContent"];
|
|
3047
|
-
const _hoisted_3$3 =
|
|
3048
|
-
const _hoisted_4$3 = {
|
|
3050
|
+
const _hoisted_3$3 = {
|
|
3049
3051
|
key: 1,
|
|
3050
3052
|
class: "status"
|
|
3051
3053
|
};
|
|
3052
|
-
const _hoisted_5$2 = {
|
|
3053
|
-
class: "fold-body",
|
|
3054
|
-
ref: "foldBody"
|
|
3055
|
-
};
|
|
3056
3054
|
var _sfc_main$f = defineComponent({
|
|
3057
3055
|
...{
|
|
3058
3056
|
name: "Fold",
|
|
@@ -3064,7 +3062,9 @@ var _sfc_main$f = defineComponent({
|
|
|
3064
3062
|
type: Boolean
|
|
3065
3063
|
},
|
|
3066
3064
|
title: {},
|
|
3067
|
-
subtitle: {}
|
|
3065
|
+
subtitle: {},
|
|
3066
|
+
header: {},
|
|
3067
|
+
body: {}
|
|
3068
3068
|
}, {
|
|
3069
3069
|
"status": {
|
|
3070
3070
|
default: "expand"
|
|
@@ -3084,27 +3084,37 @@ var _sfc_main$f = defineComponent({
|
|
|
3084
3084
|
watcher
|
|
3085
3085
|
} = useReactive();
|
|
3086
3086
|
const statusModel = useModel(__props, "status");
|
|
3087
|
-
|
|
3087
|
+
const foldHeaderDom = useTemplateRef("foldHeader");
|
|
3088
3088
|
const foldBodyDom = useTemplateRef("foldBody");
|
|
3089
|
-
|
|
3089
|
+
const slotHandle = {
|
|
3090
|
+
getStatus: () => statusModel.value,
|
|
3091
|
+
setStatus: value => statusModel.value = value,
|
|
3092
|
+
toggle: () => (onStatusClick(), statusModel.value)
|
|
3093
|
+
};
|
|
3094
|
+
function updateFoldStyle(disableAnimation) {
|
|
3090
3095
|
const isExpand = statusModel.value == "expand";
|
|
3091
3096
|
if (foldBodyDom.value) {
|
|
3092
|
-
const minHeight =
|
|
3097
|
+
const minHeight = foldHeaderDom.value.getBoundingClientRect().height;
|
|
3093
3098
|
const maxHeight = minHeight + foldBodyDom.value.getBoundingClientRect().height;
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3099
|
+
const endStyle = {
|
|
3100
|
+
overflow: isExpand ? "" : "hidden",
|
|
3101
|
+
height: isExpand ? "" : `${minHeight}px`
|
|
3102
|
+
};
|
|
3103
|
+
if (disableAnimation === true) {
|
|
3104
|
+
Object.assign(foldBodyDom.value.parentElement.style, endStyle);
|
|
3105
|
+
} else {
|
|
3106
|
+
transition(foldBodyDom.value.parentElement, {
|
|
3107
|
+
from: {
|
|
3108
|
+
transition: "height 0.2s ease",
|
|
3109
|
+
overflow: "hidden",
|
|
3110
|
+
height: `${isExpand ? minHeight : maxHeight}px`
|
|
3111
|
+
},
|
|
3112
|
+
to: {
|
|
3113
|
+
height: `${isExpand ? maxHeight : minHeight}px`
|
|
3114
|
+
},
|
|
3115
|
+
end: endStyle
|
|
3116
|
+
});
|
|
3117
|
+
}
|
|
3108
3118
|
}
|
|
3109
3119
|
}
|
|
3110
3120
|
function onStatusClick() {
|
|
@@ -3120,24 +3130,33 @@ var _sfc_main$f = defineComponent({
|
|
|
3120
3130
|
}
|
|
3121
3131
|
nextTick(() => emits("change", statusModel.value));
|
|
3122
3132
|
}
|
|
3133
|
+
onMounted(() => {
|
|
3134
|
+
statusModel.value != "expand" && updateFoldStyle(true);
|
|
3135
|
+
watcher(statusModel, () => updateFoldStyle(false));
|
|
3136
|
+
});
|
|
3123
3137
|
return (_ctx, _cache) => {
|
|
3124
3138
|
return openBlock(), createElementBlock("div", {
|
|
3125
3139
|
class: normalizeClass(["snail-fold", statusModel.value])
|
|
3126
|
-
}, [createElementVNode("div",
|
|
3140
|
+
}, [createElementVNode("div", {
|
|
3141
|
+
class: normalizeClass(["fold-header", __props.header ? __props.header.class : []]),
|
|
3142
|
+
ref: "foldHeader"
|
|
3143
|
+
}, [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(slotHandle)), () => [createElementVNode("div", {
|
|
3127
3144
|
class: "title ellipsis",
|
|
3128
3145
|
textContent: toDisplayString(__props.title)
|
|
3129
|
-
}, null, 8,
|
|
3146
|
+
}, null, 8, _hoisted_1$9), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
3130
3147
|
key: 0,
|
|
3131
3148
|
class: "subtitle ellipsis",
|
|
3132
3149
|
textContent: toDisplayString(__props.subtitle)
|
|
3133
|
-
}, null, 8,
|
|
3134
|
-
custom: false,
|
|
3150
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_3$3, [createVNode(_sfc_main$E, {
|
|
3135
3151
|
type: "arrow",
|
|
3136
3152
|
button: "",
|
|
3137
3153
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
3138
3154
|
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
3139
3155
|
onClick: onStatusClick
|
|
3140
|
-
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])]), createElementVNode("div",
|
|
3156
|
+
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])], 2), createElementVNode("div", {
|
|
3157
|
+
class: normalizeClass(["fold-body", __props.body ? __props.body.class : []]),
|
|
3158
|
+
ref: "foldBody"
|
|
3159
|
+
}, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotHandle)))], 2)], 2);
|
|
3141
3160
|
};
|
|
3142
3161
|
}
|
|
3143
3162
|
});
|
|
@@ -3202,34 +3221,45 @@ var _sfc_main$d = defineComponent({
|
|
|
3202
3221
|
const map = Object.create(null);
|
|
3203
3222
|
map.main = {
|
|
3204
3223
|
scrollable: props.main && props.main.scroll != void 0,
|
|
3205
|
-
class:
|
|
3224
|
+
class: buildAreaClass("main-area", props.main),
|
|
3206
3225
|
style: void 0
|
|
3207
3226
|
};
|
|
3208
3227
|
if (props.mode == "vertical") {
|
|
3209
3228
|
map.top = {
|
|
3210
3229
|
scrollable: props.top && props.top.scroll != void 0,
|
|
3211
|
-
class:
|
|
3230
|
+
class: buildAreaClass("top-area", props.top),
|
|
3212
3231
|
style: buildHeightStyle(props.top)
|
|
3213
3232
|
};
|
|
3214
3233
|
map.bottom = {
|
|
3215
3234
|
scrollable: props.bottom && props.bottom.scroll != void 0,
|
|
3216
|
-
class:
|
|
3235
|
+
class: buildAreaClass("bottom-area", props.bottom),
|
|
3217
3236
|
style: buildHeightStyle(props.bottom)
|
|
3218
3237
|
};
|
|
3219
3238
|
} else {
|
|
3220
3239
|
map.left = {
|
|
3221
3240
|
scrollable: props.left && props.left.scroll != void 0,
|
|
3222
|
-
class:
|
|
3241
|
+
class: buildAreaClass("left-area", props.left),
|
|
3223
3242
|
style: buildWidthStyle(props.left)
|
|
3224
3243
|
};
|
|
3225
3244
|
map.right = {
|
|
3226
3245
|
scrollable: props.right && props.right.scroll != void 0,
|
|
3227
|
-
class:
|
|
3246
|
+
class: buildAreaClass("right-area", props.right),
|
|
3228
3247
|
style: buildWidthStyle(props.right)
|
|
3229
3248
|
};
|
|
3230
3249
|
}
|
|
3231
3250
|
return map;
|
|
3232
3251
|
});
|
|
3252
|
+
function buildAreaClass(fixedClass, cssClass) {
|
|
3253
|
+
const classArray = [fixedClass];
|
|
3254
|
+
if (cssClass != void 0) {
|
|
3255
|
+
if (isArray(cssClass.class) == true) {
|
|
3256
|
+
classArray.push(...cssClass.class);
|
|
3257
|
+
} else if (isStringNotEmpty(cssClass.class) == true) {
|
|
3258
|
+
classArray.push(cssClass.class);
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
return classArray;
|
|
3262
|
+
}
|
|
3233
3263
|
function buildWidthStyle(style) {
|
|
3234
3264
|
return style ? css.buildStyle({
|
|
3235
3265
|
minWidth: style.minWidth,
|
package/dist/snail.vue.umd.js
CHANGED
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
const _hoisted_1$m = ["title", "onClick"];
|
|
144
144
|
const _hoisted_2$e = ["type", "checked"];
|
|
145
145
|
const _hoisted_3$9 = ["textContent"];
|
|
146
|
-
const _hoisted_4$
|
|
146
|
+
const _hoisted_4$6 = ["textContent"];
|
|
147
147
|
var _sfc_main$D = vue.defineComponent({
|
|
148
148
|
...{
|
|
149
149
|
name: "Choose",
|
|
@@ -236,7 +236,7 @@
|
|
|
236
236
|
key: 3,
|
|
237
237
|
class: "item-des",
|
|
238
238
|
textContent: vue.toDisplayString(node.item.description)
|
|
239
|
-
}, null, 8, _hoisted_4$
|
|
239
|
+
}, null, 8, _hoisted_4$6)) : vue.createCommentVNode("", true)], 14, _hoisted_1$m);
|
|
240
240
|
}), 128))], 2);
|
|
241
241
|
};
|
|
242
242
|
}
|
|
@@ -352,8 +352,8 @@
|
|
|
352
352
|
const _hoisted_3$8 = {
|
|
353
353
|
class: "input-body"
|
|
354
354
|
};
|
|
355
|
-
const _hoisted_4$
|
|
356
|
-
const _hoisted_5$
|
|
355
|
+
const _hoisted_4$5 = ["type", "value", "readonly", "placeholder", "title"];
|
|
356
|
+
const _hoisted_5$3 = ["title"];
|
|
357
357
|
var _sfc_main$A = vue.defineComponent({
|
|
358
358
|
...{
|
|
359
359
|
name: "Input",
|
|
@@ -415,7 +415,7 @@
|
|
|
415
415
|
title: inputModel.value,
|
|
416
416
|
onChange: onValueChange,
|
|
417
417
|
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
418
|
-
}, null, 40, _hoisted_4$
|
|
418
|
+
}, null, 40, _hoisted_4$5), !!validateRef.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "validate",
|
|
421
421
|
title: validateRef.value
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
button: "",
|
|
425
425
|
size: 16,
|
|
426
426
|
color: "red"
|
|
427
|
-
})], 8, _hoisted_5$
|
|
427
|
+
})], 8, _hoisted_5$3)) : vue.createCommentVNode("", true)])], 2);
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
430
|
});
|
|
@@ -635,11 +635,11 @@
|
|
|
635
635
|
};
|
|
636
636
|
const _hoisted_2$c = ["textContent"];
|
|
637
637
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
638
|
-
const _hoisted_4$
|
|
638
|
+
const _hoisted_4$4 = {
|
|
639
639
|
key: 1,
|
|
640
640
|
class: "number-suffix"
|
|
641
641
|
};
|
|
642
|
-
const _hoisted_5$
|
|
642
|
+
const _hoisted_5$2 = ["textContent"];
|
|
643
643
|
const _hoisted_6$2 = ["title", "textContent"];
|
|
644
644
|
const _hoisted_7$1 = ["title", "textContent"];
|
|
645
645
|
var _sfc_main$z = vue.defineComponent({
|
|
@@ -838,10 +838,10 @@
|
|
|
838
838
|
button: "",
|
|
839
839
|
size: 20,
|
|
840
840
|
rotate: 90
|
|
841
|
-
})])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
841
|
+
})])], 64)) : vue.createCommentVNode("", true)], 2), vue.unref(hasSuffix) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [vue.createElementVNode("span", {
|
|
842
842
|
class: "ellipsis",
|
|
843
843
|
textContent: vue.toDisplayString(vue.unref(suffix))
|
|
844
|
-
}, null, 8, _hoisted_5$
|
|
844
|
+
}, null, 8, _hoisted_5$2)])) : vue.createCommentVNode("", true), vue.unref(upper) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
845
845
|
key: 2,
|
|
846
846
|
class: "number-util ellipsis",
|
|
847
847
|
title: upperTextRef.value,
|
|
@@ -2256,7 +2256,7 @@
|
|
|
2256
2256
|
};
|
|
2257
2257
|
const _hoisted_2$7 = ["title", "textContent"];
|
|
2258
2258
|
const _hoisted_3$4 = ["textContent"];
|
|
2259
|
-
const _hoisted_4$
|
|
2259
|
+
const _hoisted_4$3 = {
|
|
2260
2260
|
key: 1,
|
|
2261
2261
|
class: "placeholder"
|
|
2262
2262
|
};
|
|
@@ -2409,7 +2409,7 @@
|
|
|
2409
2409
|
button: "",
|
|
2410
2410
|
size: 24,
|
|
2411
2411
|
rotate: 90
|
|
2412
|
-
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$
|
|
2412
|
+
})) : vue.createCommentVNode("", true)], 64)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$3, "暂无可选项"))], 2);
|
|
2413
2413
|
};
|
|
2414
2414
|
}
|
|
2415
2415
|
});
|
|
@@ -2594,6 +2594,9 @@
|
|
|
2594
2594
|
var _sfc_main$i = vue.defineComponent({
|
|
2595
2595
|
__name: "action",
|
|
2596
2596
|
props: {
|
|
2597
|
+
disabled: {
|
|
2598
|
+
type: Boolean
|
|
2599
|
+
},
|
|
2597
2600
|
trigger: {},
|
|
2598
2601
|
actions: {}
|
|
2599
2602
|
},
|
|
@@ -2618,21 +2621,23 @@
|
|
|
2618
2621
|
popupScope.destroy();
|
|
2619
2622
|
return;
|
|
2620
2623
|
}
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2624
|
+
if (props.disabled != true) {
|
|
2625
|
+
popupScope = follow(rootDom.value, {
|
|
2626
|
+
component: _sfc_main$j,
|
|
2627
|
+
closeOnEscape: true,
|
|
2628
|
+
closeOnMask: true,
|
|
2629
|
+
closeOnResize: true,
|
|
2630
|
+
closeOnTarget: true,
|
|
2631
|
+
followX: longPress ? ["center", "start", "end"] : ["after", "end", "start", "end", "center"],
|
|
2632
|
+
followY: longPress ? ["center", "after", "before"] : ["after", "before", "center", "end", "after"],
|
|
2633
|
+
props: {
|
|
2634
|
+
mode: "vertical",
|
|
2635
|
+
actions: props.actions
|
|
2636
|
+
}
|
|
2637
|
+
});
|
|
2638
|
+
const code = await popupScope;
|
|
2639
|
+
snail_core.isStringNotEmpty(code) && emits("trigger", code);
|
|
2640
|
+
}
|
|
2636
2641
|
}
|
|
2637
2642
|
function onMouseDown() {
|
|
2638
2643
|
if (props.trigger == "long-press" && pressStartDate == void 0) {
|
|
@@ -2666,7 +2671,7 @@
|
|
|
2666
2671
|
}
|
|
2667
2672
|
});
|
|
2668
2673
|
return (_ctx, _cache) => {
|
|
2669
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$5, [vue.renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
2674
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createElementVNode("div", _hoisted_2$5, [vue.renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" && __props.disabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$E, {
|
|
2670
2675
|
key: 0,
|
|
2671
2676
|
class: "hover-tips",
|
|
2672
2677
|
button: "",
|
|
@@ -3042,19 +3047,12 @@
|
|
|
3042
3047
|
}
|
|
3043
3048
|
});
|
|
3044
3049
|
|
|
3045
|
-
const _hoisted_1$9 =
|
|
3046
|
-
class: "fold-header"
|
|
3047
|
-
};
|
|
3050
|
+
const _hoisted_1$9 = ["textContent"];
|
|
3048
3051
|
const _hoisted_2$4 = ["textContent"];
|
|
3049
|
-
const _hoisted_3$3 =
|
|
3050
|
-
const _hoisted_4$3 = {
|
|
3052
|
+
const _hoisted_3$3 = {
|
|
3051
3053
|
key: 1,
|
|
3052
3054
|
class: "status"
|
|
3053
3055
|
};
|
|
3054
|
-
const _hoisted_5$2 = {
|
|
3055
|
-
class: "fold-body",
|
|
3056
|
-
ref: "foldBody"
|
|
3057
|
-
};
|
|
3058
3056
|
var _sfc_main$f = vue.defineComponent({
|
|
3059
3057
|
...{
|
|
3060
3058
|
name: "Fold",
|
|
@@ -3066,7 +3064,9 @@
|
|
|
3066
3064
|
type: Boolean
|
|
3067
3065
|
},
|
|
3068
3066
|
title: {},
|
|
3069
|
-
subtitle: {}
|
|
3067
|
+
subtitle: {},
|
|
3068
|
+
header: {},
|
|
3069
|
+
body: {}
|
|
3070
3070
|
}, {
|
|
3071
3071
|
"status": {
|
|
3072
3072
|
default: "expand"
|
|
@@ -3086,27 +3086,37 @@
|
|
|
3086
3086
|
watcher
|
|
3087
3087
|
} = useReactive();
|
|
3088
3088
|
const statusModel = vue.useModel(__props, "status");
|
|
3089
|
-
|
|
3089
|
+
const foldHeaderDom = vue.useTemplateRef("foldHeader");
|
|
3090
3090
|
const foldBodyDom = vue.useTemplateRef("foldBody");
|
|
3091
|
-
|
|
3091
|
+
const slotHandle = {
|
|
3092
|
+
getStatus: () => statusModel.value,
|
|
3093
|
+
setStatus: value => statusModel.value = value,
|
|
3094
|
+
toggle: () => (onStatusClick(), statusModel.value)
|
|
3095
|
+
};
|
|
3096
|
+
function updateFoldStyle(disableAnimation) {
|
|
3092
3097
|
const isExpand = statusModel.value == "expand";
|
|
3093
3098
|
if (foldBodyDom.value) {
|
|
3094
|
-
const minHeight =
|
|
3099
|
+
const minHeight = foldHeaderDom.value.getBoundingClientRect().height;
|
|
3095
3100
|
const maxHeight = minHeight + foldBodyDom.value.getBoundingClientRect().height;
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3101
|
+
const endStyle = {
|
|
3102
|
+
overflow: isExpand ? "" : "hidden",
|
|
3103
|
+
height: isExpand ? "" : `${minHeight}px`
|
|
3104
|
+
};
|
|
3105
|
+
if (disableAnimation === true) {
|
|
3106
|
+
Object.assign(foldBodyDom.value.parentElement.style, endStyle);
|
|
3107
|
+
} else {
|
|
3108
|
+
transition(foldBodyDom.value.parentElement, {
|
|
3109
|
+
from: {
|
|
3110
|
+
transition: "height 0.2s ease",
|
|
3111
|
+
overflow: "hidden",
|
|
3112
|
+
height: `${isExpand ? minHeight : maxHeight}px`
|
|
3113
|
+
},
|
|
3114
|
+
to: {
|
|
3115
|
+
height: `${isExpand ? maxHeight : minHeight}px`
|
|
3116
|
+
},
|
|
3117
|
+
end: endStyle
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3110
3120
|
}
|
|
3111
3121
|
}
|
|
3112
3122
|
function onStatusClick() {
|
|
@@ -3122,24 +3132,33 @@
|
|
|
3122
3132
|
}
|
|
3123
3133
|
vue.nextTick(() => emits("change", statusModel.value));
|
|
3124
3134
|
}
|
|
3135
|
+
vue.onMounted(() => {
|
|
3136
|
+
statusModel.value != "expand" && updateFoldStyle(true);
|
|
3137
|
+
watcher(statusModel, () => updateFoldStyle(false));
|
|
3138
|
+
});
|
|
3125
3139
|
return (_ctx, _cache) => {
|
|
3126
3140
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
3127
3141
|
class: vue.normalizeClass(["snail-fold", statusModel.value])
|
|
3128
|
-
}, [vue.createElementVNode("div",
|
|
3142
|
+
}, [vue.createElementVNode("div", {
|
|
3143
|
+
class: vue.normalizeClass(["fold-header", __props.header ? __props.header.class : []]),
|
|
3144
|
+
ref: "foldHeader"
|
|
3145
|
+
}, [vue.renderSlot(_ctx.$slots, "header", vue.normalizeProps(vue.guardReactiveProps(slotHandle)), () => [vue.createElementVNode("div", {
|
|
3129
3146
|
class: "title ellipsis",
|
|
3130
3147
|
textContent: vue.toDisplayString(__props.title)
|
|
3131
|
-
}, null, 8,
|
|
3148
|
+
}, null, 8, _hoisted_1$9), !!__props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
3132
3149
|
key: 0,
|
|
3133
3150
|
class: "subtitle ellipsis",
|
|
3134
3151
|
textContent: vue.toDisplayString(__props.subtitle)
|
|
3135
|
-
}, null, 8,
|
|
3136
|
-
custom: false,
|
|
3152
|
+
}, null, 8, _hoisted_2$4)) : vue.createCommentVNode("", true), __props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [vue.createVNode(_sfc_main$E, {
|
|
3137
3153
|
type: "arrow",
|
|
3138
3154
|
button: "",
|
|
3139
3155
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
3140
3156
|
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
3141
3157
|
onClick: onStatusClick
|
|
3142
|
-
}, null, 8, ["title", "rotate"])])) : vue.createCommentVNode("", true)])]), vue.createElementVNode("div",
|
|
3158
|
+
}, null, 8, ["title", "rotate"])])) : vue.createCommentVNode("", true)])], 2), vue.createElementVNode("div", {
|
|
3159
|
+
class: vue.normalizeClass(["fold-body", __props.body ? __props.body.class : []]),
|
|
3160
|
+
ref: "foldBody"
|
|
3161
|
+
}, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(slotHandle)))], 2)], 2);
|
|
3143
3162
|
};
|
|
3144
3163
|
}
|
|
3145
3164
|
});
|
|
@@ -3204,34 +3223,45 @@
|
|
|
3204
3223
|
const map = Object.create(null);
|
|
3205
3224
|
map.main = {
|
|
3206
3225
|
scrollable: props.main && props.main.scroll != void 0,
|
|
3207
|
-
class:
|
|
3226
|
+
class: buildAreaClass("main-area", props.main),
|
|
3208
3227
|
style: void 0
|
|
3209
3228
|
};
|
|
3210
3229
|
if (props.mode == "vertical") {
|
|
3211
3230
|
map.top = {
|
|
3212
3231
|
scrollable: props.top && props.top.scroll != void 0,
|
|
3213
|
-
class:
|
|
3232
|
+
class: buildAreaClass("top-area", props.top),
|
|
3214
3233
|
style: buildHeightStyle(props.top)
|
|
3215
3234
|
};
|
|
3216
3235
|
map.bottom = {
|
|
3217
3236
|
scrollable: props.bottom && props.bottom.scroll != void 0,
|
|
3218
|
-
class:
|
|
3237
|
+
class: buildAreaClass("bottom-area", props.bottom),
|
|
3219
3238
|
style: buildHeightStyle(props.bottom)
|
|
3220
3239
|
};
|
|
3221
3240
|
} else {
|
|
3222
3241
|
map.left = {
|
|
3223
3242
|
scrollable: props.left && props.left.scroll != void 0,
|
|
3224
|
-
class:
|
|
3243
|
+
class: buildAreaClass("left-area", props.left),
|
|
3225
3244
|
style: buildWidthStyle(props.left)
|
|
3226
3245
|
};
|
|
3227
3246
|
map.right = {
|
|
3228
3247
|
scrollable: props.right && props.right.scroll != void 0,
|
|
3229
|
-
class:
|
|
3248
|
+
class: buildAreaClass("right-area", props.right),
|
|
3230
3249
|
style: buildWidthStyle(props.right)
|
|
3231
3250
|
};
|
|
3232
3251
|
}
|
|
3233
3252
|
return map;
|
|
3234
3253
|
});
|
|
3254
|
+
function buildAreaClass(fixedClass, cssClass) {
|
|
3255
|
+
const classArray = [fixedClass];
|
|
3256
|
+
if (cssClass != void 0) {
|
|
3257
|
+
if (snail_core.isArray(cssClass.class) == true) {
|
|
3258
|
+
classArray.push(...cssClass.class);
|
|
3259
|
+
} else if (snail_core.isStringNotEmpty(cssClass.class) == true) {
|
|
3260
|
+
classArray.push(cssClass.class);
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
return classArray;
|
|
3264
|
+
}
|
|
3235
3265
|
function buildWidthStyle(style) {
|
|
3236
3266
|
return style ? snail_view.css.buildStyle({
|
|
3237
3267
|
minWidth: style.minWidth,
|
|
@@ -60,20 +60,20 @@ textarea.snail-textarea{font-size:14px;line-height:1.5em;overflow-x:hidden;overf
|
|
|
60
60
|
.snail-empty{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;min-height:150px;width:100%}.snail-empty>img{height:60px;width:60px}.snail-empty>div.message{color:#babdc2;font-weight:400;padding:0 10px 10px}
|
|
61
61
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/prompt/loading.vue index:0 */
|
|
62
62
|
.snail-loading{height:100%;left:0;position:absolute;top:0;width:100%;z-index:10000}.snail-loading.show-mask{background-color:rgba(0,0,0,.15)}.snail-loading:after,.snail-loading:before{animation:snail-loading-stretch 1s ease-in-out infinite;border-radius:50%;content:"";display:block;display:inline-block;height:10px;left:50%;margin-left:-18px;margin-top:-6px;position:absolute;top:50%;width:10px}.snail-loading:before{background-color:#279bf1}.snail-loading:after{animation-delay:-.5s;background:#64d214;margin-left:0;margin-right:-18px}@keyframes snail-loading-stretch{0%,to{transform:scale(1)}50%{transform:scale(2)}}
|
|
63
|
-
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/picker/components/time-pc.vue index:0 */
|
|
64
|
-
.snail-layout.time-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:240px!important;overflow:hidden!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:210px!important}.snail-layout.time-picker.pc>.main-area{display:flex;flex-wrap:nowrap;justify-content:space-between;margin:10px;overflow:hidden}.snail-layout.time-picker.pc>.main-area>.tz-item{border:1px solid #eee;border-left:none;flex-shrink:0;overflow:hidden auto;width:30%}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number{align-items:center;border-left:1px solid #eee;cursor:pointer;display:flex;height:24px;justify-content:center}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number:hover{background-color:#f4f4f4}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.active{background-color:#58a4fd;border-color:#58a4fd;color:#fff!important}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.active.disabled{opacity:.6}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.disabled{color:#ddd;cursor:not-allowed}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar{width:4px}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.6);border:none;border-radius:0}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar-track{background:rgba(0,0,0,.1);border-radius:0}.snail-layout.time-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.time-picker.pc>.bottom-area>.snail-button{color:#999;font-size:12px;margin-left:4px}.snail-layout.time-picker.pc>.bottom-area>.snail-button:hover,.snail-layout.time-picker.pc>.bottom-area>.snail-button:last-child{color:#58a4fd}.snail-layout.time-picker.pc>.bottom-area>.snail-button.disabled{cursor:not-allowed;opacity:.6}.snail-layout.time-picker.pc.second-disabled{width:180px}.snail-layout.time-picker.pc.second-disabled>.main-area>.tz-item{width:46%}
|
|
65
|
-
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/picker/components/date-pc.vue index:0 */
|
|
66
|
-
.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}
|
|
67
63
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/confirm-container.vue index:0 */
|
|
68
64
|
.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}
|
|
69
|
-
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/follow-container.vue index:0 */
|
|
70
|
-
.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}
|
|
71
65
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/dialog-container.vue index:0 */
|
|
72
66
|
.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.unactive:before{opacity:0}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}
|
|
73
67
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/popup-container.vue index:0 */
|
|
74
68
|
.snail-popup{left:0;position:fixed;top:0}
|
|
69
|
+
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/follow-container.vue index:0 */
|
|
70
|
+
.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}
|
|
75
71
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/popup/components/toast-container.vue index:0 */
|
|
76
72
|
.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}
|
|
73
|
+
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/picker/components/time-pc.vue index:0 */
|
|
74
|
+
.snail-layout.time-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:240px!important;overflow:hidden!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:210px!important}.snail-layout.time-picker.pc>.main-area{display:flex;flex-wrap:nowrap;justify-content:space-between;margin:10px;overflow:hidden}.snail-layout.time-picker.pc>.main-area>.tz-item{border:1px solid #eee;border-left:none;flex-shrink:0;overflow:hidden auto;width:30%}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number{align-items:center;border-left:1px solid #eee;cursor:pointer;display:flex;height:24px;justify-content:center}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number:hover{background-color:#f4f4f4}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.active{background-color:#58a4fd;border-color:#58a4fd;color:#fff!important}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.active.disabled{opacity:.6}.snail-layout.time-picker.pc>.main-area>.tz-item>.tzi-number.disabled{color:#ddd;cursor:not-allowed}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar{width:4px}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.6);border:none;border-radius:0}.snail-layout.time-picker.pc>.main-area>.tz-item::-webkit-scrollbar-track{background:rgba(0,0,0,.1);border-radius:0}.snail-layout.time-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.time-picker.pc>.bottom-area>.snail-button{color:#999;font-size:12px;margin-left:4px}.snail-layout.time-picker.pc>.bottom-area>.snail-button:hover,.snail-layout.time-picker.pc>.bottom-area>.snail-button:last-child{color:#58a4fd}.snail-layout.time-picker.pc>.bottom-area>.snail-button.disabled{cursor:not-allowed;opacity:.6}.snail-layout.time-picker.pc.second-disabled{width:180px}.snail-layout.time-picker.pc.second-disabled>.main-area>.tz-item{width:46%}
|
|
75
|
+
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/picker/components/date-pc.vue index:0 */
|
|
76
|
+
.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}
|
|
77
77
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/base/components/select-popup.vue index:0 */
|
|
78
78
|
.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}
|
|
79
79
|
/* src:../../../../../01_snail/snail.js/packages/snail.vue/src/container/components/action-items.vue index:0 */
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "依赖【snail】,基于vue封装常用UI组件",
|
|
4
4
|
"author": "snail_dev@163.com",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.0.
|
|
6
|
+
"version": "2.0.23",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/snail.vue.js",
|
|
9
9
|
"module": "dist/snail.vue.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"vue": "^3.5.14",
|
|
17
|
-
"snail.core": ">=2.0.
|
|
18
|
-
"snail.view": ">=2.0.
|
|
17
|
+
"snail.core": ">=2.0.30",
|
|
18
|
+
"snail.view": ">=2.0.11",
|
|
19
19
|
"sortablejs": ">=1.15.6"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|