snail.vue 1.0.24 → 1.0.27
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 +27 -91
- package/dist/snail.vue.js +59 -64
- package/dist/snail.vue.umd.js +54 -59
- package/dist/styles/snail.vue.vue.css +15 -15
- package/package.json +3 -3
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as snail_view from 'snail.view';
|
|
2
|
+
import { BaseStyle, WidthStyle, FlexBoxStyle, HeightStyle, BorderStyle, PaddingStyle } from 'snail.view';
|
|
2
3
|
import * as vue from 'vue';
|
|
3
4
|
import { Component, App, Ref, ShallowRef } from 'vue';
|
|
4
5
|
import { IScope } from 'snail.core';
|
|
@@ -13,10 +14,11 @@ type LoadingOptions = {
|
|
|
13
14
|
*/
|
|
14
15
|
show: boolean;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
-
* -
|
|
17
|
+
* 禁用【遮罩层】
|
|
18
|
+
* - false 显示遮罩层
|
|
19
|
+
* - true 不显示遮罩层
|
|
18
20
|
*/
|
|
19
|
-
|
|
21
|
+
maskDisabled?: boolean;
|
|
20
22
|
/**
|
|
21
23
|
* loading的根样式
|
|
22
24
|
* - 外部传入后,可进行自由定制loading样式
|
|
@@ -116,7 +118,7 @@ type InputOptions = {
|
|
|
116
118
|
* - 对齐方式
|
|
117
119
|
* - 标题区域宽度
|
|
118
120
|
*/
|
|
119
|
-
titleStyle?:
|
|
121
|
+
titleStyle?: BaseStyle & WidthStyle & FlexBoxStyle;
|
|
120
122
|
};
|
|
121
123
|
/**
|
|
122
124
|
* 输入框事件
|
|
@@ -183,92 +185,26 @@ type TableOptions = ScrollOptions & {
|
|
|
183
185
|
border?: boolean;
|
|
184
186
|
/**
|
|
185
187
|
* 表头样式
|
|
188
|
+
* - 约束高度和背景颜色
|
|
189
|
+
* - 后期再增加其他的
|
|
186
190
|
*/
|
|
187
|
-
headerStyle?:
|
|
191
|
+
headerStyle?: BaseStyle & HeightStyle;
|
|
188
192
|
/**
|
|
189
193
|
* 表尾部样式
|
|
194
|
+
* - 约束高度和背景颜色
|
|
195
|
+
* - 后期再增加其他的
|
|
190
196
|
*/
|
|
191
|
-
footerStyle?:
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* 表格样式配置选项
|
|
195
|
-
* - 用于表头和表尾配置样式
|
|
196
|
-
*/
|
|
197
|
-
type TableStyleOptions = {
|
|
198
|
-
/**
|
|
199
|
-
* 背景色
|
|
200
|
-
*/
|
|
201
|
-
background?: string;
|
|
202
|
-
/**
|
|
203
|
-
* 高度
|
|
204
|
-
*/
|
|
205
|
-
height?: number;
|
|
206
|
-
/**
|
|
207
|
-
* 高度单位
|
|
208
|
-
* - 默认 px
|
|
209
|
-
*/
|
|
210
|
-
heightUnit?: "px" | "rem" | "vw" | "vh";
|
|
197
|
+
footerStyle?: BaseStyle & HeightStyle;
|
|
211
198
|
};
|
|
212
199
|
/**
|
|
213
200
|
* Table 行配置选项
|
|
214
201
|
*/
|
|
215
|
-
type TableRowOptions = {
|
|
216
|
-
/**
|
|
217
|
-
* 行高
|
|
218
|
-
*/
|
|
219
|
-
height: number;
|
|
220
|
-
/**
|
|
221
|
-
* 行高单位
|
|
222
|
-
* - 默认px
|
|
223
|
-
*/
|
|
224
|
-
unit?: "px" | "rem" | "vw" | "vh";
|
|
225
|
-
};
|
|
202
|
+
type TableRowOptions = HeightStyle & {};
|
|
226
203
|
/**
|
|
227
204
|
* Table 列配置选项
|
|
205
|
+
* - border 样式需要配合TableOptions.border使用,否则会导致边框线重叠
|
|
228
206
|
*/
|
|
229
|
-
type TableColOptions =
|
|
230
|
-
/**
|
|
231
|
-
* 列占比
|
|
232
|
-
* - 存在时,width属性无效
|
|
233
|
-
*/
|
|
234
|
-
flex?: number;
|
|
235
|
-
/**
|
|
236
|
-
* 列宽
|
|
237
|
-
*/
|
|
238
|
-
width?: number;
|
|
239
|
-
/**
|
|
240
|
-
* 列最小宽度
|
|
241
|
-
* - width属性未指定、或者无效时生效;
|
|
242
|
-
* - 推荐和flex搭配使用
|
|
243
|
-
*/
|
|
244
|
-
minWidth?: number;
|
|
245
|
-
/**
|
|
246
|
-
* 列最大宽度
|
|
247
|
-
* - width属性未指定、或者无效时生效;
|
|
248
|
-
* - 推荐和flex搭配使用
|
|
249
|
-
*/
|
|
250
|
-
maxWidth?: number;
|
|
251
|
-
/**
|
|
252
|
-
* 列宽单位
|
|
253
|
-
* - 默认px
|
|
254
|
-
*/
|
|
255
|
-
unit?: "px" | "rem" | "vw" | "vh";
|
|
256
|
-
/**
|
|
257
|
-
* 列对齐方式
|
|
258
|
-
* - 默认left
|
|
259
|
-
*/
|
|
260
|
-
align?: "left" | "center" | "right";
|
|
261
|
-
/**
|
|
262
|
-
* border样式
|
|
263
|
-
* - 完整的border样式;如 1px soloid #000000
|
|
264
|
-
* - 需要配合TableOptions.border使用,否则会导致边框线重叠
|
|
265
|
-
*/
|
|
266
|
-
borderStyle?: string;
|
|
267
|
-
/**
|
|
268
|
-
* padding样式
|
|
269
|
-
*/
|
|
270
|
-
paddingStyle?: string;
|
|
271
|
-
};
|
|
207
|
+
type TableColOptions = BaseStyle & FlexBoxStyle & WidthStyle & BorderStyle & PaddingStyle;
|
|
272
208
|
|
|
273
209
|
/**
|
|
274
210
|
* 折叠面板配置选项
|
|
@@ -284,10 +220,10 @@ type FoldOptions = {
|
|
|
284
220
|
*/
|
|
285
221
|
subtitle?: string;
|
|
286
222
|
/**
|
|
287
|
-
*
|
|
223
|
+
* 禁用【折叠】功能
|
|
288
224
|
* - true 则禁用折叠,始终展开内容区域
|
|
289
225
|
*/
|
|
290
|
-
|
|
226
|
+
disabled?: boolean;
|
|
291
227
|
};
|
|
292
228
|
/**
|
|
293
229
|
* 折叠状态
|
|
@@ -438,7 +374,7 @@ type HeaderOptions = {
|
|
|
438
374
|
/** 禁用【关闭】按钮
|
|
439
375
|
* - 默认值false
|
|
440
376
|
*/
|
|
441
|
-
|
|
377
|
+
closeDisabled?: boolean;
|
|
442
378
|
};
|
|
443
379
|
/**
|
|
444
380
|
* 头部事件
|
|
@@ -473,7 +409,7 @@ type FooterOptions = {
|
|
|
473
409
|
* 禁用【取消】按钮
|
|
474
410
|
* - 为true时,不显示【取消】按钮
|
|
475
411
|
*/
|
|
476
|
-
|
|
412
|
+
cancelDisabled?: boolean;
|
|
477
413
|
/**
|
|
478
414
|
* 【确定】按钮名称
|
|
479
415
|
* - 默认【确定】
|
|
@@ -483,7 +419,7 @@ type FooterOptions = {
|
|
|
483
419
|
* 禁用【确定】按钮
|
|
484
420
|
* - 为true时,不显示【确定】按钮
|
|
485
421
|
*/
|
|
486
|
-
|
|
422
|
+
confirmDisabled?: boolean;
|
|
487
423
|
};
|
|
488
424
|
/**
|
|
489
425
|
* 底部组件事件
|
|
@@ -699,7 +635,7 @@ type ConfirmOptions = {
|
|
|
699
635
|
* 禁用【取消】按钮
|
|
700
636
|
* - 为true时,不显示【取消】按钮
|
|
701
637
|
*/
|
|
702
|
-
|
|
638
|
+
cancelDisabled?: boolean;
|
|
703
639
|
/**
|
|
704
640
|
* 【确定】按钮名称
|
|
705
641
|
* - 默认【确定】
|
|
@@ -709,7 +645,7 @@ type ConfirmOptions = {
|
|
|
709
645
|
* 禁用【确定】按钮
|
|
710
646
|
* - 为true时,不显示【确定】按钮
|
|
711
647
|
*/
|
|
712
|
-
|
|
648
|
+
confirmDisabled?: boolean;
|
|
713
649
|
};
|
|
714
650
|
/**
|
|
715
651
|
* 确认弹窗句柄
|
|
@@ -945,18 +881,18 @@ declare const components: {
|
|
|
945
881
|
};
|
|
946
882
|
});
|
|
947
883
|
TableRow: {
|
|
948
|
-
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<
|
|
884
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, true, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
949
885
|
P: {};
|
|
950
886
|
B: {};
|
|
951
887
|
D: {};
|
|
952
888
|
C: {};
|
|
953
889
|
M: {};
|
|
954
890
|
Defaults: {};
|
|
955
|
-
}, Readonly<
|
|
891
|
+
}, Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
956
892
|
__isFragment?: never;
|
|
957
893
|
__isTeleport?: never;
|
|
958
894
|
__isSuspense?: never;
|
|
959
|
-
} & vue.ComponentOptionsBase<Readonly<
|
|
895
|
+
} & vue.ComponentOptionsBase<Readonly<snail_view.HeightStyle> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
960
896
|
$slots: {
|
|
961
897
|
default?: (props: {}) => any;
|
|
962
898
|
};
|
|
@@ -1043,4 +979,4 @@ declare const components: {
|
|
|
1043
979
|
declare function mount(options: ComponentMountOptions, onDestroyed?: (fn: () => void) => void): IScope;
|
|
1044
980
|
|
|
1045
981
|
export { components, confirm, getSvgIcon, mount, onAppCreated, openDialog, scopeDialog, scopeRef, toast, triggerAppCreated };
|
|
1046
|
-
export type { ButtonOptions, ComponentMountOptions, ComponentOptions, ConfirmHandle, ConfirmOptions, Dialog, DialogHandle, DialogOpenResult, DialogOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IconOptions, IconPathOptions, IconType, InputEvents, InputOptions, LoadingOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions,
|
|
982
|
+
export type { ButtonOptions, ComponentMountOptions, ComponentOptions, ConfirmHandle, ConfirmOptions, Dialog, DialogHandle, DialogOpenResult, DialogOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IconOptions, IconPathOptions, IconType, InputEvents, InputOptions, LoadingOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, ToastHandle, ToastOptions };
|
package/dist/snail.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, createBlock, createCommentVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, unref, computed, mergeProps, mergeModels, useModel, Transition, withCtx, ref, shallowRef, watch, onErrorCaptured, onActivated, onDeactivated, Fragment, resolveDynamicComponent, createSlots, renderList, useTemplateRef, onUnmounted, createVNode, normalizeStyle, TransitionGroup, withModifiers, createApp, onMounted } from 'vue';
|
|
3
3
|
import { tidyString, throwError, mustString, mustFunction, useScope, isStringNotEmpty, isObject, script, delay, getMessage, useHook, mustObject, defer, newId, isFunction } from 'snail.core';
|
|
4
|
-
import { link, useAnimation,
|
|
4
|
+
import { link, useAnimation, css, useObserver } from 'snail.view';
|
|
5
5
|
|
|
6
6
|
var _sfc_main$h = defineComponent({
|
|
7
7
|
...{
|
|
@@ -23,6 +23,10 @@ var _sfc_main$h = defineComponent({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
27
|
+
|
|
28
|
+
addLink("/styles/snail.vue.vue.css");
|
|
29
|
+
|
|
26
30
|
var _sfc_main$g = defineComponent({
|
|
27
31
|
...{
|
|
28
32
|
name: "Footer",
|
|
@@ -35,11 +39,11 @@ var _sfc_main$g = defineComponent({
|
|
|
35
39
|
type: Boolean
|
|
36
40
|
},
|
|
37
41
|
cancelName: {},
|
|
38
|
-
|
|
42
|
+
cancelDisabled: {
|
|
39
43
|
type: Boolean
|
|
40
44
|
},
|
|
41
45
|
confirmName: {},
|
|
42
|
-
|
|
46
|
+
confirmDisabled: {
|
|
43
47
|
type: Boolean
|
|
44
48
|
}
|
|
45
49
|
},
|
|
@@ -55,13 +59,13 @@ var _sfc_main$g = defineComponent({
|
|
|
55
59
|
class: normalizeClass(["snail-footer", {
|
|
56
60
|
"start-divider": props.divider
|
|
57
61
|
}, props.align || "right"])
|
|
58
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [props.
|
|
62
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$h, {
|
|
59
63
|
key: 0,
|
|
60
64
|
size: "max",
|
|
61
65
|
type: "default",
|
|
62
66
|
onClick: _cache[0] || (_cache[0] = $event => emit("cancel")),
|
|
63
67
|
textContent: toDisplayString(props.cancelName || "取消")
|
|
64
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true), props.
|
|
68
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true), props.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$h, {
|
|
65
69
|
key: 1,
|
|
66
70
|
size: "max",
|
|
67
71
|
type: "primary",
|
|
@@ -135,10 +139,6 @@ var _sfc_main$f = defineComponent({
|
|
|
135
139
|
}
|
|
136
140
|
});
|
|
137
141
|
|
|
138
|
-
var addLink = href => setTimeout(link.register, 0, href);
|
|
139
|
-
|
|
140
|
-
addLink("/styles/snail.vue.vue.css");
|
|
141
|
-
|
|
142
142
|
const _hoisted_1$8 = ["textContent"];
|
|
143
143
|
var _sfc_main$e = defineComponent({
|
|
144
144
|
...{
|
|
@@ -159,7 +159,7 @@ var _sfc_main$e = defineComponent({
|
|
|
159
159
|
titleAlign: {
|
|
160
160
|
default: "center"
|
|
161
161
|
},
|
|
162
|
-
|
|
162
|
+
closeDisabled: {
|
|
163
163
|
type: Boolean,
|
|
164
164
|
default: false
|
|
165
165
|
}
|
|
@@ -184,7 +184,7 @@ var _sfc_main$e = defineComponent({
|
|
|
184
184
|
key: 0,
|
|
185
185
|
textContent: toDisplayString(_ctx.title),
|
|
186
186
|
class: normalizeClass(["header-title", _ctx.titleAlign])
|
|
187
|
-
}, null, 10, _hoisted_1$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.
|
|
187
|
+
}, null, 10, _hoisted_1$8)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$f, mergeProps({
|
|
188
188
|
key: 1,
|
|
189
189
|
class: "close-icon"
|
|
190
190
|
}, closeIconOptions.value, {
|
|
@@ -274,7 +274,7 @@ var _sfc_main$c = defineComponent({
|
|
|
274
274
|
type: Boolean,
|
|
275
275
|
default: false
|
|
276
276
|
},
|
|
277
|
-
|
|
277
|
+
maskDisabled: {
|
|
278
278
|
type: Boolean,
|
|
279
279
|
default: false
|
|
280
280
|
},
|
|
@@ -293,7 +293,7 @@ var _sfc_main$c = defineComponent({
|
|
|
293
293
|
default: withCtx(() => [_ctx.show ? (openBlock(), createElementBlock("div", {
|
|
294
294
|
key: 0,
|
|
295
295
|
class: normalizeClass(["snail-loading", {
|
|
296
|
-
"show-mask": _ctx.
|
|
296
|
+
"show-mask": _ctx.maskDisabled != true
|
|
297
297
|
}, _ctx.rootClass])
|
|
298
298
|
}, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(_ctx.$attrs)))], 2)) : createCommentVNode("", true)]),
|
|
299
299
|
_: 3
|
|
@@ -406,7 +406,7 @@ var _sfc_main$a = defineComponent({
|
|
|
406
406
|
props: mergeModels({
|
|
407
407
|
title: {},
|
|
408
408
|
subtitle: {},
|
|
409
|
-
|
|
409
|
+
disabled: {
|
|
410
410
|
type: Boolean
|
|
411
411
|
}
|
|
412
412
|
}, {
|
|
@@ -490,7 +490,7 @@ var _sfc_main$a = defineComponent({
|
|
|
490
490
|
key: 0,
|
|
491
491
|
class: "subtitle",
|
|
492
492
|
textContent: toDisplayString(props.subtitle)
|
|
493
|
-
}, null, 8, _hoisted_3$2)) : createCommentVNode("", true), props.
|
|
493
|
+
}, null, 8, _hoisted_3$2)) : createCommentVNode("", true), props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$1, [createElementVNode("span", {
|
|
494
494
|
title: status.value == "expand" ? "收起" : "展开",
|
|
495
495
|
ref: "foldStatusSpan"
|
|
496
496
|
}, [createVNode(_sfc_main$f, {
|
|
@@ -556,13 +556,8 @@ var _sfc_main$8 = defineComponent({
|
|
|
556
556
|
},
|
|
557
557
|
setup(__props) {
|
|
558
558
|
const props = __props;
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
const style = Object.create(null);
|
|
562
|
-
styleOptions.background && (style.background = styleOptions.background);
|
|
563
|
-
styleOptions.height && (style.height = styleOptions.height + (styleOptions.heightUnit || "px"));
|
|
564
|
-
return style;
|
|
565
|
-
}
|
|
559
|
+
const headerStyle = computed(() => css.buildStyle(props.headerStyle));
|
|
560
|
+
const footerStyle = computed(() => css.buildStyle(props.footerStyle));
|
|
566
561
|
return (_ctx, _cache) => {
|
|
567
562
|
return openBlock(), createBlock(_sfc_main$9, {
|
|
568
563
|
class: normalizeClass(["snail-table", {
|
|
@@ -571,12 +566,12 @@ var _sfc_main$8 = defineComponent({
|
|
|
571
566
|
"scroll-x": props.scrollX,
|
|
572
567
|
"scroll-y": props.scrollY
|
|
573
568
|
}, {
|
|
574
|
-
default: withCtx(() => [createElementVNode("
|
|
569
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
575
570
|
class: "table-header",
|
|
576
|
-
style: normalizeStyle(
|
|
577
|
-
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("
|
|
571
|
+
style: normalizeStyle(headerStyle.value)
|
|
572
|
+
}, [renderSlot(_ctx.$slots, "header")], 4), createElementVNode("div", _hoisted_1$6, [renderSlot(_ctx.$slots, "default")]), createElementVNode("div", {
|
|
578
573
|
class: "table-footer",
|
|
579
|
-
style: normalizeStyle(
|
|
574
|
+
style: normalizeStyle(footerStyle.value)
|
|
580
575
|
}, [renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
581
576
|
_: 3
|
|
582
577
|
}, 8, ["scroll-x", "scroll-y", "class"]);
|
|
@@ -592,15 +587,12 @@ var _sfc_main$7 = defineComponent({
|
|
|
592
587
|
__name: "table-row",
|
|
593
588
|
props: {
|
|
594
589
|
height: {},
|
|
595
|
-
|
|
590
|
+
minHeight: {},
|
|
591
|
+
maxHeight: {}
|
|
596
592
|
},
|
|
597
593
|
setup(__props) {
|
|
598
594
|
const props = __props;
|
|
599
|
-
const rowStyle = computed(() =>
|
|
600
|
-
const style = Object.create(null);
|
|
601
|
-
props.height > 0 && (style.height = props.height + (props.unit || "px"));
|
|
602
|
-
return style;
|
|
603
|
-
});
|
|
595
|
+
const rowStyle = computed(() => css.buildStyle(props));
|
|
604
596
|
return (_ctx, _cache) => {
|
|
605
597
|
return openBlock(), createElementBlock("div", {
|
|
606
598
|
class: "table-row",
|
|
@@ -617,31 +609,39 @@ var _sfc_main$6 = defineComponent({
|
|
|
617
609
|
},
|
|
618
610
|
__name: "table-col",
|
|
619
611
|
props: {
|
|
612
|
+
color: {},
|
|
613
|
+
backgroundColor: {},
|
|
614
|
+
textAlign: {},
|
|
615
|
+
verticalAlign: {},
|
|
616
|
+
justifyContent: {},
|
|
617
|
+
alignItems: {},
|
|
620
618
|
flex: {},
|
|
619
|
+
flexBasis: {},
|
|
620
|
+
flexGrow: {},
|
|
621
|
+
flexShrink: {},
|
|
622
|
+
order: {},
|
|
623
|
+
alignSelf: {},
|
|
621
624
|
width: {},
|
|
622
625
|
minWidth: {},
|
|
623
626
|
maxWidth: {},
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
borderRadius: {},
|
|
628
|
+
border: {},
|
|
629
|
+
borderTop: {},
|
|
630
|
+
borderRight: {},
|
|
631
|
+
borderBottom: {},
|
|
632
|
+
borderLeft: {},
|
|
633
|
+
padding: {},
|
|
634
|
+
paddingTop: {},
|
|
635
|
+
paddingRight: {},
|
|
636
|
+
paddingBottom: {},
|
|
637
|
+
paddingLeft: {}
|
|
628
638
|
},
|
|
629
639
|
setup(__props) {
|
|
630
640
|
const props = __props;
|
|
631
|
-
const colStyle = computed(() =>
|
|
632
|
-
const style = Object.create(null);
|
|
633
|
-
props.flex != void 0 ? style.flex = String(props.flex) : props.width && (style.width = props.width + (props.unit || "px"));
|
|
634
|
-
if (props.flex != void 0 || props.width == void 0) {
|
|
635
|
-
props.minWidth && (style.minWidth = props.minWidth + (props.unit || "px"));
|
|
636
|
-
props.maxWidth && (style.maxWidth = props.maxWidth + (props.unit || "px"));
|
|
637
|
-
}
|
|
638
|
-
props.borderStyle && (style.border = props.borderStyle);
|
|
639
|
-
props.paddingStyle && (style.padding = props.paddingStyle);
|
|
640
|
-
return style;
|
|
641
|
-
});
|
|
641
|
+
const colStyle = computed(() => css.buildStyle(props));
|
|
642
642
|
return (_ctx, _cache) => {
|
|
643
643
|
return openBlock(), createElementBlock("div", {
|
|
644
|
-
class: normalizeClass(["table-col", props.
|
|
644
|
+
class: normalizeClass(["table-col", props.textAlign]),
|
|
645
645
|
style: normalizeStyle(colStyle.value)
|
|
646
646
|
}, [renderSlot(_ctx.$slots, "default")], 6);
|
|
647
647
|
};
|
|
@@ -781,13 +781,6 @@ const initVueApp = (() => {
|
|
|
781
781
|
};
|
|
782
782
|
})();
|
|
783
783
|
|
|
784
|
-
function getTitleStyle(options, isFlex) {
|
|
785
|
-
return options && options.titleStyle ? style.build({
|
|
786
|
-
...options.titleStyle,
|
|
787
|
-
width: options.titleStyle
|
|
788
|
-
}, isFlex) : Object.create(null);
|
|
789
|
-
}
|
|
790
|
-
|
|
791
784
|
const _hoisted_1$4 = ["textContent"];
|
|
792
785
|
const _hoisted_2$3 = {
|
|
793
786
|
key: 0,
|
|
@@ -832,7 +825,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
832
825
|
const inputRef = useTemplateRef("inputRef");
|
|
833
826
|
const inputModel = useModel(__props, "modelValue");
|
|
834
827
|
const validateRef = shallowRef();
|
|
835
|
-
const titleStyle =
|
|
828
|
+
const titleStyle = computed(() => css.buildStyle(props.titleStyle));
|
|
836
829
|
function onValueChange() {
|
|
837
830
|
const text = inputRef.value.value || "";
|
|
838
831
|
inputModel.value = text;
|
|
@@ -847,7 +840,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
847
840
|
}, [!!props.title ? (openBlock(), createElementBlock("div", {
|
|
848
841
|
key: 0,
|
|
849
842
|
class: "input-title",
|
|
850
|
-
style: normalizeStyle(
|
|
843
|
+
style: normalizeStyle(titleStyle.value)
|
|
851
844
|
}, [createElementVNode("span", {
|
|
852
845
|
class: "text",
|
|
853
846
|
textContent: toDisplayString(props.title)
|
|
@@ -968,11 +961,11 @@ var _sfc_main$2 = defineComponent({
|
|
|
968
961
|
title: {},
|
|
969
962
|
message: {},
|
|
970
963
|
cancelName: {},
|
|
971
|
-
|
|
964
|
+
cancelDisabled: {
|
|
972
965
|
type: Boolean
|
|
973
966
|
},
|
|
974
967
|
confirmName: {},
|
|
975
|
-
|
|
968
|
+
confirmDisabled: {
|
|
976
969
|
type: Boolean
|
|
977
970
|
},
|
|
978
971
|
inDialog: {
|
|
@@ -997,9 +990,9 @@ var _sfc_main$2 = defineComponent({
|
|
|
997
990
|
}, null, 8, _hoisted_2$1), createVNode(_sfc_main$g, {
|
|
998
991
|
align: "right",
|
|
999
992
|
"cancel-name": props.cancelName,
|
|
1000
|
-
"cancel-disable": props.
|
|
993
|
+
"cancel-disable": props.cancelDisabled,
|
|
1001
994
|
"confirm-name": props.confirmName,
|
|
1002
|
-
"confirm-disable": props.
|
|
995
|
+
"confirm-disable": props.confirmDisabled,
|
|
1003
996
|
onCancel: _cache[1] || (_cache[1] = $event => props.closeDialog(false)),
|
|
1004
997
|
onConfirm: _cache[2] || (_cache[2] = $event => props.closeDialog(true))
|
|
1005
998
|
}, null, 8, ["cancel-name", "cancel-disable", "confirm-name", "confirm-disable"])]);
|
|
@@ -1069,6 +1062,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
1069
1062
|
emit: __emit
|
|
1070
1063
|
} = _ref;
|
|
1071
1064
|
const emit = __emit;
|
|
1065
|
+
const observer = useObserver();
|
|
1072
1066
|
const isTouch = "ontouchstart" in window;
|
|
1073
1067
|
const dragHandle = useTemplateRef("dragHandle");
|
|
1074
1068
|
const dragInfo = ref({
|
|
@@ -1106,10 +1100,11 @@ var _sfc_main$1 = defineComponent({
|
|
|
1106
1100
|
}
|
|
1107
1101
|
}
|
|
1108
1102
|
}
|
|
1109
|
-
isTouch || onMounted(()
|
|
1110
|
-
|
|
1111
|
-
|
|
1103
|
+
isTouch || onMounted(function () {
|
|
1104
|
+
observer.onEvent(window, "mousemove", onDragMove);
|
|
1105
|
+
observer.onEvent(window, "mouseup", onDragEnd);
|
|
1112
1106
|
});
|
|
1107
|
+
onUnmounted(observer.destroy);
|
|
1113
1108
|
return (_ctx, _cache) => {
|
|
1114
1109
|
return openBlock(), createElementBlock("div", {
|
|
1115
1110
|
class: normalizeClass(["snail-drag-verify", {
|
package/dist/snail.vue.umd.js
CHANGED
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
type: Boolean
|
|
38
38
|
},
|
|
39
39
|
cancelName: {},
|
|
40
|
-
|
|
40
|
+
cancelDisabled: {
|
|
41
41
|
type: Boolean
|
|
42
42
|
},
|
|
43
43
|
confirmName: {},
|
|
44
|
-
|
|
44
|
+
confirmDisabled: {
|
|
45
45
|
type: Boolean
|
|
46
46
|
}
|
|
47
47
|
},
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
class: vue.normalizeClass(["snail-footer", {
|
|
58
58
|
"start-divider": props.divider
|
|
59
59
|
}, props.align || "right"])
|
|
60
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [props.
|
|
60
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [props.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
|
|
61
61
|
key: 0,
|
|
62
62
|
size: "max",
|
|
63
63
|
type: "default",
|
|
64
64
|
onClick: _cache[0] || (_cache[0] = $event => emit("cancel")),
|
|
65
65
|
textContent: vue.toDisplayString(props.cancelName || "取消")
|
|
66
|
-
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), props.
|
|
66
|
+
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), props.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$h, {
|
|
67
67
|
key: 1,
|
|
68
68
|
size: "max",
|
|
69
69
|
type: "primary",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
titleAlign: {
|
|
158
158
|
default: "center"
|
|
159
159
|
},
|
|
160
|
-
|
|
160
|
+
closeDisabled: {
|
|
161
161
|
type: Boolean,
|
|
162
162
|
default: false
|
|
163
163
|
}
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
key: 0,
|
|
183
183
|
textContent: vue.toDisplayString(_ctx.title),
|
|
184
184
|
class: vue.normalizeClass(["header-title", _ctx.titleAlign])
|
|
185
|
-
}, null, 10, _hoisted_1$8)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.
|
|
185
|
+
}, null, 10, _hoisted_1$8)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$f, vue.mergeProps({
|
|
186
186
|
key: 1,
|
|
187
187
|
class: "close-icon"
|
|
188
188
|
}, closeIconOptions.value, {
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
type: Boolean,
|
|
273
273
|
default: false
|
|
274
274
|
},
|
|
275
|
-
|
|
275
|
+
maskDisabled: {
|
|
276
276
|
type: Boolean,
|
|
277
277
|
default: false
|
|
278
278
|
},
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
default: vue.withCtx(() => [_ctx.show ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
292
292
|
key: 0,
|
|
293
293
|
class: vue.normalizeClass(["snail-loading", {
|
|
294
|
-
"show-mask": _ctx.
|
|
294
|
+
"show-mask": _ctx.maskDisabled != true
|
|
295
295
|
}, _ctx.rootClass])
|
|
296
296
|
}, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(_ctx.$attrs)))], 2)) : vue.createCommentVNode("", true)]),
|
|
297
297
|
_: 3
|
|
@@ -404,7 +404,7 @@
|
|
|
404
404
|
props: vue.mergeModels({
|
|
405
405
|
title: {},
|
|
406
406
|
subtitle: {},
|
|
407
|
-
|
|
407
|
+
disabled: {
|
|
408
408
|
type: Boolean
|
|
409
409
|
}
|
|
410
410
|
}, {
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
key: 0,
|
|
489
489
|
class: "subtitle",
|
|
490
490
|
textContent: vue.toDisplayString(props.subtitle)
|
|
491
|
-
}, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), props.
|
|
491
|
+
}, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), props.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [vue.createElementVNode("span", {
|
|
492
492
|
title: status.value == "expand" ? "收起" : "展开",
|
|
493
493
|
ref: "foldStatusSpan"
|
|
494
494
|
}, [vue.createVNode(_sfc_main$f, {
|
|
@@ -554,13 +554,8 @@
|
|
|
554
554
|
},
|
|
555
555
|
setup(__props) {
|
|
556
556
|
const props = __props;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
const style = Object.create(null);
|
|
560
|
-
styleOptions.background && (style.background = styleOptions.background);
|
|
561
|
-
styleOptions.height && (style.height = styleOptions.height + (styleOptions.heightUnit || "px"));
|
|
562
|
-
return style;
|
|
563
|
-
}
|
|
557
|
+
const headerStyle = vue.computed(() => snail_view.css.buildStyle(props.headerStyle));
|
|
558
|
+
const footerStyle = vue.computed(() => snail_view.css.buildStyle(props.footerStyle));
|
|
564
559
|
return (_ctx, _cache) => {
|
|
565
560
|
return vue.openBlock(), vue.createBlock(_sfc_main$9, {
|
|
566
561
|
class: vue.normalizeClass(["snail-table", {
|
|
@@ -569,12 +564,12 @@
|
|
|
569
564
|
"scroll-x": props.scrollX,
|
|
570
565
|
"scroll-y": props.scrollY
|
|
571
566
|
}, {
|
|
572
|
-
default: vue.withCtx(() => [vue.createElementVNode("
|
|
567
|
+
default: vue.withCtx(() => [vue.createElementVNode("div", {
|
|
573
568
|
class: "table-header",
|
|
574
|
-
style: vue.normalizeStyle(
|
|
575
|
-
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("
|
|
569
|
+
style: vue.normalizeStyle(headerStyle.value)
|
|
570
|
+
}, [vue.renderSlot(_ctx.$slots, "header")], 4), vue.createElementVNode("div", _hoisted_1$6, [vue.renderSlot(_ctx.$slots, "default")]), vue.createElementVNode("div", {
|
|
576
571
|
class: "table-footer",
|
|
577
|
-
style: vue.normalizeStyle(
|
|
572
|
+
style: vue.normalizeStyle(footerStyle.value)
|
|
578
573
|
}, [vue.renderSlot(_ctx.$slots, "footer")], 4)]),
|
|
579
574
|
_: 3
|
|
580
575
|
}, 8, ["scroll-x", "scroll-y", "class"]);
|
|
@@ -590,15 +585,12 @@
|
|
|
590
585
|
__name: "table-row",
|
|
591
586
|
props: {
|
|
592
587
|
height: {},
|
|
593
|
-
|
|
588
|
+
minHeight: {},
|
|
589
|
+
maxHeight: {}
|
|
594
590
|
},
|
|
595
591
|
setup(__props) {
|
|
596
592
|
const props = __props;
|
|
597
|
-
const rowStyle = vue.computed(() =>
|
|
598
|
-
const style = Object.create(null);
|
|
599
|
-
props.height > 0 && (style.height = props.height + (props.unit || "px"));
|
|
600
|
-
return style;
|
|
601
|
-
});
|
|
593
|
+
const rowStyle = vue.computed(() => snail_view.css.buildStyle(props));
|
|
602
594
|
return (_ctx, _cache) => {
|
|
603
595
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
604
596
|
class: "table-row",
|
|
@@ -615,31 +607,39 @@
|
|
|
615
607
|
},
|
|
616
608
|
__name: "table-col",
|
|
617
609
|
props: {
|
|
610
|
+
color: {},
|
|
611
|
+
backgroundColor: {},
|
|
612
|
+
textAlign: {},
|
|
613
|
+
verticalAlign: {},
|
|
614
|
+
justifyContent: {},
|
|
615
|
+
alignItems: {},
|
|
618
616
|
flex: {},
|
|
617
|
+
flexBasis: {},
|
|
618
|
+
flexGrow: {},
|
|
619
|
+
flexShrink: {},
|
|
620
|
+
order: {},
|
|
621
|
+
alignSelf: {},
|
|
619
622
|
width: {},
|
|
620
623
|
minWidth: {},
|
|
621
624
|
maxWidth: {},
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
625
|
+
borderRadius: {},
|
|
626
|
+
border: {},
|
|
627
|
+
borderTop: {},
|
|
628
|
+
borderRight: {},
|
|
629
|
+
borderBottom: {},
|
|
630
|
+
borderLeft: {},
|
|
631
|
+
padding: {},
|
|
632
|
+
paddingTop: {},
|
|
633
|
+
paddingRight: {},
|
|
634
|
+
paddingBottom: {},
|
|
635
|
+
paddingLeft: {}
|
|
626
636
|
},
|
|
627
637
|
setup(__props) {
|
|
628
638
|
const props = __props;
|
|
629
|
-
const colStyle = vue.computed(() =>
|
|
630
|
-
const style = Object.create(null);
|
|
631
|
-
props.flex != void 0 ? style.flex = String(props.flex) : props.width && (style.width = props.width + (props.unit || "px"));
|
|
632
|
-
if (props.flex != void 0 || props.width == void 0) {
|
|
633
|
-
props.minWidth && (style.minWidth = props.minWidth + (props.unit || "px"));
|
|
634
|
-
props.maxWidth && (style.maxWidth = props.maxWidth + (props.unit || "px"));
|
|
635
|
-
}
|
|
636
|
-
props.borderStyle && (style.border = props.borderStyle);
|
|
637
|
-
props.paddingStyle && (style.padding = props.paddingStyle);
|
|
638
|
-
return style;
|
|
639
|
-
});
|
|
639
|
+
const colStyle = vue.computed(() => snail_view.css.buildStyle(props));
|
|
640
640
|
return (_ctx, _cache) => {
|
|
641
641
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
642
|
-
class: vue.normalizeClass(["table-col", props.
|
|
642
|
+
class: vue.normalizeClass(["table-col", props.textAlign]),
|
|
643
643
|
style: vue.normalizeStyle(colStyle.value)
|
|
644
644
|
}, [vue.renderSlot(_ctx.$slots, "default")], 6);
|
|
645
645
|
};
|
|
@@ -779,13 +779,6 @@
|
|
|
779
779
|
};
|
|
780
780
|
})();
|
|
781
781
|
|
|
782
|
-
function getTitleStyle(options, isFlex) {
|
|
783
|
-
return options && options.titleStyle ? snail_view.style.build({
|
|
784
|
-
...options.titleStyle,
|
|
785
|
-
width: options.titleStyle
|
|
786
|
-
}, isFlex) : Object.create(null);
|
|
787
|
-
}
|
|
788
|
-
|
|
789
782
|
const _hoisted_1$4 = ["textContent"];
|
|
790
783
|
const _hoisted_2$3 = {
|
|
791
784
|
key: 0,
|
|
@@ -830,7 +823,7 @@
|
|
|
830
823
|
const inputRef = vue.useTemplateRef("inputRef");
|
|
831
824
|
const inputModel = vue.useModel(__props, "modelValue");
|
|
832
825
|
const validateRef = vue.shallowRef();
|
|
833
|
-
const titleStyle =
|
|
826
|
+
const titleStyle = vue.computed(() => snail_view.css.buildStyle(props.titleStyle));
|
|
834
827
|
function onValueChange() {
|
|
835
828
|
const text = inputRef.value.value || "";
|
|
836
829
|
inputModel.value = text;
|
|
@@ -845,7 +838,7 @@
|
|
|
845
838
|
}, [!!props.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
846
839
|
key: 0,
|
|
847
840
|
class: "input-title",
|
|
848
|
-
style: vue.normalizeStyle(
|
|
841
|
+
style: vue.normalizeStyle(titleStyle.value)
|
|
849
842
|
}, [vue.createElementVNode("span", {
|
|
850
843
|
class: "text",
|
|
851
844
|
textContent: vue.toDisplayString(props.title)
|
|
@@ -966,11 +959,11 @@
|
|
|
966
959
|
title: {},
|
|
967
960
|
message: {},
|
|
968
961
|
cancelName: {},
|
|
969
|
-
|
|
962
|
+
cancelDisabled: {
|
|
970
963
|
type: Boolean
|
|
971
964
|
},
|
|
972
965
|
confirmName: {},
|
|
973
|
-
|
|
966
|
+
confirmDisabled: {
|
|
974
967
|
type: Boolean
|
|
975
968
|
},
|
|
976
969
|
inDialog: {
|
|
@@ -995,9 +988,9 @@
|
|
|
995
988
|
}, null, 8, _hoisted_2$1), vue.createVNode(_sfc_main$g, {
|
|
996
989
|
align: "right",
|
|
997
990
|
"cancel-name": props.cancelName,
|
|
998
|
-
"cancel-disable": props.
|
|
991
|
+
"cancel-disable": props.cancelDisabled,
|
|
999
992
|
"confirm-name": props.confirmName,
|
|
1000
|
-
"confirm-disable": props.
|
|
993
|
+
"confirm-disable": props.confirmDisabled,
|
|
1001
994
|
onCancel: _cache[1] || (_cache[1] = $event => props.closeDialog(false)),
|
|
1002
995
|
onConfirm: _cache[2] || (_cache[2] = $event => props.closeDialog(true))
|
|
1003
996
|
}, null, 8, ["cancel-name", "cancel-disable", "confirm-name", "confirm-disable"])]);
|
|
@@ -1067,6 +1060,7 @@
|
|
|
1067
1060
|
emit: __emit
|
|
1068
1061
|
} = _ref;
|
|
1069
1062
|
const emit = __emit;
|
|
1063
|
+
const observer = snail_view.useObserver();
|
|
1070
1064
|
const isTouch = "ontouchstart" in window;
|
|
1071
1065
|
const dragHandle = vue.useTemplateRef("dragHandle");
|
|
1072
1066
|
const dragInfo = vue.ref({
|
|
@@ -1104,10 +1098,11 @@
|
|
|
1104
1098
|
}
|
|
1105
1099
|
}
|
|
1106
1100
|
}
|
|
1107
|
-
isTouch || vue.onMounted(()
|
|
1108
|
-
|
|
1109
|
-
|
|
1101
|
+
isTouch || vue.onMounted(function () {
|
|
1102
|
+
observer.onEvent(window, "mousemove", onDragMove);
|
|
1103
|
+
observer.onEvent(window, "mouseup", onDragEnd);
|
|
1110
1104
|
});
|
|
1105
|
+
vue.onUnmounted(observer.destroy);
|
|
1111
1106
|
return (_ctx, _cache) => {
|
|
1112
1107
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
1113
1108
|
class: vue.normalizeClass(["snail-drag-verify", {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
/* src:base\button.vue index:0 */
|
|
2
2
|
.snail-button{align-items:center;border-radius:2px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;white-space:nowrap}.snail-button.max{height:40px;width:120px}.snail-button.middle{height:32px;width:90px}.snail-button.normal{height:28px;width:54px}.snail-button.small{height:20px;width:30px}.snail-button.primary{background-color:#5ca3ff;color:#fff}.snail-button.default{background-color:#fff;border:1px solid #dddfed;color:#2e2f33}.snail-button.link{color:#4c9aff}
|
|
3
|
-
/* src:base\footer.vue index:0 */
|
|
4
|
-
.snail-footer{align-items:center;background-color:#fff;display:flex;flex-shrink:0;height:72px;padding:0 40px;width:100%}.snail-footer>.snail-button:nth-child(n+2){margin-left:20px}.snail-footer.start-divider{border-top:1px solid #dddfed}.snail-footer.left{justify-content:left}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:right}
|
|
5
|
-
/* src:base\switch.vue index:0 */
|
|
6
|
-
.snail-switch{border-radius:10px 10px 10px 10px;cursor:pointer;height:20px!important;overflow:hidden;position:relative;width:36px!important}.snail-switch>div{height:100%;width:100%}.snail-switch>div.on{background-color:#5ca3ff}.snail-switch>div.off{background-color:#c4c8cc;position:absolute;transition:left .2s ease}.snail-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.on>div.off{left:100%;top:0}.snail-switch.on>div.status{left:calc(100% - 18px)}.snail-switch.off>div.off{left:0;top:0}.snail-switch.off>div.status{left:2px}.snail-switch.readonly{cursor:default}
|
|
7
3
|
/* src:base\header.vue index:0 */
|
|
8
4
|
.snail-header{align-items:center;background-color:#fff;display:flex;flex-direction:row;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding-left:24px;text-overflow:ellipsis;white-space:nowrap}.snail-header>.header-title.center{text-align:center}.snail-header>.header-title.right{text-align:right}.snail-header.start-divider{border-bottom:1px solid #dddfed}.snail-header.page{height:48px}.snail-header.page>.header-title{font-size:16px;font-weight:700}.snail-header.page>.close-icon{margin-right:18px}.snail-header.dialog{height:64px;padding-top:16px}.snail-header.dialog>.header-title{font-size:20px}.snail-header.dialog>.close-icon{position:absolute;right:8px;top:8px}
|
|
9
|
-
/* src:base\
|
|
10
|
-
.snail-
|
|
5
|
+
/* src:base\footer.vue index:0 */
|
|
6
|
+
.snail-footer{align-items:center;background-color:#fff;display:flex;flex-shrink:0;height:72px;padding:0 40px;width:100%}.snail-footer>.snail-button:nth-child(n+2){margin-left:20px}.snail-footer.start-divider{border-top:1px solid #dddfed}.snail-footer.left{justify-content:left}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:right}
|
|
11
7
|
/* src:container\dynamic.vue index:0 */
|
|
12
8
|
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
9
|
+
/* src:base\icon.vue index:0 */
|
|
10
|
+
.snail-icon{cursor:pointer;opacity:1}
|
|
13
11
|
/* src:container\fold.vue index:0 */
|
|
14
12
|
.snail-fold{flex-shrink:0}.snail-fold>div.fold-header{align-items:center;display:flex;height:32px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-fold>div.fold-header:before{background-color:#2c97fb;content:"";height:18px;left:0;position:absolute;top:7px;width:4px}.snail-fold>div.fold-header>.subtitle,.snail-fold>div.fold-header>.title{overflow:hidden;white-space:nowrap}.snail-fold>div.fold-header>.title{color:#2e3033;font-size:14px;font-weight:700;padding-left:20px}.snail-fold>div.fold-header>.subtitle{color:#8a9099;font-size:13px}.snail-fold>div.fold-header>div.status{display:flex;flex:1;justify-content:right;justify-self:right}.snail-fold>div.fold-body{padding-left:20px}
|
|
13
|
+
/* src:base\switch.vue index:0 */
|
|
14
|
+
.snail-switch{border-radius:10px 10px 10px 10px;cursor:pointer;height:20px!important;overflow:hidden;position:relative;width:36px!important}.snail-switch>div{height:100%;width:100%}.snail-switch>div.on{background-color:#5ca3ff}.snail-switch>div.off{background-color:#c4c8cc;position:absolute;transition:left .2s ease}.snail-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.on>div.off{left:100%;top:0}.snail-switch.on>div.status{left:calc(100% - 18px)}.snail-switch.off>div.off{left:0;top:0}.snail-switch.off>div.status{left:2px}.snail-switch.readonly{cursor:default}
|
|
15
15
|
/* src:container\scroll.vue index:0 */
|
|
16
16
|
.snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
|
|
17
|
-
/* src:container\table.vue index:0 */
|
|
18
|
-
.snail-table{display:flex;flex-direction:column}.snail-table>footer.table-footer,.snail-table>header.table-header{align-items:center;display:flex;flex-shrink:0;width:100%}.snail-table>header.table-header{position:sticky!important;top:0}.snail-table>main.table-body{flex:1;width:100%}.snail-table.start-border>footer.table-footer>.table-col:nth-child(n+2),.snail-table.start-border>header.table-header>.table-col:nth-child(n+2),.snail-table.start-border>main.table-body>.table-row>.table-col:nth-child(n+2){border-left:none!important}.snail-table.start-border>footer.table-footer>.table-col,.snail-table.start-border>main.table-body>.table-row>.table-col{border-top:none!important}
|
|
19
|
-
/* src:container\components\table-row.vue index:0 */
|
|
20
|
-
.table-row{align-items:center;display:flex;min-width:100%}
|
|
21
17
|
/* src:container\components\table-col.vue index:0 */
|
|
22
18
|
.table-col{align-items:center;display:inline-flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
|
|
19
|
+
/* src:container\components\table-row.vue index:0 */
|
|
20
|
+
.table-row{align-items:center;display:flex;min-width:100%}
|
|
21
|
+
/* src:container\table.vue index:0 */
|
|
22
|
+
.snail-table{display:flex;flex-direction:column}.snail-table>div.table-footer,.snail-table>div.table-header{align-items:center;display:flex;flex-shrink:0;width:100%}.snail-table>div.table-header{position:sticky!important;top:0}.snail-table>div.table-body{flex:1;width:100%}.snail-table.start-border>div.table-body>.table-row>.table-col:nth-child(n+2),.snail-table.start-border>div.table-footer>.table-col:nth-child(n+2),.snail-table.start-border>div.table-header>.table-col:nth-child(n+2){border-left:none!important}.snail-table.start-border>div.table-body>.table-row>.table-col,.snail-table.start-border>div.table-footer>.table-col{border-top:none!important}
|
|
23
23
|
/* src:form\input.vue index:0 */
|
|
24
24
|
.snail-input{display:inline-flex;min-height:34px}.snail-input>.input-title{flex-shrink:0;font-size:14px;padding-top:6px}.snail-input>.input-title>span.text{color:#2e3033}.snail-input>.input-title>span.required{color:#f74b4b;margin-left:2px}.snail-input>.input-body{align-self:start;display:flex;flex:1;height:32px}.snail-input>.input-body>input{border:1px solid #dddfed;color:#2e3033;flex:1;font-size:14px;font-weight:400;padding:0 10px;text-overflow:ellipsis}.snail-input>.input-body>input:focus{border:1px solid #3292ea}.snail-input>.input-body>span{background-color:red;flex-shrink:0}.snail-input.readonly>div.input-body>input:focus{border:1px solid #dddfed}
|
|
25
|
-
/* src:prompt\drag-verify.vue index:0 */
|
|
26
|
-
.snail-drag-verify{background:#f8f9fa;border:1px solid #dddfed;border-radius:8px;height:40px;overflow:hidden;position:relative;width:100%}.snail-drag-verify>div{height:100%;width:100%}.snail-drag-verify>.drag-progress{background-color:#0c6;transition:width .5s ease-in-out}.snail-drag-verify>.drag-handle,.snail-drag-verify>.verify-message{left:0;position:absolute;top:0;transition:left .5s ease-in-out}.snail-drag-verify>.verify-message{align-items:center;background-image:-webkit-linear-gradient(left,#666,#666 45%,#fff 50%,#666 55%,#666);color:#7e848c;display:flex;font-size:12px;font-weight:400;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-text-fill-color:transparent;animation:snail-drag-verify 2s linear infinite;-webkit-background-clip:text;background-clip:text;background-size:200% 100%}.snail-drag-verify>.drag-handle{align-items:center;background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURQAAAGBQUGBaWmJZWWJYWGNYWGNZWWJYWGJZWWBYWGNYWGNZWWRYWIqwlb0AAAANdFJOUwAQMMDQoFBgcCCw4ECQ8pPMAAAAP0lEQVQI12NgwATTGBgawAwRBYZwMIPRiYErAcxSFmA0AjN4HBikBcCsUgYmQxQGE0wKphhIQrSzwAyEW4EOACHhB32zIad6AAAAAElFTkSuQmCC);background-position:50%;background-repeat:no-repeat;border-right:1px solid #dddfed;cursor:move;display:flex;justify-content:center;width:40px}.snail-drag-verify.dragging>.drag-handle,.snail-drag-verify.dragging>.drag-progress{transition:none!important}.snail-drag-verify.success>.verify-message{-webkit-text-fill-color:#fff;color:#fff}.snail-drag-verify.success>.drag-handle>svg{background:#76c61d;border-radius:50%;padding:4px}@keyframes snail-drag-verify{0%{background-position:0 0}to{background-position:-200% 0}}
|
|
27
25
|
/* src:prompt\empty.vue index:0 */
|
|
28
26
|
.snail-empty{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.snail-empty>img{height:60px;width:60px}.snail-empty>div.message{color:#babdc2;font-size:14px;font-weight:400;padding:0 10px 10px}
|
|
27
|
+
/* src:prompt\drag-verify.vue index:0 */
|
|
28
|
+
.snail-drag-verify{background:#f8f9fa;border:1px solid #dddfed;border-radius:8px;height:40px;overflow:hidden;position:relative;width:100%}.snail-drag-verify>div{height:100%;width:100%}.snail-drag-verify>.drag-progress{background-color:#0c6;transition:width .5s ease-in-out}.snail-drag-verify>.drag-handle,.snail-drag-verify>.verify-message{left:0;position:absolute;top:0;transition:left .5s ease-in-out}.snail-drag-verify>.verify-message{align-items:center;background-image:-webkit-linear-gradient(left,#666,#666 45%,#fff 50%,#666 55%,#666);color:#7e848c;display:flex;font-size:12px;font-weight:400;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-text-fill-color:transparent;animation:snail-drag-verify 2s linear infinite;-webkit-background-clip:text;background-clip:text;background-size:200% 100%}.snail-drag-verify>.drag-handle{align-items:center;background-color:#fff;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURQAAAGBQUGBaWmJZWWJYWGNYWGNZWWJYWGJZWWBYWGNYWGNZWWRYWIqwlb0AAAANdFJOUwAQMMDQoFBgcCCw4ECQ8pPMAAAAP0lEQVQI12NgwATTGBgawAwRBYZwMIPRiYErAcxSFmA0AjN4HBikBcCsUgYmQxQGE0wKphhIQrSzwAyEW4EOACHhB32zIad6AAAAAElFTkSuQmCC);background-position:50%;background-repeat:no-repeat;border-right:1px solid #dddfed;cursor:move;display:flex;justify-content:center;width:40px}.snail-drag-verify.dragging>.drag-handle,.snail-drag-verify.dragging>.drag-progress{transition:none!important}.snail-drag-verify.success>.verify-message{-webkit-text-fill-color:#fff;color:#fff}.snail-drag-verify.success>.drag-handle>svg{background:#76c61d;border-radius:50%;padding:4px}@keyframes snail-drag-verify{0%{background-position:0 0}to{background-position:-200% 0}}
|
|
29
29
|
/* src:prompt\loading.vue index:0 */
|
|
30
30
|
.snail-loading{bottom:0;left:0;position:absolute;right:0;top:0;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)}}.snail-loading-enter-active,.snail-loading-leave-active{transition:opacity .5s ease-in-out}.snail-loading-enter-from,.snail-loading-leave-to{opacity:0}
|
|
31
31
|
/* src:prompt\components\toast.vue index:0 */
|
|
32
32
|
.snail-toast{background:rgba(0,0,0,.7);border-radius:5px;color:#fff;display:flex;max-height:200px;max-width:500px;min-width:200px;opacity:.2;overflow:hidden;padding:20px 30px 20px 20px;position:fixed;transition:opacity .2s ease;z-index:99999}.snail-toast.show-toast{opacity:1}.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}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
|
|
33
|
-
/* src:prompt\components\confirm.vue index:0 */
|
|
34
|
-
.snail-confirm{background-color:#fff;border-radius:4px;box-sizing:border-box;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>main{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word;box-sizing:border-box}
|
|
35
33
|
/* src:container\components\dialog-wrapper.vue index:0 */
|
|
36
|
-
.snail-dialog{align-items:center;bottom:0;display:flex;justify-content:center;left:0;overflow:hidden;position:fixed;right:0;top:0}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;position:absolute;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);box-sizing:border-box;position:relative}.snail-dialog.unactive:before{display:none!important}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}.snail-dialog-enter-active,.snail-dialog-leave-active{transition:scale .1s ease-in-out,opacity .1s ease}.snail-dialog-enter-from{opacity:0;scale:.4}.snail-dialog-leave-to{opacity:0;scale:0}
|
|
34
|
+
.snail-dialog{align-items:center;bottom:0;display:flex;justify-content:center;left:0;overflow:hidden;position:fixed;right:0;top:0}.snail-dialog:before{background-color:rgba(24,27,33,.45);content:"";height:100%;position:absolute;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);box-sizing:border-box;position:relative}.snail-dialog.unactive:before{display:none!important}.snail-dialog.unactive>.dialog-body{box-shadow:0 0 4px rgba(0,0,0,.3)}.snail-dialog-enter-active,.snail-dialog-leave-active{transition:scale .1s ease-in-out,opacity .1s ease}.snail-dialog-enter-from{opacity:0;scale:.4}.snail-dialog-leave-to{opacity:0;scale:0}
|
|
35
|
+
/* src:prompt\components\confirm.vue index:0 */
|
|
36
|
+
.snail-confirm{background-color:#fff;border-radius:4px;box-sizing:border-box;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>main{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word;box-sizing:border-box}
|
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": "1.0.
|
|
6
|
+
"version": "1.0.27",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/snail.vue.js",
|
|
9
9
|
"module": "dist/snail.vue.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"vue": "^3.5.14",
|
|
18
|
-
"snail.core": ">=2.0.
|
|
19
|
-
"snail.view": ">=1.0.
|
|
18
|
+
"snail.core": ">=2.0.6",
|
|
19
|
+
"snail.view": ">=1.0.11"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"vue-tsc": "^2.2.10",
|