snail.vue 1.0.53 → 1.0.54
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/README.md +28 -27
- package/dist/snail.vue.d.ts +136 -1
- package/dist/snail.vue.js +191 -33
- package/dist/snail.vue.umd.js +188 -30
- package/dist/styles/snail.vue.vue.css +14 -12
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
## 2.1. **依赖安装**
|
|
12
12
|
|
|
13
|
-
1. **安装 npm
|
|
14
|
-
2.
|
|
13
|
+
1. **安装 npm 包:**`<span class="ne-text">pnpm add snail.vue</span>`
|
|
14
|
+
2. **注册依赖组件:**`<span class="ne-text">pnpm add vue</span>`
|
|
15
15
|
3. **打包输出**
|
|
16
16
|
|
|
17
17
|
## 2.2. **动态注册**
|
|
@@ -24,17 +24,18 @@
|
|
|
24
24
|
|
|
25
25
|
**详细说明:**[https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8)
|
|
26
26
|
|
|
27
|
-
| **组件**
|
|
28
|
-
|
|
|
29
|
-
| [Button](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#s1zYq)
|
|
30
|
-
| [Choose](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#gCenb)
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
27
|
+
| **组件** | **简介** |
|
|
28
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
|
29
|
+
| [Button](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#s1zYq) | **按钮组件;集成 type、size 属性,封装大小和类型,简化使用** |
|
|
30
|
+
| [Choose](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#gCenb) | **选择组件;集成 radio、checkbook 常用功能,支持选项组;支持美化和原生两种渲染模式** |
|
|
31
|
+
| [DatePicker](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#je00A) | **日期选择器组件;仅支持盖板模式,后续支持 input 输入框模式** |
|
|
32
|
+
| [Icon](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#xf4og) | **图标组件;使用 svg 进行图标绘,内置常用图标类型;并支持自定义图标绘制路径** |
|
|
33
|
+
| [Search](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#VoyjZ) | **搜索组件;封装搜索输入框、搜索按钮;支持自动完成等功能** |
|
|
34
|
+
| [Select](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#NPAQL) | **选项菜单组件;对原生 select 的扩充,支持多级选项,支持单选和多选等** |
|
|
35
|
+
| [Switch](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#sOSDT) | **开关组件;支持只读、v-model 绑定操纵** |
|
|
36
|
+
| [Reactive](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#LzpHK) | **响应式模块,非 vue 组件;对 vue 响应时做了封装,集成常用生命周期管理** |
|
|
37
|
+
| [Footer](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#Mk0Pf) | **尾部组件;和 Header 配套,封装确定、取消按钮;不常用** |
|
|
38
|
+
| [Header](https://www.yuque.com/snail-devx/js/mhieowa8ddbdhgu8#jQkjV) | **头部组件;封装标题、关闭按钮,用于 page 和 dialog 模式;支持插槽** |
|
|
38
39
|
|
|
39
40
|
## 3.2. **container 容器组件**
|
|
40
41
|
|
|
@@ -44,14 +45,14 @@
|
|
|
44
45
|
|
|
45
46
|
| **组件** | **简介** |
|
|
46
47
|
| --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
47
|
-
| [
|
|
48
|
-
| [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
51
|
-
| [
|
|
52
|
-
| [
|
|
53
|
-
| [
|
|
54
|
-
| [
|
|
48
|
+
| [Dynamic](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#NNGJt) | **动态组件;vue 的 Component 组件扩展,支持 url、name、object 方式加载异步组件,并支持 event、props、model、slot 等绑定** |
|
|
49
|
+
| [Fold](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#sJOfO) | **折叠面板组件;通过 slot 加载实际内容,封装折叠 title 实现面板展开、收起功能** |
|
|
50
|
+
| [Layout](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#lGmps) | **布局组件;实现上中下、左中右布局,通过 slot 指定每块内容** |
|
|
51
|
+
| [Scroll](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#IcwVh) | **滚动组件;实现滚动条状态、事件封装,并通过 class、event 等方式对外,通过 slot 加载实际内容** |
|
|
52
|
+
| [Sort](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#dKA7E) | **排序组件;集成 sortable.js 库,实现再次封装,暴露常见属性** |
|
|
53
|
+
| [Table](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#UViu6) | **表格组件;封装表头、内容区域,基于 TableCol、TableRow 子组件对外做自定义渲染** |
|
|
54
|
+
| [Tree](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#tKdSd) | **树组件;基于 nodes 渲染树,支持节点自定义,集成节点事件和本地搜索** |
|
|
55
|
+
| [Wrapper](https://www.yuque.com/snail-devx/js/kaynh9t44gbl6fxc#gita6) | **包裹层组件;作为常用组件的包裹层,自动实现组件在 page 和 popup 中展现,让内容组件关注核心逻辑即可** |
|
|
55
56
|
|
|
56
57
|
## 3.3. **form 表单组件**
|
|
57
58
|
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
|
|
62
63
|
| **组件** | **简介** |
|
|
63
64
|
| ------------------------------------------------------------------- | ----------------------------------------------- |
|
|
64
|
-
| [
|
|
65
|
+
| [Input](https://www.yuque.com/snail-devx/js/wl1q8db0qms764eg#lw7O6) | **输入框组件,对原生 input 做美化,支持标题等** |
|
|
65
66
|
|
|
66
67
|
## 3.4. **popup 弹窗组件**
|
|
67
68
|
|
|
@@ -84,8 +85,8 @@
|
|
|
84
85
|
|
|
85
86
|
**详细说明:**[https://www.yuque.com/snail-devx/js/kp0nznuu61qs8zgw](https://www.yuque.com/snail-devx/js/kp0nznuu61qs8zgw)
|
|
86
87
|
|
|
87
|
-
| **组件**
|
|
88
|
-
|
|
|
89
|
-
| [
|
|
90
|
-
| [
|
|
91
|
-
| [
|
|
88
|
+
| **组件** | **简介** |
|
|
89
|
+
| ------------------------------------------------------------------------ | ------------------------------------------------------ |
|
|
90
|
+
| [DragVerify](https://www.yuque.com/snail-devx/js/kp0nznuu61qs8zgw#YN3YF) | **拖拽验证组件;拖动滑块验证,给出验证提示和结果信息** |
|
|
91
|
+
| [Empty](https://www.yuque.com/snail-devx/js/kp0nznuu61qs8zgw#qZsqi) | **空组件;用于提示无数据、无搜索结果等空状态** |
|
|
92
|
+
| [Loading](https://www.yuque.com/snail-devx/js/kp0nznuu61qs8zgw#IuBmQ) | **加载组件;用于在数据加载过程中进行加载提示** |
|
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1041,6 +1041,130 @@ type IconOptions = TitleOptions & {
|
|
|
1041
1041
|
*/
|
|
1042
1042
|
type IconType = "success" | "error" | "warn" | "close" | "trash" | "download" | "print" | "edit" | "arrow" | "plus" | "subtract" | "grip" | "custom";
|
|
1043
1043
|
|
|
1044
|
+
/**
|
|
1045
|
+
* 日期组件相关数据模型
|
|
1046
|
+
*/
|
|
1047
|
+
/**
|
|
1048
|
+
* 日期选择组件 配置选项
|
|
1049
|
+
* - 参照 zane-calendar 组件的配置选项
|
|
1050
|
+
* @see https://github.com/wangweianger/zane-data-time-calendar/blob/master/README.md#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E
|
|
1051
|
+
*/
|
|
1052
|
+
type DatepickerOptions = {
|
|
1053
|
+
/**
|
|
1054
|
+
* 日期选择类型
|
|
1055
|
+
* - 默认值:day
|
|
1056
|
+
* - 可选值:
|
|
1057
|
+
* - - day 年月日选择
|
|
1058
|
+
* - - year 年选择
|
|
1059
|
+
* - - month 年月选择
|
|
1060
|
+
* - - time 时分秒选择
|
|
1061
|
+
*/
|
|
1062
|
+
type?: "day" | "year" | "month" | "time";
|
|
1063
|
+
/**
|
|
1064
|
+
* 是否为范围选择
|
|
1065
|
+
* - true 则选择 开始时间 - 结束时间
|
|
1066
|
+
*/
|
|
1067
|
+
range?: boolean;
|
|
1068
|
+
/**
|
|
1069
|
+
* 日期时间格式化
|
|
1070
|
+
* - 默认值:yyyy-MM-dd
|
|
1071
|
+
* - 可选值 通用格式化字符串;如 yyyy-MM-dd HH:mm:ss yyyy年MM月dd日 HH时mm分ss秒 、、、
|
|
1072
|
+
*/
|
|
1073
|
+
format?: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* 开始日期
|
|
1076
|
+
* - 单选择可选项
|
|
1077
|
+
* - 作为初始选中日期,不传入则默认当前
|
|
1078
|
+
*/
|
|
1079
|
+
begin?: string;
|
|
1080
|
+
/**
|
|
1081
|
+
* 结束日期
|
|
1082
|
+
* - range 为true时 选择器可选项
|
|
1083
|
+
* - 作为初始选中日期,不传入则默认当前
|
|
1084
|
+
*/
|
|
1085
|
+
end?: string;
|
|
1086
|
+
/**
|
|
1087
|
+
* 可选取时间最小范围
|
|
1088
|
+
* - 默认值:1900-10-01
|
|
1089
|
+
*/
|
|
1090
|
+
min?: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* 可选取时间最大范围
|
|
1093
|
+
* - 默认值:2099-12-31
|
|
1094
|
+
*/
|
|
1095
|
+
max?: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* 弹窗z-index值
|
|
1098
|
+
* - 默认:10000
|
|
1099
|
+
*/
|
|
1100
|
+
zIndex?: number;
|
|
1101
|
+
/**
|
|
1102
|
+
* 是否禁用【选择时间】
|
|
1103
|
+
* - 为true时,不出【选择时间】按钮
|
|
1104
|
+
*/
|
|
1105
|
+
timeDisabled?: boolean;
|
|
1106
|
+
/**
|
|
1107
|
+
* 是否禁用【选择秒】
|
|
1108
|
+
* - 为true时,选择时间时不支持选择秒单位
|
|
1109
|
+
*/
|
|
1110
|
+
secondDisabled?: boolean;
|
|
1111
|
+
/**
|
|
1112
|
+
* 是否禁止【清空】按钮
|
|
1113
|
+
* - 为true时,不显示【清空【按钮
|
|
1114
|
+
*/
|
|
1115
|
+
cleanDisabled?: boolean;
|
|
1116
|
+
/**
|
|
1117
|
+
* 是否禁用【现在】按钮
|
|
1118
|
+
* - 为true时,不显示【现在】按钮
|
|
1119
|
+
* - 在 type 为 doublexxx 时始终禁止
|
|
1120
|
+
* - 同时指定min和max时,时始终禁止
|
|
1121
|
+
*/
|
|
1122
|
+
nowDisabled?: boolean;
|
|
1123
|
+
/**
|
|
1124
|
+
* 是否禁止【确定】按钮
|
|
1125
|
+
* - 为true时,不显示【确定】按钮
|
|
1126
|
+
*/
|
|
1127
|
+
submitDisabled?: boolean;
|
|
1128
|
+
/**
|
|
1129
|
+
* 插件宽度配置
|
|
1130
|
+
* - 默认值:280
|
|
1131
|
+
* - 220 <= X <= 500
|
|
1132
|
+
*/
|
|
1133
|
+
width?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* 插件高度配置
|
|
1136
|
+
* - 默认值:300
|
|
1137
|
+
* - 240 <= X <= 350
|
|
1138
|
+
*/
|
|
1139
|
+
height?: number;
|
|
1140
|
+
/**
|
|
1141
|
+
* 插件与输入框的高度
|
|
1142
|
+
* - 默认值:4
|
|
1143
|
+
*/
|
|
1144
|
+
behindTop?: number;
|
|
1145
|
+
};
|
|
1146
|
+
/**
|
|
1147
|
+
* 日期选择器 组件事件
|
|
1148
|
+
*/
|
|
1149
|
+
type DatePickerEvents = {
|
|
1150
|
+
/**
|
|
1151
|
+
* 日期选择器 选择值改变
|
|
1152
|
+
* @param begin 选择的起始日期;undefined表示无值,如清空时
|
|
1153
|
+
* @param end 选择的结束日期;在range范围选择时才有值;undefined表示无值,如清空时
|
|
1154
|
+
*/
|
|
1155
|
+
change: [begin: string | undefined, end: string | undefined];
|
|
1156
|
+
/**
|
|
1157
|
+
* 日期选择器得到焦点
|
|
1158
|
+
* - 鼠标进入选择器
|
|
1159
|
+
*/
|
|
1160
|
+
"picker-focus": [];
|
|
1161
|
+
/**
|
|
1162
|
+
* 日期选择器失去焦点
|
|
1163
|
+
* - 鼠标离开选择器
|
|
1164
|
+
*/
|
|
1165
|
+
"picker-blur": [];
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1044
1168
|
/**
|
|
1045
1169
|
* 检查选项 数据结构
|
|
1046
1170
|
*/
|
|
@@ -1854,6 +1978,17 @@ declare const components: {
|
|
|
1854
1978
|
onChange?: (values: any) => any;
|
|
1855
1979
|
"onUpdate:modelValue"?: (value: any) => any;
|
|
1856
1980
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
1981
|
+
DatePicker: vue.DefineComponent<DatepickerOptions, {
|
|
1982
|
+
showPicker: (delay: number) => void;
|
|
1983
|
+
}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1984
|
+
change: (begin: string, end: string) => any;
|
|
1985
|
+
"picker-focus": () => any;
|
|
1986
|
+
"picker-blur": () => any;
|
|
1987
|
+
}, string, vue.PublicProps, Readonly<DatepickerOptions> & Readonly<{
|
|
1988
|
+
onChange?: (begin: string, end: string) => any;
|
|
1989
|
+
"onPicker-focus"?: () => any;
|
|
1990
|
+
"onPicker-blur"?: () => any;
|
|
1991
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1857
1992
|
Footer: {
|
|
1858
1993
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<FooterOptions> & Readonly<{
|
|
1859
1994
|
onCancel?: () => any;
|
|
@@ -2378,4 +2513,4 @@ declare const components: {
|
|
|
2378
2513
|
};
|
|
2379
2514
|
|
|
2380
2515
|
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
|
2381
|
-
export type { ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, EventsType, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutOptions, LoadingOptions, MessageOptions, MoveEvents, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollStatus, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|
|
2516
|
+
export type { ButtonOptions, ChangeEvents, ChooseEvents, ChooseItem, ChooseOptions, ClickEvents, CloseEvents, ComponentBindOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DatePickerEvents, DatepickerOptions, DeleteEvents, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, EventsType, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LayoutOptions, LoadingOptions, MessageOptions, MoveEvents, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, PropsType, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollStatus, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupEvents, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, ValueOptions, WrapperEvents, WrapperOptions };
|
package/dist/snail.vue.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, normalizeStyle, createElementVNode, toDisplayString, Fragment, renderList, unref, mergeModels, useModel, computed, createCommentVNode, createBlock, nextTick, withDirectives, vModelText, createVNode, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, watch, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots,
|
|
3
|
-
import { throwError, isArrayNotEmpty, isStringNotEmpty, useKey, isArray, mustFunction, useScope, removeFromArray, mustObject, throwIfFalse, isObject, isNumberNotNaN, mountScope, useScopes, isPromise, wait,
|
|
4
|
-
import {
|
|
2
|
+
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, shallowRef, normalizeStyle, createElementVNode, toDisplayString, Fragment, renderList, unref, mergeModels, useModel, computed, createCommentVNode, createBlock, nextTick, onMounted, onUnmounted, withDirectives, vModelText, createVNode, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, watch, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, withModifiers, isRef, getCurrentInstance, useTemplateRef, resolveComponent, onBeforeUnmount, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
|
+
import { throwError, isArrayNotEmpty, isStringNotEmpty, useKey, isArray, useTimer, newId, script, isFunction, getFromArray, mustFunction, useScope, removeFromArray, mustObject, throwIfFalse, isObject, isNumberNotNaN, mountScope, useScopes, isPromise, wait, delay, defer, useAsyncScope, useHook, hasAny, throwIfTrue, onMountScope } from 'snail.core';
|
|
4
|
+
import { link, css, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
|
-
const _hoisted_1$
|
|
7
|
-
var _sfc_main$
|
|
6
|
+
const _hoisted_1$h = ["title"];
|
|
7
|
+
var _sfc_main$u = defineComponent({
|
|
8
8
|
...{
|
|
9
9
|
name: "Button",
|
|
10
10
|
inheritAttrs: true
|
|
@@ -20,11 +20,15 @@ var _sfc_main$t = defineComponent({
|
|
|
20
20
|
return openBlock(), createElementBlock("div", {
|
|
21
21
|
class: normalizeClass(["snail-button", [_ctx.size, _ctx.type]]),
|
|
22
22
|
title: _ctx.title
|
|
23
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮"))])], 10, _hoisted_1$
|
|
23
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createTextVNode("按钮"))])], 10, _hoisted_1$h);
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
29
|
+
|
|
30
|
+
addLink("/styles/snail.vue.vue.css");
|
|
31
|
+
|
|
28
32
|
function getSvgDraw(iconType, draw) {
|
|
29
33
|
switch (iconType) {
|
|
30
34
|
case "success":
|
|
@@ -59,10 +63,10 @@ function getSvgDraw(iconType, draw) {
|
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
const _hoisted_1$
|
|
66
|
+
const _hoisted_1$g = ["width", "height"];
|
|
63
67
|
const _hoisted_2$a = ["textContent"];
|
|
64
68
|
const _hoisted_3$7 = ["fill", "stroke", "stroke-width", "d"];
|
|
65
|
-
var _sfc_main$
|
|
69
|
+
var _sfc_main$t = defineComponent({
|
|
66
70
|
...{
|
|
67
71
|
name: "Icon",
|
|
68
72
|
inheritAttrs: true
|
|
@@ -99,16 +103,16 @@ var _sfc_main$s = defineComponent({
|
|
|
99
103
|
"stroke-width": _ctx.strokeWidth,
|
|
100
104
|
d: draw
|
|
101
105
|
}, null, 8, _hoisted_3$7);
|
|
102
|
-
}), 256))], 46, _hoisted_1$
|
|
106
|
+
}), 256))], 46, _hoisted_1$g);
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
109
|
});
|
|
106
110
|
|
|
107
|
-
const _hoisted_1$
|
|
111
|
+
const _hoisted_1$f = ["onClick"];
|
|
108
112
|
const _hoisted_2$9 = ["type", "checked"];
|
|
109
113
|
const _hoisted_3$6 = ["textContent"];
|
|
110
114
|
const _hoisted_4$4 = ["textContent"];
|
|
111
|
-
var _sfc_main$
|
|
115
|
+
var _sfc_main$s = defineComponent({
|
|
112
116
|
...{
|
|
113
117
|
name: "Choose",
|
|
114
118
|
inheritAttrs: true
|
|
@@ -181,7 +185,7 @@ var _sfc_main$r = defineComponent({
|
|
|
181
185
|
}, null, 8, _hoisted_2$9)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
182
186
|
key: 1,
|
|
183
187
|
class: normalizeClass(["item-beautiful", [_ctx.type, node.checked ? "item-checked" : "item-unchecked"]])
|
|
184
|
-
}, [node.checked ? (openBlock(), createBlock(_sfc_main$
|
|
188
|
+
}, [node.checked ? (openBlock(), createBlock(_sfc_main$t, {
|
|
185
189
|
key: 0,
|
|
186
190
|
type: "success",
|
|
187
191
|
size: 12,
|
|
@@ -194,15 +198,168 @@ var _sfc_main$r = defineComponent({
|
|
|
194
198
|
key: 3,
|
|
195
199
|
class: "item-des",
|
|
196
200
|
textContent: toDisplayString(node.item.description)
|
|
197
|
-
}, null, 8, _hoisted_4$4)) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
201
|
+
}, null, 8, _hoisted_4$4)) : createCommentVNode("", true)], 14, _hoisted_1$f);
|
|
198
202
|
}), 128))], 2);
|
|
199
203
|
};
|
|
200
204
|
}
|
|
201
205
|
});
|
|
202
206
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
207
|
+
const _hoisted_1$e = ["id"];
|
|
208
|
+
var _sfc_main$r = defineComponent({
|
|
209
|
+
__name: "datepicker",
|
|
210
|
+
props: {
|
|
211
|
+
type: {},
|
|
212
|
+
range: {
|
|
213
|
+
type: Boolean
|
|
214
|
+
},
|
|
215
|
+
format: {},
|
|
216
|
+
begin: {},
|
|
217
|
+
end: {},
|
|
218
|
+
min: {},
|
|
219
|
+
max: {},
|
|
220
|
+
zIndex: {},
|
|
221
|
+
timeDisabled: {
|
|
222
|
+
type: Boolean
|
|
223
|
+
},
|
|
224
|
+
secondDisabled: {
|
|
225
|
+
type: Boolean
|
|
226
|
+
},
|
|
227
|
+
cleanDisabled: {
|
|
228
|
+
type: Boolean
|
|
229
|
+
},
|
|
230
|
+
nowDisabled: {
|
|
231
|
+
type: Boolean
|
|
232
|
+
},
|
|
233
|
+
submitDisabled: {
|
|
234
|
+
type: Boolean
|
|
235
|
+
},
|
|
236
|
+
width: {},
|
|
237
|
+
height: {},
|
|
238
|
+
behindTop: {}
|
|
239
|
+
},
|
|
240
|
+
emits: ["change", "picker-focus", "picker-blur"],
|
|
241
|
+
setup(__props, _ref) {
|
|
242
|
+
let {
|
|
243
|
+
expose: __expose,
|
|
244
|
+
emit: __emit
|
|
245
|
+
} = _ref;
|
|
246
|
+
const props = __props;
|
|
247
|
+
const emits = __emit;
|
|
248
|
+
const {
|
|
249
|
+
onInterval,
|
|
250
|
+
onTimeout
|
|
251
|
+
} = useTimer();
|
|
252
|
+
const {
|
|
253
|
+
range
|
|
254
|
+
} = props;
|
|
255
|
+
const format = props.format || "yyyy-MM-dd";
|
|
256
|
+
const id = `DP${newId()}`.toUpperCase();
|
|
257
|
+
var pickerInitialTimer = void 0;
|
|
258
|
+
var pickerLastStatus = void 0;
|
|
259
|
+
var pickerStatusTimer = void 0;
|
|
260
|
+
const pickerStatusArray = [];
|
|
261
|
+
__expose({
|
|
262
|
+
showPicker
|
|
263
|
+
});
|
|
264
|
+
function initZanePopup(flag) {
|
|
265
|
+
const obj = window[flag] ? window[flag].$obj : void 0;
|
|
266
|
+
if (obj) {
|
|
267
|
+
obj.removeEventListener("mouseenter", onZanePopupFocus);
|
|
268
|
+
obj.removeEventListener("mouseleave", onZanePopupFocus);
|
|
269
|
+
obj.addEventListener("mouseenter", onZanePopupFocus);
|
|
270
|
+
obj.addEventListener("mouseleave", onZanePopupFocus);
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function destroyZanePopup(flag) {
|
|
275
|
+
if (window[flag]) {
|
|
276
|
+
window[flag].removeCalendar && window[flag].removeCalendar();
|
|
277
|
+
delete window[flag];
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
function showPicker(delay) {
|
|
281
|
+
const div = document.getElementById(id);
|
|
282
|
+
div && (delay > 0 ? onTimeout(() => div.click(), delay) : div.click());
|
|
283
|
+
}
|
|
284
|
+
function onClick() {
|
|
285
|
+
if (pickerInitialTimer && pickerInitialTimer.destroyed != true) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
pickerInitialTimer = onInterval(() => {
|
|
289
|
+
let counter = 0;
|
|
290
|
+
initZanePopup(id) && counter++;
|
|
291
|
+
range && initZanePopup(`${id}DOUBLE`) && counter++;
|
|
292
|
+
counter == (range ? 2 : 1) && pickerInitialTimer.destroy();
|
|
293
|
+
}, 10);
|
|
294
|
+
const timeoutScope = onTimeout(() => pickerInitialTimer.destroyed || pickerInitialTimer.destroy(), 5e3);
|
|
295
|
+
pickerInitialTimer.onDestroy(() => timeoutScope.destroyed || timeoutScope.destroy());
|
|
296
|
+
}
|
|
297
|
+
function onZaneMounted() {}
|
|
298
|
+
function onZanePopupFocus(e) {
|
|
299
|
+
const type = e.type == "mouseenter" ? "focus" : "blur";
|
|
300
|
+
pickerStatusArray.push(type);
|
|
301
|
+
pickerStatusTimer && pickerStatusTimer.destroy();
|
|
302
|
+
pickerStatusTimer = onTimeout(() => {
|
|
303
|
+
const lastStatus = getFromArray(pickerStatusArray, -1);
|
|
304
|
+
lastStatus && pickerLastStatus != lastStatus && emits(`picker-${lastStatus}`);
|
|
305
|
+
pickerLastStatus = lastStatus;
|
|
306
|
+
pickerStatusTimer = void 0;
|
|
307
|
+
pickerStatusArray.splice(0);
|
|
308
|
+
}, 0);
|
|
309
|
+
}
|
|
310
|
+
function onZaneDone(full, begin, end) {
|
|
311
|
+
if (format.includes("-") == true) {
|
|
312
|
+
begin && (begin = begin.replaceAll("/", "-"));
|
|
313
|
+
end && (end = end.replaceAll("/", "-"));
|
|
314
|
+
}
|
|
315
|
+
emits("change", begin, end);
|
|
316
|
+
}
|
|
317
|
+
link.register("/styles/zane-calendar.css");
|
|
318
|
+
onMounted(() => {
|
|
319
|
+
script.has("zane-calendar") || throwError(`zane-calendar module unregistered.`);
|
|
320
|
+
const zaneOptions = {
|
|
321
|
+
elem: `#${id}`,
|
|
322
|
+
type: `${range ? "double" : ""}${props.type || "day"}`,
|
|
323
|
+
format,
|
|
324
|
+
begintime: props.begin || "",
|
|
325
|
+
endtime: props.end || "",
|
|
326
|
+
min: props.min || "1900-10-01",
|
|
327
|
+
max: props.max || "",
|
|
328
|
+
zindex: props.zIndex || 1e4,
|
|
329
|
+
showtime: props.timeDisabled != true,
|
|
330
|
+
showsecond: props.secondDisabled != true,
|
|
331
|
+
showclean: props.cleanDisabled != true,
|
|
332
|
+
shownow: props.nowDisabled != true,
|
|
333
|
+
showsubmit: props.submitDisabled != true,
|
|
334
|
+
width: props.width || 280,
|
|
335
|
+
height: props.height || 300,
|
|
336
|
+
behindTop: props.behindTop || 4,
|
|
337
|
+
lang: "cn",
|
|
338
|
+
event: "click",
|
|
339
|
+
position: "fixed",
|
|
340
|
+
haveBotBtns: true,
|
|
341
|
+
mounted: onZaneMounted,
|
|
342
|
+
done: onZaneDone
|
|
343
|
+
};
|
|
344
|
+
script.load("zane-calendar").then(calendar => {
|
|
345
|
+
console.log(zaneOptions);
|
|
346
|
+
isFunction(calendar) || throwError("load zane-calendar failed: value is not a function.");
|
|
347
|
+
calendar(zaneOptions);
|
|
348
|
+
}, reason => throwError(reason));
|
|
349
|
+
});
|
|
350
|
+
onUnmounted(() => {
|
|
351
|
+
destroyZanePopup(id);
|
|
352
|
+
range && destroyZanePopup(`${id}DOUBLE`);
|
|
353
|
+
});
|
|
354
|
+
return (_ctx, _cache) => {
|
|
355
|
+
return openBlock(), createElementBlock("div", {
|
|
356
|
+
class: "snail-datepicker",
|
|
357
|
+
id: unref(id),
|
|
358
|
+
onClick
|
|
359
|
+
}, null, 8, _hoisted_1$e);
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
});
|
|
206
363
|
|
|
207
364
|
var _sfc_main$q = defineComponent({
|
|
208
365
|
...{
|
|
@@ -235,13 +392,13 @@ var _sfc_main$q = defineComponent({
|
|
|
235
392
|
class: normalizeClass(["snail-footer", {
|
|
236
393
|
"start-divider": _ctx.divider
|
|
237
394
|
}, _ctx.align || "right"])
|
|
238
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
395
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$u, {
|
|
239
396
|
key: 0,
|
|
240
397
|
size: "max",
|
|
241
398
|
type: "default",
|
|
242
399
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
243
400
|
textContent: toDisplayString(_ctx.cancelName || "取消")
|
|
244
|
-
}, null, 8, ["textContent"])) : createCommentVNode("", true), _ctx.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
401
|
+
}, null, 8, ["textContent"])) : createCommentVNode("", true), _ctx.confirmDisabled != true ? (openBlock(), createBlock(_sfc_main$u, {
|
|
245
402
|
key: 1,
|
|
246
403
|
size: "max",
|
|
247
404
|
type: "primary",
|
|
@@ -292,7 +449,7 @@ var _sfc_main$p = defineComponent({
|
|
|
292
449
|
key: 0,
|
|
293
450
|
textContent: toDisplayString(_ctx.title),
|
|
294
451
|
class: normalizeClass(["header-title", _ctx.titleAlign])
|
|
295
|
-
}, null, 10, _hoisted_1$d)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
452
|
+
}, null, 10, _hoisted_1$d)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (openBlock(), createBlock(_sfc_main$t, {
|
|
296
453
|
key: 1,
|
|
297
454
|
type: "close",
|
|
298
455
|
size: 22,
|
|
@@ -353,7 +510,7 @@ var _sfc_main$o = defineComponent({
|
|
|
353
510
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
354
511
|
}, null, 40, _hoisted_1$c), [[vModelText, textModel.value, void 0, {
|
|
355
512
|
trim: true
|
|
356
|
-
}]]), createElementVNode("div", null, [createVNode(_sfc_main$
|
|
513
|
+
}]]), createElementVNode("div", null, [createVNode(_sfc_main$t, {
|
|
357
514
|
class: "search-button",
|
|
358
515
|
type: "custom",
|
|
359
516
|
draw: searchIon,
|
|
@@ -1050,7 +1207,7 @@ var _sfc_main$h = defineComponent({
|
|
|
1050
1207
|
}),
|
|
1051
1208
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1052
1209
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1053
|
-
}, [createVNode(_sfc_main$
|
|
1210
|
+
}, [createVNode(_sfc_main$t, {
|
|
1054
1211
|
type: "close",
|
|
1055
1212
|
class: "close-icon",
|
|
1056
1213
|
fill: closeFillRef.value,
|
|
@@ -1060,7 +1217,7 @@ var _sfc_main$h = defineComponent({
|
|
|
1060
1217
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1061
1218
|
unref(closePopup)();
|
|
1062
1219
|
})
|
|
1063
|
-
}, null, 8, ["fill"]), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$a, [createVNode(_sfc_main$
|
|
1220
|
+
}, null, 8, ["fill"]), unref(props).type ? (openBlock(), createElementBlock("div", _hoisted_1$a, [createVNode(_sfc_main$t, {
|
|
1064
1221
|
type: unref(props).type,
|
|
1065
1222
|
fill: "#707070",
|
|
1066
1223
|
size: 20
|
|
@@ -1392,11 +1549,11 @@ var _sfc_main$f = defineComponent({
|
|
|
1392
1549
|
}, [createElementVNode("div", {
|
|
1393
1550
|
class: "item-text",
|
|
1394
1551
|
textContent: toDisplayString(_ctx.item.text)
|
|
1395
|
-
}, null, 8, _hoisted_2$5), _ctx.item.type == "group" ? (openBlock(), createBlock(_sfc_main$
|
|
1552
|
+
}, null, 8, _hoisted_2$5), _ctx.item.type == "group" ? (openBlock(), createBlock(_sfc_main$t, {
|
|
1396
1553
|
key: 0,
|
|
1397
1554
|
type: "arrow",
|
|
1398
1555
|
color: "#8a9099"
|
|
1399
|
-
})) : _ctx.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$4, [createVNode(_sfc_main$
|
|
1556
|
+
})) : _ctx.multiple == true ? (openBlock(), createElementBlock("div", _hoisted_3$4, [createVNode(_sfc_main$t, {
|
|
1400
1557
|
type: "success",
|
|
1401
1558
|
color: "white",
|
|
1402
1559
|
size: 12
|
|
@@ -1769,7 +1926,7 @@ var _sfc_main$d = defineComponent({
|
|
|
1769
1926
|
key: 1,
|
|
1770
1927
|
class: "select-result text-tips",
|
|
1771
1928
|
textContent: toDisplayString(_ctx.readonly ? "" : _ctx.placeholder || "请选择")
|
|
1772
|
-
}, null, 8, _hoisted_3$3)), createVNode(_sfc_main$
|
|
1929
|
+
}, null, 8, _hoisted_3$3)), createVNode(_sfc_main$t, {
|
|
1773
1930
|
type: "arrow",
|
|
1774
1931
|
size: 24,
|
|
1775
1932
|
color: "#8a9099",
|
|
@@ -1920,7 +2077,7 @@ var _sfc_main$b = defineComponent({
|
|
|
1920
2077
|
key: 0,
|
|
1921
2078
|
class: "subtitle",
|
|
1922
2079
|
textContent: toDisplayString(_ctx.subtitle)
|
|
1923
|
-
}, null, 8, _hoisted_3$2)) : createCommentVNode("", true), _ctx.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createVNode(_sfc_main$
|
|
2080
|
+
}, null, 8, _hoisted_3$2)) : createCommentVNode("", true), _ctx.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createVNode(_sfc_main$t, {
|
|
1924
2081
|
type: "arrow",
|
|
1925
2082
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
1926
2083
|
onClick: onStatusClick
|
|
@@ -2398,7 +2555,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
2398
2555
|
key: 1
|
|
2399
2556
|
}, [_cache[4] || (_cache[4] = createElementVNode("div", {
|
|
2400
2557
|
class: "indent"
|
|
2401
|
-
}, null, -1)), _ctx.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$
|
|
2558
|
+
}, null, -1)), _ctx.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2402
2559
|
key: 0,
|
|
2403
2560
|
class: normalizeClass(statusRef.value),
|
|
2404
2561
|
type: "custom",
|
|
@@ -2631,7 +2788,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
2631
2788
|
key: 0,
|
|
2632
2789
|
class: "validate",
|
|
2633
2790
|
title: validateRef.value
|
|
2634
|
-
}, [createVNode(_sfc_main$
|
|
2791
|
+
}, [createVNode(_sfc_main$t, {
|
|
2635
2792
|
type: "error",
|
|
2636
2793
|
size: 16,
|
|
2637
2794
|
color: "red"
|
|
@@ -2725,12 +2882,12 @@ var _sfc_main = defineComponent({
|
|
|
2725
2882
|
onTouchstart: onStartDrag,
|
|
2726
2883
|
onTouchmove: onDragMove,
|
|
2727
2884
|
onTouchend: onDragEnd
|
|
2728
|
-
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$
|
|
2885
|
+
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2729
2886
|
key: 0,
|
|
2730
2887
|
type: "success",
|
|
2731
2888
|
size: 20,
|
|
2732
2889
|
color: "white"
|
|
2733
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
2890
|
+
})) : (openBlock(), createBlock(_sfc_main$t, {
|
|
2734
2891
|
key: 1,
|
|
2735
2892
|
type: "custom",
|
|
2736
2893
|
size: 20,
|
|
@@ -2742,11 +2899,12 @@ var _sfc_main = defineComponent({
|
|
|
2742
2899
|
});
|
|
2743
2900
|
|
|
2744
2901
|
const components = {
|
|
2745
|
-
Button: _sfc_main$
|
|
2746
|
-
Choose: _sfc_main$
|
|
2902
|
+
Button: _sfc_main$u,
|
|
2903
|
+
Choose: _sfc_main$s,
|
|
2904
|
+
DatePicker: _sfc_main$r,
|
|
2747
2905
|
Footer: _sfc_main$q,
|
|
2748
2906
|
Header: _sfc_main$p,
|
|
2749
|
-
Icon: _sfc_main$
|
|
2907
|
+
Icon: _sfc_main$t,
|
|
2750
2908
|
Search: _sfc_main$o,
|
|
2751
2909
|
Select: _sfc_main$d,
|
|
2752
2910
|
Switch: _sfc_main$c,
|
package/dist/snail.vue.umd.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SnailVue = global.SnailVue || {}, global.Vue, global.Snail, global.SnailView));
|
|
6
6
|
})(this, (function (exports, vue, snail_core, snail_view) { 'use strict';
|
|
7
7
|
|
|
8
|
-
const _hoisted_1$
|
|
9
|
-
var _sfc_main$
|
|
8
|
+
const _hoisted_1$h = ["title"];
|
|
9
|
+
var _sfc_main$u = vue.defineComponent({
|
|
10
10
|
...{
|
|
11
11
|
name: "Button",
|
|
12
12
|
inheritAttrs: true
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
23
23
|
class: vue.normalizeClass(["snail-button", [_ctx.size, _ctx.type]]),
|
|
24
24
|
title: _ctx.title
|
|
25
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮"))])], 10, _hoisted_1$
|
|
25
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = vue.createTextVNode("按钮"))])], 10, _hoisted_1$h);
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
31
|
+
|
|
32
|
+
addLink("/styles/snail.vue.vue.css");
|
|
33
|
+
|
|
30
34
|
function getSvgDraw(iconType, draw) {
|
|
31
35
|
switch (iconType) {
|
|
32
36
|
case "success":
|
|
@@ -61,10 +65,10 @@
|
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
67
|
|
|
64
|
-
const _hoisted_1$
|
|
68
|
+
const _hoisted_1$g = ["width", "height"];
|
|
65
69
|
const _hoisted_2$a = ["textContent"];
|
|
66
70
|
const _hoisted_3$7 = ["fill", "stroke", "stroke-width", "d"];
|
|
67
|
-
var _sfc_main$
|
|
71
|
+
var _sfc_main$t = vue.defineComponent({
|
|
68
72
|
...{
|
|
69
73
|
name: "Icon",
|
|
70
74
|
inheritAttrs: true
|
|
@@ -101,16 +105,16 @@
|
|
|
101
105
|
"stroke-width": _ctx.strokeWidth,
|
|
102
106
|
d: draw
|
|
103
107
|
}, null, 8, _hoisted_3$7);
|
|
104
|
-
}), 256))], 46, _hoisted_1$
|
|
108
|
+
}), 256))], 46, _hoisted_1$g);
|
|
105
109
|
};
|
|
106
110
|
}
|
|
107
111
|
});
|
|
108
112
|
|
|
109
|
-
const _hoisted_1$
|
|
113
|
+
const _hoisted_1$f = ["onClick"];
|
|
110
114
|
const _hoisted_2$9 = ["type", "checked"];
|
|
111
115
|
const _hoisted_3$6 = ["textContent"];
|
|
112
116
|
const _hoisted_4$4 = ["textContent"];
|
|
113
|
-
var _sfc_main$
|
|
117
|
+
var _sfc_main$s = vue.defineComponent({
|
|
114
118
|
...{
|
|
115
119
|
name: "Choose",
|
|
116
120
|
inheritAttrs: true
|
|
@@ -183,7 +187,7 @@
|
|
|
183
187
|
}, null, 8, _hoisted_2$9)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
184
188
|
key: 1,
|
|
185
189
|
class: vue.normalizeClass(["item-beautiful", [_ctx.type, node.checked ? "item-checked" : "item-unchecked"]])
|
|
186
|
-
}, [node.checked ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
190
|
+
}, [node.checked ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
187
191
|
key: 0,
|
|
188
192
|
type: "success",
|
|
189
193
|
size: 12,
|
|
@@ -196,15 +200,168 @@
|
|
|
196
200
|
key: 3,
|
|
197
201
|
class: "item-des",
|
|
198
202
|
textContent: vue.toDisplayString(node.item.description)
|
|
199
|
-
}, null, 8, _hoisted_4$4)) : vue.createCommentVNode("", true)], 14, _hoisted_1$
|
|
203
|
+
}, null, 8, _hoisted_4$4)) : vue.createCommentVNode("", true)], 14, _hoisted_1$f);
|
|
200
204
|
}), 128))], 2);
|
|
201
205
|
};
|
|
202
206
|
}
|
|
203
207
|
});
|
|
204
208
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
const _hoisted_1$e = ["id"];
|
|
210
|
+
var _sfc_main$r = vue.defineComponent({
|
|
211
|
+
__name: "datepicker",
|
|
212
|
+
props: {
|
|
213
|
+
type: {},
|
|
214
|
+
range: {
|
|
215
|
+
type: Boolean
|
|
216
|
+
},
|
|
217
|
+
format: {},
|
|
218
|
+
begin: {},
|
|
219
|
+
end: {},
|
|
220
|
+
min: {},
|
|
221
|
+
max: {},
|
|
222
|
+
zIndex: {},
|
|
223
|
+
timeDisabled: {
|
|
224
|
+
type: Boolean
|
|
225
|
+
},
|
|
226
|
+
secondDisabled: {
|
|
227
|
+
type: Boolean
|
|
228
|
+
},
|
|
229
|
+
cleanDisabled: {
|
|
230
|
+
type: Boolean
|
|
231
|
+
},
|
|
232
|
+
nowDisabled: {
|
|
233
|
+
type: Boolean
|
|
234
|
+
},
|
|
235
|
+
submitDisabled: {
|
|
236
|
+
type: Boolean
|
|
237
|
+
},
|
|
238
|
+
width: {},
|
|
239
|
+
height: {},
|
|
240
|
+
behindTop: {}
|
|
241
|
+
},
|
|
242
|
+
emits: ["change", "picker-focus", "picker-blur"],
|
|
243
|
+
setup(__props, _ref) {
|
|
244
|
+
let {
|
|
245
|
+
expose: __expose,
|
|
246
|
+
emit: __emit
|
|
247
|
+
} = _ref;
|
|
248
|
+
const props = __props;
|
|
249
|
+
const emits = __emit;
|
|
250
|
+
const {
|
|
251
|
+
onInterval,
|
|
252
|
+
onTimeout
|
|
253
|
+
} = snail_core.useTimer();
|
|
254
|
+
const {
|
|
255
|
+
range
|
|
256
|
+
} = props;
|
|
257
|
+
const format = props.format || "yyyy-MM-dd";
|
|
258
|
+
const id = `DP${snail_core.newId()}`.toUpperCase();
|
|
259
|
+
var pickerInitialTimer = void 0;
|
|
260
|
+
var pickerLastStatus = void 0;
|
|
261
|
+
var pickerStatusTimer = void 0;
|
|
262
|
+
const pickerStatusArray = [];
|
|
263
|
+
__expose({
|
|
264
|
+
showPicker
|
|
265
|
+
});
|
|
266
|
+
function initZanePopup(flag) {
|
|
267
|
+
const obj = window[flag] ? window[flag].$obj : void 0;
|
|
268
|
+
if (obj) {
|
|
269
|
+
obj.removeEventListener("mouseenter", onZanePopupFocus);
|
|
270
|
+
obj.removeEventListener("mouseleave", onZanePopupFocus);
|
|
271
|
+
obj.addEventListener("mouseenter", onZanePopupFocus);
|
|
272
|
+
obj.addEventListener("mouseleave", onZanePopupFocus);
|
|
273
|
+
return true;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function destroyZanePopup(flag) {
|
|
277
|
+
if (window[flag]) {
|
|
278
|
+
window[flag].removeCalendar && window[flag].removeCalendar();
|
|
279
|
+
delete window[flag];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function showPicker(delay) {
|
|
283
|
+
const div = document.getElementById(id);
|
|
284
|
+
div && (delay > 0 ? onTimeout(() => div.click(), delay) : div.click());
|
|
285
|
+
}
|
|
286
|
+
function onClick() {
|
|
287
|
+
if (pickerInitialTimer && pickerInitialTimer.destroyed != true) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
pickerInitialTimer = onInterval(() => {
|
|
291
|
+
let counter = 0;
|
|
292
|
+
initZanePopup(id) && counter++;
|
|
293
|
+
range && initZanePopup(`${id}DOUBLE`) && counter++;
|
|
294
|
+
counter == (range ? 2 : 1) && pickerInitialTimer.destroy();
|
|
295
|
+
}, 10);
|
|
296
|
+
const timeoutScope = onTimeout(() => pickerInitialTimer.destroyed || pickerInitialTimer.destroy(), 5e3);
|
|
297
|
+
pickerInitialTimer.onDestroy(() => timeoutScope.destroyed || timeoutScope.destroy());
|
|
298
|
+
}
|
|
299
|
+
function onZaneMounted() {}
|
|
300
|
+
function onZanePopupFocus(e) {
|
|
301
|
+
const type = e.type == "mouseenter" ? "focus" : "blur";
|
|
302
|
+
pickerStatusArray.push(type);
|
|
303
|
+
pickerStatusTimer && pickerStatusTimer.destroy();
|
|
304
|
+
pickerStatusTimer = onTimeout(() => {
|
|
305
|
+
const lastStatus = snail_core.getFromArray(pickerStatusArray, -1);
|
|
306
|
+
lastStatus && pickerLastStatus != lastStatus && emits(`picker-${lastStatus}`);
|
|
307
|
+
pickerLastStatus = lastStatus;
|
|
308
|
+
pickerStatusTimer = void 0;
|
|
309
|
+
pickerStatusArray.splice(0);
|
|
310
|
+
}, 0);
|
|
311
|
+
}
|
|
312
|
+
function onZaneDone(full, begin, end) {
|
|
313
|
+
if (format.includes("-") == true) {
|
|
314
|
+
begin && (begin = begin.replaceAll("/", "-"));
|
|
315
|
+
end && (end = end.replaceAll("/", "-"));
|
|
316
|
+
}
|
|
317
|
+
emits("change", begin, end);
|
|
318
|
+
}
|
|
319
|
+
snail_view.link.register("/styles/zane-calendar.css");
|
|
320
|
+
vue.onMounted(() => {
|
|
321
|
+
snail_core.script.has("zane-calendar") || snail_core.throwError(`zane-calendar module unregistered.`);
|
|
322
|
+
const zaneOptions = {
|
|
323
|
+
elem: `#${id}`,
|
|
324
|
+
type: `${range ? "double" : ""}${props.type || "day"}`,
|
|
325
|
+
format,
|
|
326
|
+
begintime: props.begin || "",
|
|
327
|
+
endtime: props.end || "",
|
|
328
|
+
min: props.min || "1900-10-01",
|
|
329
|
+
max: props.max || "",
|
|
330
|
+
zindex: props.zIndex || 1e4,
|
|
331
|
+
showtime: props.timeDisabled != true,
|
|
332
|
+
showsecond: props.secondDisabled != true,
|
|
333
|
+
showclean: props.cleanDisabled != true,
|
|
334
|
+
shownow: props.nowDisabled != true,
|
|
335
|
+
showsubmit: props.submitDisabled != true,
|
|
336
|
+
width: props.width || 280,
|
|
337
|
+
height: props.height || 300,
|
|
338
|
+
behindTop: props.behindTop || 4,
|
|
339
|
+
lang: "cn",
|
|
340
|
+
event: "click",
|
|
341
|
+
position: "fixed",
|
|
342
|
+
haveBotBtns: true,
|
|
343
|
+
mounted: onZaneMounted,
|
|
344
|
+
done: onZaneDone
|
|
345
|
+
};
|
|
346
|
+
snail_core.script.load("zane-calendar").then(calendar => {
|
|
347
|
+
console.log(zaneOptions);
|
|
348
|
+
snail_core.isFunction(calendar) || snail_core.throwError("load zane-calendar failed: value is not a function.");
|
|
349
|
+
calendar(zaneOptions);
|
|
350
|
+
}, reason => snail_core.throwError(reason));
|
|
351
|
+
});
|
|
352
|
+
vue.onUnmounted(() => {
|
|
353
|
+
destroyZanePopup(id);
|
|
354
|
+
range && destroyZanePopup(`${id}DOUBLE`);
|
|
355
|
+
});
|
|
356
|
+
return (_ctx, _cache) => {
|
|
357
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
358
|
+
class: "snail-datepicker",
|
|
359
|
+
id: vue.unref(id),
|
|
360
|
+
onClick
|
|
361
|
+
}, null, 8, _hoisted_1$e);
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
});
|
|
208
365
|
|
|
209
366
|
var _sfc_main$q = vue.defineComponent({
|
|
210
367
|
...{
|
|
@@ -237,13 +394,13 @@
|
|
|
237
394
|
class: vue.normalizeClass(["snail-footer", {
|
|
238
395
|
"start-divider": _ctx.divider
|
|
239
396
|
}, _ctx.align || "right"])
|
|
240
|
-
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
397
|
+
}, [vue.renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
241
398
|
key: 0,
|
|
242
399
|
size: "max",
|
|
243
400
|
type: "default",
|
|
244
401
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
245
402
|
textContent: vue.toDisplayString(_ctx.cancelName || "取消")
|
|
246
|
-
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), _ctx.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
403
|
+
}, null, 8, ["textContent"])) : vue.createCommentVNode("", true), _ctx.confirmDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$u, {
|
|
247
404
|
key: 1,
|
|
248
405
|
size: "max",
|
|
249
406
|
type: "primary",
|
|
@@ -294,7 +451,7 @@
|
|
|
294
451
|
key: 0,
|
|
295
452
|
textContent: vue.toDisplayString(_ctx.title),
|
|
296
453
|
class: vue.normalizeClass(["header-title", _ctx.titleAlign])
|
|
297
|
-
}, null, 10, _hoisted_1$d)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
454
|
+
}, null, 10, _hoisted_1$d)) : vue.createCommentVNode("", true), vue.renderSlot(_ctx.$slots, "default"), _ctx.closeDisabled != true ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
298
455
|
key: 1,
|
|
299
456
|
type: "close",
|
|
300
457
|
size: 22,
|
|
@@ -355,7 +512,7 @@
|
|
|
355
512
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
356
513
|
}, null, 40, _hoisted_1$c), [[vue.vModelText, textModel.value, void 0, {
|
|
357
514
|
trim: true
|
|
358
|
-
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$
|
|
515
|
+
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$t, {
|
|
359
516
|
class: "search-button",
|
|
360
517
|
type: "custom",
|
|
361
518
|
draw: searchIon,
|
|
@@ -1052,7 +1209,7 @@
|
|
|
1052
1209
|
}),
|
|
1053
1210
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1054
1211
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1055
|
-
}, [vue.createVNode(_sfc_main$
|
|
1212
|
+
}, [vue.createVNode(_sfc_main$t, {
|
|
1056
1213
|
type: "close",
|
|
1057
1214
|
class: "close-icon",
|
|
1058
1215
|
fill: closeFillRef.value,
|
|
@@ -1062,7 +1219,7 @@
|
|
|
1062
1219
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1063
1220
|
vue.unref(closePopup)();
|
|
1064
1221
|
})
|
|
1065
|
-
}, null, 8, ["fill"]), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createVNode(_sfc_main$
|
|
1222
|
+
}, null, 8, ["fill"]), vue.unref(props).type ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$a, [vue.createVNode(_sfc_main$t, {
|
|
1066
1223
|
type: vue.unref(props).type,
|
|
1067
1224
|
fill: "#707070",
|
|
1068
1225
|
size: 20
|
|
@@ -1394,11 +1551,11 @@
|
|
|
1394
1551
|
}, [vue.createElementVNode("div", {
|
|
1395
1552
|
class: "item-text",
|
|
1396
1553
|
textContent: vue.toDisplayString(_ctx.item.text)
|
|
1397
|
-
}, null, 8, _hoisted_2$5), _ctx.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
1554
|
+
}, null, 8, _hoisted_2$5), _ctx.item.type == "group" ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
1398
1555
|
key: 0,
|
|
1399
1556
|
type: "arrow",
|
|
1400
1557
|
color: "#8a9099"
|
|
1401
|
-
})) : _ctx.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [vue.createVNode(_sfc_main$
|
|
1558
|
+
})) : _ctx.multiple == true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [vue.createVNode(_sfc_main$t, {
|
|
1402
1559
|
type: "success",
|
|
1403
1560
|
color: "white",
|
|
1404
1561
|
size: 12
|
|
@@ -1771,7 +1928,7 @@
|
|
|
1771
1928
|
key: 1,
|
|
1772
1929
|
class: "select-result text-tips",
|
|
1773
1930
|
textContent: vue.toDisplayString(_ctx.readonly ? "" : _ctx.placeholder || "请选择")
|
|
1774
|
-
}, null, 8, _hoisted_3$3)), vue.createVNode(_sfc_main$
|
|
1931
|
+
}, null, 8, _hoisted_3$3)), vue.createVNode(_sfc_main$t, {
|
|
1775
1932
|
type: "arrow",
|
|
1776
1933
|
size: 24,
|
|
1777
1934
|
color: "#8a9099",
|
|
@@ -1922,7 +2079,7 @@
|
|
|
1922
2079
|
key: 0,
|
|
1923
2080
|
class: "subtitle",
|
|
1924
2081
|
textContent: vue.toDisplayString(_ctx.subtitle)
|
|
1925
|
-
}, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), _ctx.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [vue.createVNode(_sfc_main$
|
|
2082
|
+
}, null, 8, _hoisted_3$2)) : vue.createCommentVNode("", true), _ctx.disabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$2, [vue.createVNode(_sfc_main$t, {
|
|
1926
2083
|
type: "arrow",
|
|
1927
2084
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
1928
2085
|
onClick: onStatusClick
|
|
@@ -2400,7 +2557,7 @@
|
|
|
2400
2557
|
key: 1
|
|
2401
2558
|
}, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
|
|
2402
2559
|
class: "indent"
|
|
2403
|
-
}, null, -1)), _ctx.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2560
|
+
}, null, -1)), _ctx.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2404
2561
|
key: 0,
|
|
2405
2562
|
class: vue.normalizeClass(statusRef.value),
|
|
2406
2563
|
type: "custom",
|
|
@@ -2633,7 +2790,7 @@
|
|
|
2633
2790
|
key: 0,
|
|
2634
2791
|
class: "validate",
|
|
2635
2792
|
title: validateRef.value
|
|
2636
|
-
}, [vue.createVNode(_sfc_main$
|
|
2793
|
+
}, [vue.createVNode(_sfc_main$t, {
|
|
2637
2794
|
type: "error",
|
|
2638
2795
|
size: 16,
|
|
2639
2796
|
color: "red"
|
|
@@ -2727,12 +2884,12 @@
|
|
|
2727
2884
|
onTouchstart: onStartDrag,
|
|
2728
2885
|
onTouchmove: onDragMove,
|
|
2729
2886
|
onTouchend: onDragEnd
|
|
2730
|
-
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2887
|
+
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2731
2888
|
key: 0,
|
|
2732
2889
|
type: "success",
|
|
2733
2890
|
size: 20,
|
|
2734
2891
|
color: "white"
|
|
2735
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2892
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2736
2893
|
key: 1,
|
|
2737
2894
|
type: "custom",
|
|
2738
2895
|
size: 20,
|
|
@@ -2744,11 +2901,12 @@
|
|
|
2744
2901
|
});
|
|
2745
2902
|
|
|
2746
2903
|
const components = {
|
|
2747
|
-
Button: _sfc_main$
|
|
2748
|
-
Choose: _sfc_main$
|
|
2904
|
+
Button: _sfc_main$u,
|
|
2905
|
+
Choose: _sfc_main$s,
|
|
2906
|
+
DatePicker: _sfc_main$r,
|
|
2749
2907
|
Footer: _sfc_main$q,
|
|
2750
2908
|
Header: _sfc_main$p,
|
|
2751
|
-
Icon: _sfc_main$
|
|
2909
|
+
Icon: _sfc_main$t,
|
|
2752
2910
|
Search: _sfc_main$o,
|
|
2753
2911
|
Select: _sfc_main$d,
|
|
2754
2912
|
Switch: _sfc_main$c,
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
/* src:base\choose.vue index:0 */
|
|
2
|
-
.snail-choose{align-items:center;display:flex;flex-wrap:wrap;overflow-x:hidden}.snail-choose>div.choose-item{align-items:center;cursor:pointer;display:flex;flex-shrink:0;margin:0 8px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-choose>div.choose-item:first-child{margin-left:0}.snail-choose>div.choose-item:after{content:"";height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.snail-choose>div.choose-item>input::checkmark{background-color:#2196f3;border-color:#2196f3}.snail-choose>div.choose-item>div.item-beautiful{align-items:center;display:flex;flex-shrink:0;justify-content:center;overflow:hidden}.snail-choose>div.choose-item>div.item-beautiful.radio{border-radius:50%;height:16px;width:16px}.snail-choose>div.choose-item>div.item-beautiful.checkbox{height:14px;width:14px}.snail-choose>div.choose-item>div.item-beautiful.item-unchecked{border:1px solid #8a9099}.snail-choose>div.choose-item>div.item-beautiful.item-checked{background-color:#4c9aff;border:1px solid #4c9aff}.snail-choose>div.choose-item>span{margin-left:4px}.snail-choose>div.choose-item>span.item-des{color:#8a9099}.snail-choose.readonly>div.choose-item{cursor:auto}.snail-choose.readonly>div.choose-item>div.item-beautiful.item-unchecked{opacity:.5}.snail-choose.readonly>div.choose-item>div.item-beautiful.item-checked{background-color:#d5d7db;border-color:#d5d7db}
|
|
3
1
|
/* src:base\button.vue index:0 */
|
|
4
2
|
.snail-button{align-items:center;border-radius:2px;cursor:pointer;display:flex;display:inline-flex;justify-content:center;overflow:hidden;-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}
|
|
3
|
+
/* src:base\choose.vue index:0 */
|
|
4
|
+
.snail-choose{align-items:center;display:flex;flex-wrap:wrap;overflow-x:hidden}.snail-choose>div.choose-item{align-items:center;cursor:pointer;display:flex;flex-shrink:0;margin:0 8px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-choose>div.choose-item:first-child{margin-left:0}.snail-choose>div.choose-item:after{content:"";height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%}.snail-choose>div.choose-item>input::checkmark{background-color:#2196f3;border-color:#2196f3}.snail-choose>div.choose-item>div.item-beautiful{align-items:center;display:flex;flex-shrink:0;justify-content:center;overflow:hidden}.snail-choose>div.choose-item>div.item-beautiful.radio{border-radius:50%;height:16px;width:16px}.snail-choose>div.choose-item>div.item-beautiful.checkbox{height:14px;width:14px}.snail-choose>div.choose-item>div.item-beautiful.item-unchecked{border:1px solid #8a9099}.snail-choose>div.choose-item>div.item-beautiful.item-checked{background-color:#4c9aff;border:1px solid #4c9aff}.snail-choose>div.choose-item>span{margin-left:4px}.snail-choose>div.choose-item>span.item-des{color:#8a9099}.snail-choose.readonly>div.choose-item{cursor:auto}.snail-choose.readonly>div.choose-item>div.item-beautiful.item-unchecked{opacity:.5}.snail-choose.readonly>div.choose-item>div.item-beautiful.item-checked{background-color:#d5d7db;border-color:#d5d7db}
|
|
5
|
+
/* src:base\datepicker.vue index:0 */
|
|
6
|
+
.snail-datepicker{height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}
|
|
5
7
|
/* src:base\footer.vue index:0 */
|
|
6
8
|
.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:flex-start}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:flex-end}
|
|
7
|
-
/* src:base\icon.vue index:0 */
|
|
8
|
-
.snail-icon{cursor:pointer;opacity:1}
|
|
9
9
|
/* src:base\header.vue index:0 */
|
|
10
10
|
.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:bold}.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}
|
|
11
|
+
/* src:base\icon.vue index:0 */
|
|
12
|
+
.snail-icon{cursor:pointer;opacity:1}
|
|
11
13
|
/* src:base\search.vue index:0 */
|
|
12
14
|
.snail-search{align-items:center;background:#fff;display:flex;flex-shrink:0;height:34px}.snail-search>input{border-radius:0!important;flex:1;height:100%}.snail-search>div{align-items:center;border:1px solid #dddfed;border-left:none;display:flex;flex-shrink:0;height:100%;justify-content:center;width:34px}
|
|
13
15
|
/* src:base\select.vue index:0 */
|
|
14
16
|
.snail-select{align-items:center;background-color:#fff;border:1px solid #dddfed;border-radius:4px;color:#2e3033;cursor:pointer;display:flex;height:32px;width:100%}.snail-select>div.select-result{align-items:center;display:flex;flex:1;flex-wrap:nowrap;height:30px;overflow:hidden;padding:0 10px 0 6px}.snail-select>div.select-result>div.select-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-select>svg.snail-icon{flex-shrink:0;margin-right:4px}.snail-select>div.no-items{align-items:center;cursor:text;display:flex;height:100%;padding:0 8px;width:100%}.snail-select.readonly{cursor:auto}.snail-select.readonly>svg.snail-icon{display:none}
|
|
15
17
|
/* src:base\switch.vue index:0 */
|
|
16
18
|
.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:not-allowed}
|
|
17
|
-
/* src:container\dynamic.vue index:0 */
|
|
18
|
-
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
19
19
|
/* src:container\fold.vue index:0 */
|
|
20
20
|
.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-weight:bold;padding-left:20px}.snail-fold>div.fold-header>.subtitle{color:#8a9099;font-size:13px}.snail-fold>div.fold-header>div.status{align-items:flex-end;display:flex;flex:1;justify-content:flex-end}.snail-fold>div.fold-header>div.status>svg.snail-icon{transition:transform .2s ease}.snail-fold>div.fold-body{padding-left:20px}.snail-fold.expand>div.fold-header>div.status>svg.snail-icon{transform:rotate(-90deg)}.snail-fold.fold>div.fold-header>div.status>svg.snail-icon{transform:rotate(90deg)}
|
|
21
|
+
/* src:container\dynamic.vue index:0 */
|
|
22
|
+
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
21
23
|
/* src:container\layout.vue index:0 */
|
|
22
24
|
.snail-layout{display:flex;height:100%;overflow:hidden;width:100%}.snail-layout>.layout-end,.snail-layout>.layout-start{flex-shrink:0}.snail-layout>.layout-body{flex:1}.snail-layout.horizontal{flex-direction:row}.snail-layout.horizontal>div{height:100%}.snail-layout.horizontal>.layout-end,.snail-layout.horizontal>.layout-start{width:-moz-fit-content;width:fit-content}.snail-layout.vertical{flex-direction:column}.snail-layout.vertical>div{width:100%}.snail-layout.vertical>.layout-end,.snail-layout.vertical>.layout-start{height:-moz-fit-content;height:fit-content}
|
|
23
25
|
/* src:container\scroll.vue index:0 */
|
|
@@ -30,14 +32,14 @@
|
|
|
30
32
|
.table-row{align-items:center;display:flex}
|
|
31
33
|
/* src:container\components\table-col.vue index:0 */
|
|
32
34
|
.table-col{align-items:center;display:flex;height:100%;white-space:nowrap}.table-col.left{justify-content:flex-start}.table-col.center{justify-content:center}.table-col.right{justify-content:flex-end}
|
|
33
|
-
/* src:container\wrapper.vue index:0 */
|
|
34
|
-
.snail-wrapper{background-color:#fff;display:flex;flex-direction:column}.snail-wrapper>.snail-scroll{flex:1}.snail-wrapper.in-normal{flex:1;height:100%;overflow:hidden;width:100%}.snail-wrapper.in-popup{height:80%;min-width:800px;overflow:hidden;width:60%}
|
|
35
|
-
/* src:prompt\drag-verify.vue index:0 */
|
|
36
|
-
.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{background-image:-webkit-linear-gradient(left,#666,#666 45%,#fff 50%,#666 55%,#666);-webkit-text-fill-color:transparent;align-items:center;animation:snail-drag-verify 2s linear infinite;-webkit-background-clip:text;background-clip:text;background-size:200% 100%;color:#7e848c;display:flex;font-size:12px;font-weight:400;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.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}}
|
|
37
35
|
/* src:container\tree.vue index:0 */
|
|
38
36
|
.snail-tree{background-color:#fff;display:flex;flex-direction:column}.snail-tree .snail-search{flex-shrink:0;margin:12px}.snail-tree .snail-scroll{flex:1}
|
|
37
|
+
/* src:container\wrapper.vue index:0 */
|
|
38
|
+
.snail-wrapper{background-color:#fff;display:flex;flex-direction:column}.snail-wrapper>.snail-scroll{flex:1}.snail-wrapper.in-normal{flex:1;height:100%;overflow:hidden;width:100%}.snail-wrapper.in-popup{height:80%;min-width:800px;overflow:hidden;width:60%}
|
|
39
39
|
/* src:form\input.vue index:0 */
|
|
40
40
|
.snail-input{display:inline-flex;min-height:34px}.snail-input>.input-title{flex-shrink:0;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{flex:1}.snail-input>.input-body>span{background-color:red;flex-shrink:0}
|
|
41
|
+
/* src:prompt\drag-verify.vue index:0 */
|
|
42
|
+
.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{background-image:-webkit-linear-gradient(left,#666,#666 45%,#fff 50%,#666 55%,#666);-webkit-text-fill-color:transparent;align-items:center;animation:snail-drag-verify 2s linear infinite;-webkit-background-clip:text;background-clip:text;background-size:200% 100%;color:#7e848c;display:flex;font-size:12px;font-weight:400;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.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}}
|
|
41
43
|
/* src:prompt\empty.vue index:0 */
|
|
42
44
|
.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}
|
|
43
45
|
/* src:prompt\loading.vue index:0 */
|
|
@@ -46,12 +48,12 @@
|
|
|
46
48
|
.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;margin:20px 40px;overflow:auto;word-wrap:break-word}
|
|
47
49
|
/* src:popup\components\dialog-container.vue index:0 */
|
|
48
50
|
.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)}
|
|
51
|
+
/* src:popup\components\follow-container.vue index:0 */
|
|
52
|
+
.snail-follow{background-color:#fff;display:inline-block;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}
|
|
49
53
|
/* src:popup\components\toast-container.vue index:0 */
|
|
50
54
|
.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}
|
|
51
55
|
/* src:popup\components\popup-container.vue index:0 */
|
|
52
56
|
.snail-popup{left:0;position:fixed;top:0}
|
|
53
|
-
/* src:popup\components\follow-container.vue index:0 */
|
|
54
|
-
.snail-follow{background-color:#fff;display:inline-block;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}
|
|
55
57
|
/* src:container\components\tree-node.vue index:0 */
|
|
56
58
|
.snail-tree-node{align-items:center;display:flex;flex-wrap:nowrap;height:40px;width:100%}.snail-tree-node:hover{background-color:#f8f9fa}.snail-tree-node>.indent,.snail-tree-node>.node-slot,.snail-tree-node>.snail-icon{flex-shrink:0}.snail-tree-node>.node-fold{align-items:center;display:flex;height:100%;justify-content:center;width:24px}.snail-tree-node>.node-fold>.snail-icon{transition:transform .1s ease-in}.snail-tree-node>.node-fold>.snail-icon.fold{transform:rotate(-90deg)}.snail-tree-node>.node-slot,.snail-tree-node>.node-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.snail-tree-node>.node-text{color:#2e3033;flex:1;min-width:30px}.snail-tree-node.clickable{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-tree-children{width:100%}.snail-tree-children.hidden{display:none;height:0;overflow:hidden}.snail-tree-node.level-1>.indent{padding-left:4px}.snail-tree-node.level-2>.indent{padding-left:24px}.snail-tree-node.level-3>.indent{padding-left:48px}.snail-tree-node.level-4>.indent{padding-left:72px}.snail-tree-node.level-5>.indent{padding-left:96px}.snail-tree-node.level-6>.indent{padding-left:120px}.snail-tree-node.level-7>.indent{padding-left:144px}.snail-tree-node.level-8>.indent{padding-left:168px}.snail-tree-node.level-9>.indent{padding-left:192px}.snail-tree-node.level-10>.indent{padding-left:216px}
|
|
57
59
|
/* src:base\components\select-popup.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": "1.0.
|
|
6
|
+
"version": "1.0.54",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/snail.vue.js",
|
|
9
9
|
"module": "dist/snail.vue.js",
|
|
@@ -14,9 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"vue": "^3.5.14",
|
|
17
|
-
"snail.core": ">=2.0.
|
|
17
|
+
"snail.core": ">=2.0.16",
|
|
18
18
|
"snail.view": ">=1.0.24",
|
|
19
|
-
"sortablejs": ">=1.15.6"
|
|
19
|
+
"sortablejs": ">=1.15.6",
|
|
20
|
+
"zane-calendar": "2.2.8"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"vue-tsc": "^2.2.10",
|