snail.vue 1.0.30 → 1.0.31
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 +19 -11
- package/dist/snail.vue.js +36 -18
- package/dist/snail.vue.umd.js +39 -17
- package/dist/styles/app.css +1 -0
- package/dist/styles/snail.vue.vue.css +14 -14
- package/package.json +1 -1
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as snail_view from 'snail.view';
|
|
2
2
|
import { BaseStyle, WidthStyle, FlexBoxStyle, HeightStyle, BorderStyle, PaddingStyle } from 'snail.view';
|
|
3
3
|
import * as vue from 'vue';
|
|
4
|
-
import { Component,
|
|
4
|
+
import { Component, ShallowRef, Ref, App } from 'vue';
|
|
5
5
|
import { IScope, IAsyncScope } from 'snail.core';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -461,7 +461,7 @@ type ButtonOptions = {
|
|
|
461
461
|
*/
|
|
462
462
|
interface IReactiveManager {
|
|
463
463
|
/**
|
|
464
|
-
*
|
|
464
|
+
* 【过渡】变量值
|
|
465
465
|
* - 通过设置 rv.value 的值来实现.value值过渡
|
|
466
466
|
* - 执行顺序 from、to
|
|
467
467
|
* - 开始时,设置 rv.value 值为 from;延迟time时间后,强制销毁scope
|
|
@@ -471,20 +471,28 @@ interface IReactiveManager {
|
|
|
471
471
|
* @param time 过渡持续时间,到时间后销毁作用域
|
|
472
472
|
* @returns 作用域对象,可销毁【值过渡】效果
|
|
473
473
|
*/
|
|
474
|
-
transition<T>(rv: {
|
|
475
|
-
value?: T;
|
|
476
|
-
}, effect: {
|
|
474
|
+
transition<T>(rv: ShallowRef<T> | Ref<T>, effect: {
|
|
477
475
|
from: T;
|
|
478
476
|
to: T;
|
|
479
477
|
}, time: number): IScope;
|
|
478
|
+
/**
|
|
479
|
+
* 【任务】响应式
|
|
480
|
+
* - 任务运行时,设置loading.value=true
|
|
481
|
+
* - 任务完成后,设置loading.value=false
|
|
482
|
+
* - 可通过delay值,延迟执行 loading.value=false 操作
|
|
483
|
+
* - 可在api请求等耗时操作任务过程中,实现响应式显隐Loading组件
|
|
484
|
+
* @param task 要运行的任务
|
|
485
|
+
* @param loading 正在加载的响应式变量
|
|
486
|
+
* @param delay 延迟时间,单位ms;不传则不延迟
|
|
487
|
+
* @returns 任务自身
|
|
488
|
+
*/
|
|
489
|
+
task<T, E>(task: Promise<T>, loading: ShallowRef<boolean> | Ref<boolean>, delay: number): Promise<{
|
|
490
|
+
success: boolean;
|
|
491
|
+
data?: T;
|
|
492
|
+
error?: E;
|
|
493
|
+
}>;
|
|
480
494
|
}
|
|
481
495
|
|
|
482
|
-
/**
|
|
483
|
-
* 响应式 模块;
|
|
484
|
-
* 1、针对Vue的响应式相关功能,做一些便捷封装
|
|
485
|
-
* 2、方便使用,减少重复性代码量
|
|
486
|
-
*/
|
|
487
|
-
|
|
488
496
|
/**
|
|
489
497
|
* 使用【响应式管理器】
|
|
490
498
|
* - 请在Vue组件的setup中使用此方法,否则 getCurrentScope 方法无法取到值
|
package/dist/snail.vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, createBlock, createCommentVNode, toDisplayString, createElementVNode, normalizeProps, guardReactiveProps, unref, mergeModels, useModel, Transition, withCtx, ref, shallowRef, watch, onErrorCaptured, onActivated, onDeactivated, Fragment, resolveDynamicComponent, mergeProps, createSlots, renderList, useTemplateRef, onUnmounted, createVNode, computed, normalizeStyle, createApp, onMounted, withModifiers, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
|
-
import { tidyString, throwError, mustString, useScopes, mountScope, throwIfFalse, isObject, mustFunction, useScope, isStringNotEmpty, script, delay, getMessage, mustObject, isFunction, useHook, defer, useAsyncScope, onMountScope } from 'snail.core';
|
|
3
|
+
import { tidyString, throwError, mustString, useScopes, mountScope, throwIfFalse, isPromise, isObject, mustFunction, useScope, isStringNotEmpty, script, delay, getMessage, mustObject, isFunction, useHook, defer, useAsyncScope, onMountScope } from 'snail.core';
|
|
4
4
|
import { link, useAnimation, css, useObserver } from 'snail.view';
|
|
5
5
|
|
|
6
6
|
var _sfc_main$j = defineComponent({
|
|
@@ -251,8 +251,23 @@ function useReactive() {
|
|
|
251
251
|
clearTimeout(endId);
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
|
+
function task(task2, loading, delay) {
|
|
255
|
+
throwIfFalse(isPromise(task2), "task: task must be a Promise.");
|
|
256
|
+
loading.value = true;
|
|
257
|
+
task2.finally(function () {
|
|
258
|
+
delay > 0 ? setTimeout(() => loading.value = false, delay) : loading.value = false;
|
|
259
|
+
});
|
|
260
|
+
return task2.then(data => ({
|
|
261
|
+
success: true,
|
|
262
|
+
data
|
|
263
|
+
}), error => ({
|
|
264
|
+
success: false,
|
|
265
|
+
error
|
|
266
|
+
}));
|
|
267
|
+
}
|
|
254
268
|
const manager = mountScope({
|
|
255
|
-
transition
|
|
269
|
+
transition,
|
|
270
|
+
task
|
|
256
271
|
});
|
|
257
272
|
manager.onDestroy(scopes.destroy);
|
|
258
273
|
return Object.freeze(manager);
|
|
@@ -431,7 +446,9 @@ var _sfc_main$c = defineComponent({
|
|
|
431
446
|
} = _ref;
|
|
432
447
|
const props = __props;
|
|
433
448
|
const emit = __emit;
|
|
434
|
-
const
|
|
449
|
+
const {
|
|
450
|
+
transition
|
|
451
|
+
} = useAnimation();
|
|
435
452
|
const status = useModel(__props, "status");
|
|
436
453
|
const statusWatch = watch(status, updateFoldStyle);
|
|
437
454
|
const statusIcon = getFoldStatusDraw();
|
|
@@ -440,7 +457,7 @@ var _sfc_main$c = defineComponent({
|
|
|
440
457
|
function updateFoldStyle() {
|
|
441
458
|
const isExpand = status.value == "expand";
|
|
442
459
|
if (foldStatusSpanRef.value) {
|
|
443
|
-
|
|
460
|
+
transition(foldStatusSpanRef.value, {
|
|
444
461
|
from: {
|
|
445
462
|
transition: "transform 0.2s ease",
|
|
446
463
|
transform: isExpand ? "rotateZ(180deg)" : "rotate(0)"
|
|
@@ -456,7 +473,7 @@ var _sfc_main$c = defineComponent({
|
|
|
456
473
|
if (foldBodyRef.value) {
|
|
457
474
|
const minHeight = 32;
|
|
458
475
|
const maxHeight = minHeight + foldBodyRef.value.getBoundingClientRect().height;
|
|
459
|
-
|
|
476
|
+
transition(foldBodyRef.value.parentElement, {
|
|
460
477
|
from: {
|
|
461
478
|
transition: "height 0.2s ease",
|
|
462
479
|
overflow: "hidden",
|
|
@@ -659,6 +676,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
659
676
|
function mount(options, onDestroyed) {
|
|
660
677
|
mustObject(options, "options");
|
|
661
678
|
options.target instanceof HTMLElement || throwError("options.target must be a HTMLElement");
|
|
679
|
+
options.target.classList.add("snail-app");
|
|
662
680
|
const app = createApp(_sfc_main$d, {
|
|
663
681
|
name: options.name,
|
|
664
682
|
compponent: options.component,
|
|
@@ -713,7 +731,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
713
731
|
} = _ref;
|
|
714
732
|
const props = __props;
|
|
715
733
|
const emit = __emit;
|
|
716
|
-
const inputRef = useTemplateRef("
|
|
734
|
+
const inputRef = useTemplateRef("input-el");
|
|
717
735
|
const inputModel = useModel(__props, "modelValue");
|
|
718
736
|
const validateRef = shallowRef();
|
|
719
737
|
const titleStyle = computed(() => css.buildStyle(props.titleStyle));
|
|
@@ -736,8 +754,7 @@ var _sfc_main$7 = defineComponent({
|
|
|
736
754
|
class: "text",
|
|
737
755
|
textContent: toDisplayString(props.title)
|
|
738
756
|
}, null, 8, _hoisted_1$4), props.readonly != true && props.required == true ? (openBlock(), createElementBlock("span", _hoisted_2$3)) : createCommentVNode("", true)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$1, [createElementVNode("input", {
|
|
739
|
-
|
|
740
|
-
ref: inputRef,
|
|
757
|
+
ref: "input-el",
|
|
741
758
|
type: props.type || "text",
|
|
742
759
|
value: inputModel.value,
|
|
743
760
|
readonly: props.readonly,
|
|
@@ -824,7 +841,7 @@ const initPopupApp = function () {
|
|
|
824
841
|
return function () {
|
|
825
842
|
if (popupApp == void 0) {
|
|
826
843
|
const container = document.createElement("div");
|
|
827
|
-
container.classList.add("snail-popup-app");
|
|
844
|
+
container.classList.add("snail-app", "snail-popup-app");
|
|
828
845
|
container.style = "height:0 !important; width:0 !important;";
|
|
829
846
|
document.body.appendChild(container);
|
|
830
847
|
popupApp = createApp(_sfc_main$6, {
|
|
@@ -930,11 +947,13 @@ var _sfc_main$5 = defineComponent({
|
|
|
930
947
|
},
|
|
931
948
|
setup(__props) {
|
|
932
949
|
const props = __props;
|
|
933
|
-
const
|
|
950
|
+
const {
|
|
951
|
+
onEvent
|
|
952
|
+
} = useObserver();
|
|
934
953
|
const loading = shallowRef(false);
|
|
935
954
|
onMounted(() => {
|
|
936
955
|
loading.value = true;
|
|
937
|
-
|
|
956
|
+
onEvent(window, "keyup", event => {
|
|
938
957
|
event.key === "Escape" && props.dialogStatus.value == "active" && props.closeOnEscape && props.closeDialog();
|
|
939
958
|
});
|
|
940
959
|
});
|
|
@@ -1068,13 +1087,10 @@ var _sfc_main$2 = defineComponent({
|
|
|
1068
1087
|
props: {
|
|
1069
1088
|
type: {},
|
|
1070
1089
|
message: {},
|
|
1071
|
-
id: {},
|
|
1072
|
-
zIndex: {},
|
|
1073
1090
|
inPopup: {},
|
|
1074
1091
|
closePopup: {
|
|
1075
1092
|
type: Function
|
|
1076
|
-
}
|
|
1077
|
-
popupStatus: {}
|
|
1093
|
+
}
|
|
1078
1094
|
},
|
|
1079
1095
|
setup(__props) {
|
|
1080
1096
|
const props = __props;
|
|
@@ -1226,7 +1242,9 @@ var _sfc_main$1 = defineComponent({
|
|
|
1226
1242
|
emit: __emit
|
|
1227
1243
|
} = _ref;
|
|
1228
1244
|
const emit = __emit;
|
|
1229
|
-
const
|
|
1245
|
+
const {
|
|
1246
|
+
onEvent
|
|
1247
|
+
} = useObserver();
|
|
1230
1248
|
const isTouch = "ontouchstart" in window;
|
|
1231
1249
|
const dragHandle = useTemplateRef("dragHandle");
|
|
1232
1250
|
const dragInfo = ref({
|
|
@@ -1265,8 +1283,8 @@ var _sfc_main$1 = defineComponent({
|
|
|
1265
1283
|
}
|
|
1266
1284
|
}
|
|
1267
1285
|
isTouch || onMounted(function () {
|
|
1268
|
-
|
|
1269
|
-
|
|
1286
|
+
onEvent(window, "mousemove", onDragMove);
|
|
1287
|
+
onEvent(window, "mouseup", onDragEnd);
|
|
1270
1288
|
});
|
|
1271
1289
|
return (_ctx, _cache) => {
|
|
1272
1290
|
return openBlock(), createElementBlock("div", {
|
package/dist/snail.vue.umd.js
CHANGED
|
@@ -74,6 +74,10 @@
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
78
|
+
|
|
79
|
+
addLink("/styles/snail.vue.vue.css");
|
|
80
|
+
|
|
77
81
|
function getSvgIcon(options) {
|
|
78
82
|
var {
|
|
79
83
|
type,
|
|
@@ -249,8 +253,23 @@
|
|
|
249
253
|
clearTimeout(endId);
|
|
250
254
|
});
|
|
251
255
|
}
|
|
256
|
+
function task(task2, loading, delay) {
|
|
257
|
+
snail_core.throwIfFalse(snail_core.isPromise(task2), "task: task must be a Promise.");
|
|
258
|
+
loading.value = true;
|
|
259
|
+
task2.finally(function () {
|
|
260
|
+
delay > 0 ? setTimeout(() => loading.value = false, delay) : loading.value = false;
|
|
261
|
+
});
|
|
262
|
+
return task2.then(data => ({
|
|
263
|
+
success: true,
|
|
264
|
+
data
|
|
265
|
+
}), error => ({
|
|
266
|
+
success: false,
|
|
267
|
+
error
|
|
268
|
+
}));
|
|
269
|
+
}
|
|
252
270
|
const manager = snail_core.mountScope({
|
|
253
|
-
transition
|
|
271
|
+
transition,
|
|
272
|
+
task
|
|
254
273
|
});
|
|
255
274
|
manager.onDestroy(scopes.destroy);
|
|
256
275
|
return Object.freeze(manager);
|
|
@@ -429,7 +448,9 @@
|
|
|
429
448
|
} = _ref;
|
|
430
449
|
const props = __props;
|
|
431
450
|
const emit = __emit;
|
|
432
|
-
const
|
|
451
|
+
const {
|
|
452
|
+
transition
|
|
453
|
+
} = snail_view.useAnimation();
|
|
433
454
|
const status = vue.useModel(__props, "status");
|
|
434
455
|
const statusWatch = vue.watch(status, updateFoldStyle);
|
|
435
456
|
const statusIcon = getFoldStatusDraw();
|
|
@@ -438,7 +459,7 @@
|
|
|
438
459
|
function updateFoldStyle() {
|
|
439
460
|
const isExpand = status.value == "expand";
|
|
440
461
|
if (foldStatusSpanRef.value) {
|
|
441
|
-
|
|
462
|
+
transition(foldStatusSpanRef.value, {
|
|
442
463
|
from: {
|
|
443
464
|
transition: "transform 0.2s ease",
|
|
444
465
|
transform: isExpand ? "rotateZ(180deg)" : "rotate(0)"
|
|
@@ -454,7 +475,7 @@
|
|
|
454
475
|
if (foldBodyRef.value) {
|
|
455
476
|
const minHeight = 32;
|
|
456
477
|
const maxHeight = minHeight + foldBodyRef.value.getBoundingClientRect().height;
|
|
457
|
-
|
|
478
|
+
transition(foldBodyRef.value.parentElement, {
|
|
458
479
|
from: {
|
|
459
480
|
transition: "height 0.2s ease",
|
|
460
481
|
overflow: "hidden",
|
|
@@ -657,6 +678,7 @@
|
|
|
657
678
|
function mount(options, onDestroyed) {
|
|
658
679
|
snail_core.mustObject(options, "options");
|
|
659
680
|
options.target instanceof HTMLElement || snail_core.throwError("options.target must be a HTMLElement");
|
|
681
|
+
options.target.classList.add("snail-app");
|
|
660
682
|
const app = vue.createApp(_sfc_main$d, {
|
|
661
683
|
name: options.name,
|
|
662
684
|
compponent: options.component,
|
|
@@ -711,7 +733,7 @@
|
|
|
711
733
|
} = _ref;
|
|
712
734
|
const props = __props;
|
|
713
735
|
const emit = __emit;
|
|
714
|
-
const inputRef = vue.useTemplateRef("
|
|
736
|
+
const inputRef = vue.useTemplateRef("input-el");
|
|
715
737
|
const inputModel = vue.useModel(__props, "modelValue");
|
|
716
738
|
const validateRef = vue.shallowRef();
|
|
717
739
|
const titleStyle = vue.computed(() => snail_view.css.buildStyle(props.titleStyle));
|
|
@@ -734,8 +756,7 @@
|
|
|
734
756
|
class: "text",
|
|
735
757
|
textContent: vue.toDisplayString(props.title)
|
|
736
758
|
}, null, 8, _hoisted_1$4), props.readonly != true && props.required == true ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$3)) : vue.createCommentVNode("", true)], 4)) : vue.createCommentVNode("", true), vue.createElementVNode("div", _hoisted_3$1, [vue.createElementVNode("input", {
|
|
737
|
-
|
|
738
|
-
ref: inputRef,
|
|
759
|
+
ref: "input-el",
|
|
739
760
|
type: props.type || "text",
|
|
740
761
|
value: inputModel.value,
|
|
741
762
|
readonly: props.readonly,
|
|
@@ -822,7 +843,7 @@
|
|
|
822
843
|
return function () {
|
|
823
844
|
if (popupApp == void 0) {
|
|
824
845
|
const container = document.createElement("div");
|
|
825
|
-
container.classList.add("snail-popup-app");
|
|
846
|
+
container.classList.add("snail-app", "snail-popup-app");
|
|
826
847
|
container.style = "height:0 !important; width:0 !important;";
|
|
827
848
|
document.body.appendChild(container);
|
|
828
849
|
popupApp = vue.createApp(_sfc_main$6, {
|
|
@@ -928,11 +949,13 @@
|
|
|
928
949
|
},
|
|
929
950
|
setup(__props) {
|
|
930
951
|
const props = __props;
|
|
931
|
-
const
|
|
952
|
+
const {
|
|
953
|
+
onEvent
|
|
954
|
+
} = snail_view.useObserver();
|
|
932
955
|
const loading = vue.shallowRef(false);
|
|
933
956
|
vue.onMounted(() => {
|
|
934
957
|
loading.value = true;
|
|
935
|
-
|
|
958
|
+
onEvent(window, "keyup", event => {
|
|
936
959
|
event.key === "Escape" && props.dialogStatus.value == "active" && props.closeOnEscape && props.closeDialog();
|
|
937
960
|
});
|
|
938
961
|
});
|
|
@@ -1066,13 +1089,10 @@
|
|
|
1066
1089
|
props: {
|
|
1067
1090
|
type: {},
|
|
1068
1091
|
message: {},
|
|
1069
|
-
id: {},
|
|
1070
|
-
zIndex: {},
|
|
1071
1092
|
inPopup: {},
|
|
1072
1093
|
closePopup: {
|
|
1073
1094
|
type: Function
|
|
1074
|
-
}
|
|
1075
|
-
popupStatus: {}
|
|
1095
|
+
}
|
|
1076
1096
|
},
|
|
1077
1097
|
setup(__props) {
|
|
1078
1098
|
const props = __props;
|
|
@@ -1224,7 +1244,9 @@
|
|
|
1224
1244
|
emit: __emit
|
|
1225
1245
|
} = _ref;
|
|
1226
1246
|
const emit = __emit;
|
|
1227
|
-
const
|
|
1247
|
+
const {
|
|
1248
|
+
onEvent
|
|
1249
|
+
} = snail_view.useObserver();
|
|
1228
1250
|
const isTouch = "ontouchstart" in window;
|
|
1229
1251
|
const dragHandle = vue.useTemplateRef("dragHandle");
|
|
1230
1252
|
const dragInfo = vue.ref({
|
|
@@ -1263,8 +1285,8 @@
|
|
|
1263
1285
|
}
|
|
1264
1286
|
}
|
|
1265
1287
|
isTouch || vue.onMounted(function () {
|
|
1266
|
-
|
|
1267
|
-
|
|
1288
|
+
onEvent(window, "mousemove", onDragMove);
|
|
1289
|
+
onEvent(window, "mouseup", onDragEnd);
|
|
1268
1290
|
});
|
|
1269
1291
|
return (_ctx, _cache) => {
|
|
1270
1292
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.snail-app{font-family:Microsoft YaHei,微软雅黑,Hiragino Sans GB,tahoma,arial,simsun,\ 宋体,"sans-serif"}.snail-app,.snail-app *{box-sizing:border-box}.snail-app input{border-radius:4px;font:inherit;margin:0;outline:0!important}
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
.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}
|
|
3
3
|
/* src:base\button.vue index:0 */
|
|
4
4
|
.snail-button{align-items:center;border-radius:2px;cursor:pointer;display:flex;display:inline-flex;font-size:14px;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;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}
|
|
5
|
-
/* src:base\header.vue index:0 */
|
|
6
|
-
.snail-header{align-items:center;background-color:#fff;display:flex;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;width:100%}.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}
|
|
7
|
-
/* src:base\icon.vue index:0 */
|
|
8
|
-
.snail-icon{cursor:pointer;opacity:1}
|
|
9
|
-
/* src:container\dynamic.vue index:0 */
|
|
10
|
-
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
11
5
|
/* src:base\switch.vue index:0 */
|
|
12
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
|
+
/* src:base\header.vue index:0 */
|
|
8
|
+
.snail-header{align-items:center;background-color:#fff;display:flex;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding:0 30px;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-header>.header-title.left{text-align:left}.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}
|
|
13
9
|
/* src:container\fold.vue index:0 */
|
|
14
10
|
.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;text-overflow:ellipsis;white-space:nowrap;width:100%}.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{align-items:right;display:flex;flex:1;justify-content:right}.snail-fold>div.fold-body{padding-left:20px}
|
|
11
|
+
/* src:base\icon.vue index:0 */
|
|
12
|
+
.snail-icon{cursor:pointer;opacity:1}
|
|
15
13
|
/* src:container\scroll.vue index:0 */
|
|
16
14
|
.snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
|
|
17
|
-
/* src:container\
|
|
18
|
-
.
|
|
19
|
-
/* src:container\components\table-row.vue index:0 */
|
|
20
|
-
.table-row{align-items:center;display:flex;min-width:100%}
|
|
15
|
+
/* src:container\dynamic.vue index:0 */
|
|
16
|
+
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
21
17
|
/* src:container\table.vue index:0 */
|
|
22
18
|
.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}
|
|
19
|
+
/* src:container\components\table-row.vue index:0 */
|
|
20
|
+
.table-row{align-items:center;display:flex;min-width:100%}
|
|
21
|
+
/* src:container\components\table-col.vue index:0 */
|
|
22
|
+
.table-col{align-items:center;display:flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
|
|
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
25
|
/* src:prompt\drag-verify.vue index:0 */
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
.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}
|
|
29
29
|
/* src:prompt\loading.vue index:0 */
|
|
30
30
|
.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)}}.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
|
-
/* src:popup\components\confirm-container.vue index:0 */
|
|
32
|
-
.snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>*{box-sizing:border-box}.snail-confirm>div.confirm-body{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word}
|
|
33
31
|
/* src:popup\components\dialog-container.vue index:0 */
|
|
34
|
-
.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%;position:absolute;width:100%}.snail-dialog>.dialog-body{background-color:#fff;border-radius:4px;box-shadow:0 0 15px rgba(0,0,0,.3);
|
|
32
|
+
.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%;position:absolute;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{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
33
|
/* src:popup\components\popup-container.vue index:0 */
|
|
36
34
|
.snail-popup{left:0;position:fixed;top:0}.snail-popup-enter-active,.snail-popup-leave-active{transition:opacity .1s ease}.snail-popup-enter-from,.snail-popup-leave-to{opacity:0}
|
|
37
35
|
/* src:popup\components\toast-container.vue index:0 */
|
|
38
|
-
.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;opacity:0;overflow:hidden;padding:20px 35px 20px 15px;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity .5s ease}.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}
|
|
36
|
+
.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;opacity:0;overflow:hidden;padding:20px 35px 20px 15px;position:fixed;top:50%;transform:translate(-50%,-50%);transition:opacity .5s ease}.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}
|
|
37
|
+
/* src:popup\components\confirm-container.vue index:0 */
|
|
38
|
+
.snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>div.confirm-body{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word}
|