snail.vue 1.0.52 → 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 +152 -2
- package/dist/snail.vue.js +215 -53
- package/dist/snail.vue.umd.js +213 -51
- package/dist/styles/snail.vue.vue.css +12 -10
- 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
|
@@ -832,7 +832,22 @@ type SelectItem<T> = TreeNode<T, TreeNodeExtend & {
|
|
|
832
832
|
* 选项菜单组件 配置选项
|
|
833
833
|
* - value 已选的【选择项】;单选时,为【选择项】路径(父->子);其他情况为已选的【选择项】
|
|
834
834
|
*/
|
|
835
|
-
type SelectOptions<T> = ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<T> & ValueOptions<SelectItem<T>[]> & {
|
|
835
|
+
type SelectOptions<T> = ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<T> & ValueOptions<SelectItem<T>[]> & {
|
|
836
|
+
/** 父类<see cref="SelectBaseOptions"/>已有属性:
|
|
837
|
+
* items 【选择项】集合
|
|
838
|
+
* search 启用 【搜索】功能
|
|
839
|
+
* searchPlaceholder 搜索框提示语
|
|
840
|
+
* multiple 是否【多选模式】
|
|
841
|
+
* showPath 显示选项路径
|
|
842
|
+
* popupStyle 弹出的选项选择窗体样式
|
|
843
|
+
*/
|
|
844
|
+
/**
|
|
845
|
+
* 选项分隔符
|
|
846
|
+
* - 单选有多级时的分割路径;默认为 /
|
|
847
|
+
* - 多选时分割多个选项;默认为 、
|
|
848
|
+
*/
|
|
849
|
+
separator?: string;
|
|
850
|
+
};
|
|
836
851
|
/**
|
|
837
852
|
* 选项菜单 组件 事件
|
|
838
853
|
*/
|
|
@@ -1026,6 +1041,130 @@ type IconOptions = TitleOptions & {
|
|
|
1026
1041
|
*/
|
|
1027
1042
|
type IconType = "success" | "error" | "warn" | "close" | "trash" | "download" | "print" | "edit" | "arrow" | "plus" | "subtract" | "grip" | "custom";
|
|
1028
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
|
+
|
|
1029
1168
|
/**
|
|
1030
1169
|
* 检查选项 数据结构
|
|
1031
1170
|
*/
|
|
@@ -1839,6 +1978,17 @@ declare const components: {
|
|
|
1839
1978
|
onChange?: (values: any) => any;
|
|
1840
1979
|
"onUpdate:modelValue"?: (value: any) => any;
|
|
1841
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>;
|
|
1842
1992
|
Footer: {
|
|
1843
1993
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<FooterOptions> & Readonly<{
|
|
1844
1994
|
onCancel?: () => any;
|
|
@@ -2363,4 +2513,4 @@ declare const components: {
|
|
|
2363
2513
|
};
|
|
2364
2514
|
|
|
2365
2515
|
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
|
2366
|
-
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, isArray, newId, mustFunction, useScope, removeFromArray, mustObject, throwIfFalse, isObject, isNumberNotNaN, mountScope, useScopes, isPromise, wait,
|
|
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
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,7 +20,7 @@ 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
|
});
|
|
@@ -63,10 +63,10 @@ function getSvgDraw(iconType, draw) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
const _hoisted_1$
|
|
66
|
+
const _hoisted_1$g = ["width", "height"];
|
|
67
67
|
const _hoisted_2$a = ["textContent"];
|
|
68
68
|
const _hoisted_3$7 = ["fill", "stroke", "stroke-width", "d"];
|
|
69
|
-
var _sfc_main$
|
|
69
|
+
var _sfc_main$t = defineComponent({
|
|
70
70
|
...{
|
|
71
71
|
name: "Icon",
|
|
72
72
|
inheritAttrs: true
|
|
@@ -103,16 +103,16 @@ var _sfc_main$s = defineComponent({
|
|
|
103
103
|
"stroke-width": _ctx.strokeWidth,
|
|
104
104
|
d: draw
|
|
105
105
|
}, null, 8, _hoisted_3$7);
|
|
106
|
-
}), 256))], 46, _hoisted_1$
|
|
106
|
+
}), 256))], 46, _hoisted_1$g);
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
const _hoisted_1$
|
|
111
|
+
const _hoisted_1$f = ["onClick"];
|
|
112
112
|
const _hoisted_2$9 = ["type", "checked"];
|
|
113
113
|
const _hoisted_3$6 = ["textContent"];
|
|
114
114
|
const _hoisted_4$4 = ["textContent"];
|
|
115
|
-
var _sfc_main$
|
|
115
|
+
var _sfc_main$s = defineComponent({
|
|
116
116
|
...{
|
|
117
117
|
name: "Choose",
|
|
118
118
|
inheritAttrs: true
|
|
@@ -143,65 +143,224 @@ var _sfc_main$r = defineComponent({
|
|
|
143
143
|
const {
|
|
144
144
|
mode = "native"
|
|
145
145
|
} = props;
|
|
146
|
+
const {
|
|
147
|
+
getKey
|
|
148
|
+
} = useKey();
|
|
146
149
|
const valuesModel = useModel(__props, "modelValue");
|
|
147
150
|
props.multi && isArray(valuesModel.value) == false && (valuesModel.value = []);
|
|
148
151
|
const chooseItemsRef = computed(() => props.items.map(item => {
|
|
149
152
|
return {
|
|
150
|
-
|
|
151
|
-
checked: props.multi == true ? valuesModel.value.includes(item.value) : valuesModel.value == item.value
|
|
152
|
-
key: newId()
|
|
153
|
+
item,
|
|
154
|
+
checked: props.multi == true ? valuesModel.value.includes(item.value) : valuesModel.value == item.value
|
|
153
155
|
};
|
|
154
156
|
}));
|
|
155
|
-
function onItemClick(
|
|
157
|
+
function onItemClick(node, index) {
|
|
156
158
|
if (props.readonly == true) {
|
|
157
159
|
return;
|
|
158
160
|
}
|
|
159
161
|
if (props.multi == true) {
|
|
160
|
-
|
|
161
|
-
valuesModel.value = chooseItemsRef.value.filter(
|
|
162
|
+
node.checked = !node.checked;
|
|
163
|
+
valuesModel.value = chooseItemsRef.value.filter(item => item.checked).map(item => item.item.value);
|
|
162
164
|
} else {
|
|
163
|
-
const newChecked = props.type == "checkbox" && props.items.length == 1 ? !
|
|
164
|
-
chooseItemsRef.value.forEach(
|
|
165
|
-
|
|
166
|
-
valuesModel.value = newChecked ? item.value : void 0;
|
|
165
|
+
const newChecked = props.type == "checkbox" && props.items.length == 1 ? !node.checked : true;
|
|
166
|
+
chooseItemsRef.value.forEach(item => item.checked = false);
|
|
167
|
+
node.checked = newChecked;
|
|
168
|
+
valuesModel.value = newChecked ? node.item.value : void 0;
|
|
167
169
|
}
|
|
168
170
|
nextTick(() => emits("change", valuesModel.value));
|
|
169
171
|
}
|
|
170
172
|
return (_ctx, _cache) => {
|
|
171
173
|
return openBlock(), createElementBlock("div", {
|
|
172
174
|
class: normalizeClass(["snail-choose", _ctx.readonly ? "readonly" : ""])
|
|
173
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(chooseItemsRef.value, (
|
|
175
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(chooseItemsRef.value, (node, index) => {
|
|
174
176
|
return openBlock(), createElementBlock("div", {
|
|
175
|
-
key: item
|
|
176
|
-
class: normalizeClass(["choose-item",
|
|
177
|
+
key: unref(getKey)(node.item),
|
|
178
|
+
class: normalizeClass(["choose-item", node.checked ? "checked" : ""]),
|
|
177
179
|
style: normalizeStyle(unref(css).buildStyle(_ctx.itemStyle)),
|
|
178
|
-
onClick: $event => onItemClick(
|
|
180
|
+
onClick: $event => onItemClick(node)
|
|
179
181
|
}, [unref(mode) == "native" ? (openBlock(), createElementBlock("input", {
|
|
180
182
|
key: 0,
|
|
181
183
|
type: _ctx.type,
|
|
182
|
-
checked:
|
|
184
|
+
checked: node.checked
|
|
183
185
|
}, null, 8, _hoisted_2$9)) : unref(mode) == "beautiful" ? (openBlock(), createElementBlock("div", {
|
|
184
186
|
key: 1,
|
|
185
|
-
class: normalizeClass(["item-beautiful", [_ctx.type,
|
|
186
|
-
}, [
|
|
187
|
+
class: normalizeClass(["item-beautiful", [_ctx.type, node.checked ? "item-checked" : "item-unchecked"]])
|
|
188
|
+
}, [node.checked ? (openBlock(), createBlock(_sfc_main$t, {
|
|
187
189
|
key: 0,
|
|
188
190
|
type: "success",
|
|
189
191
|
size: 12,
|
|
190
192
|
color: _ctx.readonly ? "#8a9099" : "white"
|
|
191
|
-
}, null, 8, ["color"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), item.text ? (openBlock(), createElementBlock("span", {
|
|
193
|
+
}, null, 8, ["color"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), node.item.text ? (openBlock(), createElementBlock("span", {
|
|
192
194
|
key: 2,
|
|
193
195
|
class: "item-text",
|
|
194
|
-
textContent: toDisplayString(item.text)
|
|
195
|
-
}, null, 8, _hoisted_3$6)) : createCommentVNode("", true), item.description ? (openBlock(), createElementBlock("span", {
|
|
196
|
+
textContent: toDisplayString(node.item.text)
|
|
197
|
+
}, null, 8, _hoisted_3$6)) : createCommentVNode("", true), node.item.description ? (openBlock(), createElementBlock("span", {
|
|
196
198
|
key: 3,
|
|
197
199
|
class: "item-des",
|
|
198
|
-
textContent: toDisplayString(item.description)
|
|
199
|
-
}, null, 8, _hoisted_4$4)) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
200
|
+
textContent: toDisplayString(node.item.description)
|
|
201
|
+
}, null, 8, _hoisted_4$4)) : createCommentVNode("", true)], 14, _hoisted_1$f);
|
|
200
202
|
}), 128))], 2);
|
|
201
203
|
};
|
|
202
204
|
}
|
|
203
205
|
});
|
|
204
206
|
|
|
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
|
+
});
|
|
363
|
+
|
|
205
364
|
var _sfc_main$q = defineComponent({
|
|
206
365
|
...{
|
|
207
366
|
name: "Footer",
|
|
@@ -233,13 +392,13 @@ var _sfc_main$q = defineComponent({
|
|
|
233
392
|
class: normalizeClass(["snail-footer", {
|
|
234
393
|
"start-divider": _ctx.divider
|
|
235
394
|
}, _ctx.align || "right"])
|
|
236
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$
|
|
395
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_ctx.cancelDisabled != true ? (openBlock(), createBlock(_sfc_main$u, {
|
|
237
396
|
key: 0,
|
|
238
397
|
size: "max",
|
|
239
398
|
type: "default",
|
|
240
399
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
241
400
|
textContent: toDisplayString(_ctx.cancelName || "取消")
|
|
242
|
-
}, 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, {
|
|
243
402
|
key: 1,
|
|
244
403
|
size: "max",
|
|
245
404
|
type: "primary",
|
|
@@ -290,7 +449,7 @@ var _sfc_main$p = defineComponent({
|
|
|
290
449
|
key: 0,
|
|
291
450
|
textContent: toDisplayString(_ctx.title),
|
|
292
451
|
class: normalizeClass(["header-title", _ctx.titleAlign])
|
|
293
|
-
}, 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, {
|
|
294
453
|
key: 1,
|
|
295
454
|
type: "close",
|
|
296
455
|
size: 22,
|
|
@@ -351,7 +510,7 @@ var _sfc_main$o = defineComponent({
|
|
|
351
510
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
352
511
|
}, null, 40, _hoisted_1$c), [[vModelText, textModel.value, void 0, {
|
|
353
512
|
trim: true
|
|
354
|
-
}]]), createElementVNode("div", null, [createVNode(_sfc_main$
|
|
513
|
+
}]]), createElementVNode("div", null, [createVNode(_sfc_main$t, {
|
|
355
514
|
class: "search-button",
|
|
356
515
|
type: "custom",
|
|
357
516
|
draw: searchIon,
|
|
@@ -1048,7 +1207,7 @@ var _sfc_main$h = defineComponent({
|
|
|
1048
1207
|
}),
|
|
1049
1208
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1050
1209
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1051
|
-
}, [createVNode(_sfc_main$
|
|
1210
|
+
}, [createVNode(_sfc_main$t, {
|
|
1052
1211
|
type: "close",
|
|
1053
1212
|
class: "close-icon",
|
|
1054
1213
|
fill: closeFillRef.value,
|
|
@@ -1058,7 +1217,7 @@ var _sfc_main$h = defineComponent({
|
|
|
1058
1217
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1059
1218
|
unref(closePopup)();
|
|
1060
1219
|
})
|
|
1061
|
-
}, 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, {
|
|
1062
1221
|
type: unref(props).type,
|
|
1063
1222
|
fill: "#707070",
|
|
1064
1223
|
size: 20
|
|
@@ -1276,7 +1435,7 @@ function searchPath(nodes, target) {
|
|
|
1276
1435
|
return [];
|
|
1277
1436
|
}
|
|
1278
1437
|
|
|
1279
|
-
function useSelectContext(items, selectsRef) {
|
|
1438
|
+
function useSelectContext(items, selectsRef, separator) {
|
|
1280
1439
|
function selected(multiple, item) {
|
|
1281
1440
|
if (selectsRef.value) {
|
|
1282
1441
|
return multiple == true ? selectsRef.value.includes(item) : selectsRef.value[selectsRef.value.length - 1] == item;
|
|
@@ -1284,8 +1443,9 @@ function useSelectContext(items, selectsRef) {
|
|
|
1284
1443
|
return false;
|
|
1285
1444
|
}
|
|
1286
1445
|
function selectedText(multiple, showPath) {
|
|
1446
|
+
const tmpSeparator = separator || (multiple ? "、" : " / ");
|
|
1287
1447
|
if (selectsRef.value && selectsRef.value.length) {
|
|
1288
|
-
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(
|
|
1448
|
+
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(tmpSeparator) : selectsRef.value[selectsRef.value.length - 1].text;
|
|
1289
1449
|
}
|
|
1290
1450
|
return "";
|
|
1291
1451
|
}
|
|
@@ -1389,11 +1549,11 @@ var _sfc_main$f = defineComponent({
|
|
|
1389
1549
|
}, [createElementVNode("div", {
|
|
1390
1550
|
class: "item-text",
|
|
1391
1551
|
textContent: toDisplayString(_ctx.item.text)
|
|
1392
|
-
}, 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, {
|
|
1393
1553
|
key: 0,
|
|
1394
1554
|
type: "arrow",
|
|
1395
1555
|
color: "#8a9099"
|
|
1396
|
-
})) : _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, {
|
|
1397
1557
|
type: "success",
|
|
1398
1558
|
color: "white",
|
|
1399
1559
|
size: 12
|
|
@@ -1650,7 +1810,8 @@ var _sfc_main$d = defineComponent({
|
|
|
1650
1810
|
type: Boolean
|
|
1651
1811
|
},
|
|
1652
1812
|
popupStyle: {},
|
|
1653
|
-
value: {}
|
|
1813
|
+
value: {},
|
|
1814
|
+
separator: {}
|
|
1654
1815
|
},
|
|
1655
1816
|
emits: ["change"],
|
|
1656
1817
|
setup(__props, _ref) {
|
|
@@ -1667,7 +1828,7 @@ var _sfc_main$d = defineComponent({
|
|
|
1667
1828
|
} = useTimer();
|
|
1668
1829
|
const rootDom = useTemplateRef("select");
|
|
1669
1830
|
const selectedItemsRef = shallowRef(Array.isArray(props.value) ? [...props.value] : []);
|
|
1670
|
-
const context = useSelectContext(props.items, selectedItemsRef);
|
|
1831
|
+
const context = useSelectContext(props.items, selectedItemsRef, props.separator);
|
|
1671
1832
|
const selectedTextRef = computed(() => context.selectedText(props.multiple, props.showPath));
|
|
1672
1833
|
const slotOptions = Object.freeze({
|
|
1673
1834
|
clear
|
|
@@ -1765,7 +1926,7 @@ var _sfc_main$d = defineComponent({
|
|
|
1765
1926
|
key: 1,
|
|
1766
1927
|
class: "select-result text-tips",
|
|
1767
1928
|
textContent: toDisplayString(_ctx.readonly ? "" : _ctx.placeholder || "请选择")
|
|
1768
|
-
}, null, 8, _hoisted_3$3)), createVNode(_sfc_main$
|
|
1929
|
+
}, null, 8, _hoisted_3$3)), createVNode(_sfc_main$t, {
|
|
1769
1930
|
type: "arrow",
|
|
1770
1931
|
size: 24,
|
|
1771
1932
|
color: "#8a9099",
|
|
@@ -1916,7 +2077,7 @@ var _sfc_main$b = defineComponent({
|
|
|
1916
2077
|
key: 0,
|
|
1917
2078
|
class: "subtitle",
|
|
1918
2079
|
textContent: toDisplayString(_ctx.subtitle)
|
|
1919
|
-
}, 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, {
|
|
1920
2081
|
type: "arrow",
|
|
1921
2082
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
1922
2083
|
onClick: onStatusClick
|
|
@@ -2394,7 +2555,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
2394
2555
|
key: 1
|
|
2395
2556
|
}, [_cache[4] || (_cache[4] = createElementVNode("div", {
|
|
2396
2557
|
class: "indent"
|
|
2397
|
-
}, 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, {
|
|
2398
2559
|
key: 0,
|
|
2399
2560
|
class: normalizeClass(statusRef.value),
|
|
2400
2561
|
type: "custom",
|
|
@@ -2627,7 +2788,7 @@ var _sfc_main$1 = defineComponent({
|
|
|
2627
2788
|
key: 0,
|
|
2628
2789
|
class: "validate",
|
|
2629
2790
|
title: validateRef.value
|
|
2630
|
-
}, [createVNode(_sfc_main$
|
|
2791
|
+
}, [createVNode(_sfc_main$t, {
|
|
2631
2792
|
type: "error",
|
|
2632
2793
|
size: 16,
|
|
2633
2794
|
color: "red"
|
|
@@ -2721,12 +2882,12 @@ var _sfc_main = defineComponent({
|
|
|
2721
2882
|
onTouchstart: onStartDrag,
|
|
2722
2883
|
onTouchmove: onDragMove,
|
|
2723
2884
|
onTouchend: onDragEnd
|
|
2724
|
-
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$
|
|
2885
|
+
}, [dragInfoRef.value.status == "success" ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2725
2886
|
key: 0,
|
|
2726
2887
|
type: "success",
|
|
2727
2888
|
size: 20,
|
|
2728
2889
|
color: "white"
|
|
2729
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
2890
|
+
})) : (openBlock(), createBlock(_sfc_main$t, {
|
|
2730
2891
|
key: 1,
|
|
2731
2892
|
type: "custom",
|
|
2732
2893
|
size: 20,
|
|
@@ -2738,11 +2899,12 @@ var _sfc_main = defineComponent({
|
|
|
2738
2899
|
});
|
|
2739
2900
|
|
|
2740
2901
|
const components = {
|
|
2741
|
-
Button: _sfc_main$
|
|
2742
|
-
Choose: _sfc_main$
|
|
2902
|
+
Button: _sfc_main$u,
|
|
2903
|
+
Choose: _sfc_main$s,
|
|
2904
|
+
DatePicker: _sfc_main$r,
|
|
2743
2905
|
Footer: _sfc_main$q,
|
|
2744
2906
|
Header: _sfc_main$p,
|
|
2745
|
-
Icon: _sfc_main$
|
|
2907
|
+
Icon: _sfc_main$t,
|
|
2746
2908
|
Search: _sfc_main$o,
|
|
2747
2909
|
Select: _sfc_main$d,
|
|
2748
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,7 +22,7 @@
|
|
|
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
|
});
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
const _hoisted_1$
|
|
68
|
+
const _hoisted_1$g = ["width", "height"];
|
|
69
69
|
const _hoisted_2$a = ["textContent"];
|
|
70
70
|
const _hoisted_3$7 = ["fill", "stroke", "stroke-width", "d"];
|
|
71
|
-
var _sfc_main$
|
|
71
|
+
var _sfc_main$t = vue.defineComponent({
|
|
72
72
|
...{
|
|
73
73
|
name: "Icon",
|
|
74
74
|
inheritAttrs: true
|
|
@@ -105,16 +105,16 @@
|
|
|
105
105
|
"stroke-width": _ctx.strokeWidth,
|
|
106
106
|
d: draw
|
|
107
107
|
}, null, 8, _hoisted_3$7);
|
|
108
|
-
}), 256))], 46, _hoisted_1$
|
|
108
|
+
}), 256))], 46, _hoisted_1$g);
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
const _hoisted_1$
|
|
113
|
+
const _hoisted_1$f = ["onClick"];
|
|
114
114
|
const _hoisted_2$9 = ["type", "checked"];
|
|
115
115
|
const _hoisted_3$6 = ["textContent"];
|
|
116
116
|
const _hoisted_4$4 = ["textContent"];
|
|
117
|
-
var _sfc_main$
|
|
117
|
+
var _sfc_main$s = vue.defineComponent({
|
|
118
118
|
...{
|
|
119
119
|
name: "Choose",
|
|
120
120
|
inheritAttrs: true
|
|
@@ -145,65 +145,224 @@
|
|
|
145
145
|
const {
|
|
146
146
|
mode = "native"
|
|
147
147
|
} = props;
|
|
148
|
+
const {
|
|
149
|
+
getKey
|
|
150
|
+
} = snail_core.useKey();
|
|
148
151
|
const valuesModel = vue.useModel(__props, "modelValue");
|
|
149
152
|
props.multi && snail_core.isArray(valuesModel.value) == false && (valuesModel.value = []);
|
|
150
153
|
const chooseItemsRef = vue.computed(() => props.items.map(item => {
|
|
151
154
|
return {
|
|
152
|
-
|
|
153
|
-
checked: props.multi == true ? valuesModel.value.includes(item.value) : valuesModel.value == item.value
|
|
154
|
-
key: snail_core.newId()
|
|
155
|
+
item,
|
|
156
|
+
checked: props.multi == true ? valuesModel.value.includes(item.value) : valuesModel.value == item.value
|
|
155
157
|
};
|
|
156
158
|
}));
|
|
157
|
-
function onItemClick(
|
|
159
|
+
function onItemClick(node, index) {
|
|
158
160
|
if (props.readonly == true) {
|
|
159
161
|
return;
|
|
160
162
|
}
|
|
161
163
|
if (props.multi == true) {
|
|
162
|
-
|
|
163
|
-
valuesModel.value = chooseItemsRef.value.filter(
|
|
164
|
+
node.checked = !node.checked;
|
|
165
|
+
valuesModel.value = chooseItemsRef.value.filter(item => item.checked).map(item => item.item.value);
|
|
164
166
|
} else {
|
|
165
|
-
const newChecked = props.type == "checkbox" && props.items.length == 1 ? !
|
|
166
|
-
chooseItemsRef.value.forEach(
|
|
167
|
-
|
|
168
|
-
valuesModel.value = newChecked ? item.value : void 0;
|
|
167
|
+
const newChecked = props.type == "checkbox" && props.items.length == 1 ? !node.checked : true;
|
|
168
|
+
chooseItemsRef.value.forEach(item => item.checked = false);
|
|
169
|
+
node.checked = newChecked;
|
|
170
|
+
valuesModel.value = newChecked ? node.item.value : void 0;
|
|
169
171
|
}
|
|
170
172
|
vue.nextTick(() => emits("change", valuesModel.value));
|
|
171
173
|
}
|
|
172
174
|
return (_ctx, _cache) => {
|
|
173
175
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
174
176
|
class: vue.normalizeClass(["snail-choose", _ctx.readonly ? "readonly" : ""])
|
|
175
|
-
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(chooseItemsRef.value, (
|
|
177
|
+
}, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(chooseItemsRef.value, (node, index) => {
|
|
176
178
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
177
|
-
key: item
|
|
178
|
-
class: vue.normalizeClass(["choose-item",
|
|
179
|
+
key: vue.unref(getKey)(node.item),
|
|
180
|
+
class: vue.normalizeClass(["choose-item", node.checked ? "checked" : ""]),
|
|
179
181
|
style: vue.normalizeStyle(vue.unref(snail_view.css).buildStyle(_ctx.itemStyle)),
|
|
180
|
-
onClick: $event => onItemClick(
|
|
182
|
+
onClick: $event => onItemClick(node)
|
|
181
183
|
}, [vue.unref(mode) == "native" ? (vue.openBlock(), vue.createElementBlock("input", {
|
|
182
184
|
key: 0,
|
|
183
185
|
type: _ctx.type,
|
|
184
|
-
checked:
|
|
186
|
+
checked: node.checked
|
|
185
187
|
}, null, 8, _hoisted_2$9)) : vue.unref(mode) == "beautiful" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
186
188
|
key: 1,
|
|
187
|
-
class: vue.normalizeClass(["item-beautiful", [_ctx.type,
|
|
188
|
-
}, [
|
|
189
|
+
class: vue.normalizeClass(["item-beautiful", [_ctx.type, node.checked ? "item-checked" : "item-unchecked"]])
|
|
190
|
+
}, [node.checked ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
189
191
|
key: 0,
|
|
190
192
|
type: "success",
|
|
191
193
|
size: 12,
|
|
192
194
|
color: _ctx.readonly ? "#8a9099" : "white"
|
|
193
|
-
}, null, 8, ["color"])) : vue.createCommentVNode("", true)], 2)) : vue.createCommentVNode("", true), item.text ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
195
|
+
}, null, 8, ["color"])) : vue.createCommentVNode("", true)], 2)) : vue.createCommentVNode("", true), node.item.text ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
194
196
|
key: 2,
|
|
195
197
|
class: "item-text",
|
|
196
|
-
textContent: vue.toDisplayString(item.text)
|
|
197
|
-
}, null, 8, _hoisted_3$6)) : vue.createCommentVNode("", true), item.description ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
198
|
+
textContent: vue.toDisplayString(node.item.text)
|
|
199
|
+
}, null, 8, _hoisted_3$6)) : vue.createCommentVNode("", true), node.item.description ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
198
200
|
key: 3,
|
|
199
201
|
class: "item-des",
|
|
200
|
-
textContent: vue.toDisplayString(item.description)
|
|
201
|
-
}, null, 8, _hoisted_4$4)) : vue.createCommentVNode("", true)], 14, _hoisted_1$
|
|
202
|
+
textContent: vue.toDisplayString(node.item.description)
|
|
203
|
+
}, null, 8, _hoisted_4$4)) : vue.createCommentVNode("", true)], 14, _hoisted_1$f);
|
|
202
204
|
}), 128))], 2);
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
207
|
});
|
|
206
208
|
|
|
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
|
+
});
|
|
365
|
+
|
|
207
366
|
var _sfc_main$q = vue.defineComponent({
|
|
208
367
|
...{
|
|
209
368
|
name: "Footer",
|
|
@@ -235,13 +394,13 @@
|
|
|
235
394
|
class: vue.normalizeClass(["snail-footer", {
|
|
236
395
|
"start-divider": _ctx.divider
|
|
237
396
|
}, _ctx.align || "right"])
|
|
238
|
-
}, [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, {
|
|
239
398
|
key: 0,
|
|
240
399
|
size: "max",
|
|
241
400
|
type: "default",
|
|
242
401
|
onClick: _cache[0] || (_cache[0] = $event => emits("cancel")),
|
|
243
402
|
textContent: vue.toDisplayString(_ctx.cancelName || "取消")
|
|
244
|
-
}, 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, {
|
|
245
404
|
key: 1,
|
|
246
405
|
size: "max",
|
|
247
406
|
type: "primary",
|
|
@@ -292,7 +451,7 @@
|
|
|
292
451
|
key: 0,
|
|
293
452
|
textContent: vue.toDisplayString(_ctx.title),
|
|
294
453
|
class: vue.normalizeClass(["header-title", _ctx.titleAlign])
|
|
295
|
-
}, 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, {
|
|
296
455
|
key: 1,
|
|
297
456
|
type: "close",
|
|
298
457
|
size: 22,
|
|
@@ -353,7 +512,7 @@
|
|
|
353
512
|
onKeyup: _cache[1] || (_cache[1] = $event => onSearch($event))
|
|
354
513
|
}, null, 40, _hoisted_1$c), [[vue.vModelText, textModel.value, void 0, {
|
|
355
514
|
trim: true
|
|
356
|
-
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$
|
|
515
|
+
}]]), vue.createElementVNode("div", null, [vue.createVNode(_sfc_main$t, {
|
|
357
516
|
class: "search-button",
|
|
358
517
|
type: "custom",
|
|
359
518
|
draw: searchIon,
|
|
@@ -1050,7 +1209,7 @@
|
|
|
1050
1209
|
}),
|
|
1051
1210
|
onMouseenter: _cache[3] || (_cache[3] = $event => onMouseEvent(false)),
|
|
1052
1211
|
onMouseleave: _cache[4] || (_cache[4] = $event => onMouseEvent(true))
|
|
1053
|
-
}, [vue.createVNode(_sfc_main$
|
|
1212
|
+
}, [vue.createVNode(_sfc_main$t, {
|
|
1054
1213
|
type: "close",
|
|
1055
1214
|
class: "close-icon",
|
|
1056
1215
|
fill: closeFillRef.value,
|
|
@@ -1060,7 +1219,7 @@
|
|
|
1060
1219
|
onClick: _cache[2] || (_cache[2] = $event => {
|
|
1061
1220
|
vue.unref(closePopup)();
|
|
1062
1221
|
})
|
|
1063
|
-
}, 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, {
|
|
1064
1223
|
type: vue.unref(props).type,
|
|
1065
1224
|
fill: "#707070",
|
|
1066
1225
|
size: 20
|
|
@@ -1278,7 +1437,7 @@
|
|
|
1278
1437
|
return [];
|
|
1279
1438
|
}
|
|
1280
1439
|
|
|
1281
|
-
function useSelectContext(items, selectsRef) {
|
|
1440
|
+
function useSelectContext(items, selectsRef, separator) {
|
|
1282
1441
|
function selected(multiple, item) {
|
|
1283
1442
|
if (selectsRef.value) {
|
|
1284
1443
|
return multiple == true ? selectsRef.value.includes(item) : selectsRef.value[selectsRef.value.length - 1] == item;
|
|
@@ -1286,8 +1445,9 @@
|
|
|
1286
1445
|
return false;
|
|
1287
1446
|
}
|
|
1288
1447
|
function selectedText(multiple, showPath) {
|
|
1448
|
+
const tmpSeparator = separator || (multiple ? "、" : " / ");
|
|
1289
1449
|
if (selectsRef.value && selectsRef.value.length) {
|
|
1290
|
-
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(
|
|
1450
|
+
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(tmpSeparator) : selectsRef.value[selectsRef.value.length - 1].text;
|
|
1291
1451
|
}
|
|
1292
1452
|
return "";
|
|
1293
1453
|
}
|
|
@@ -1391,11 +1551,11 @@
|
|
|
1391
1551
|
}, [vue.createElementVNode("div", {
|
|
1392
1552
|
class: "item-text",
|
|
1393
1553
|
textContent: vue.toDisplayString(_ctx.item.text)
|
|
1394
|
-
}, 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, {
|
|
1395
1555
|
key: 0,
|
|
1396
1556
|
type: "arrow",
|
|
1397
1557
|
color: "#8a9099"
|
|
1398
|
-
})) : _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, {
|
|
1399
1559
|
type: "success",
|
|
1400
1560
|
color: "white",
|
|
1401
1561
|
size: 12
|
|
@@ -1652,7 +1812,8 @@
|
|
|
1652
1812
|
type: Boolean
|
|
1653
1813
|
},
|
|
1654
1814
|
popupStyle: {},
|
|
1655
|
-
value: {}
|
|
1815
|
+
value: {},
|
|
1816
|
+
separator: {}
|
|
1656
1817
|
},
|
|
1657
1818
|
emits: ["change"],
|
|
1658
1819
|
setup(__props, _ref) {
|
|
@@ -1669,7 +1830,7 @@
|
|
|
1669
1830
|
} = snail_core.useTimer();
|
|
1670
1831
|
const rootDom = vue.useTemplateRef("select");
|
|
1671
1832
|
const selectedItemsRef = vue.shallowRef(Array.isArray(props.value) ? [...props.value] : []);
|
|
1672
|
-
const context = useSelectContext(props.items, selectedItemsRef);
|
|
1833
|
+
const context = useSelectContext(props.items, selectedItemsRef, props.separator);
|
|
1673
1834
|
const selectedTextRef = vue.computed(() => context.selectedText(props.multiple, props.showPath));
|
|
1674
1835
|
const slotOptions = Object.freeze({
|
|
1675
1836
|
clear
|
|
@@ -1767,7 +1928,7 @@
|
|
|
1767
1928
|
key: 1,
|
|
1768
1929
|
class: "select-result text-tips",
|
|
1769
1930
|
textContent: vue.toDisplayString(_ctx.readonly ? "" : _ctx.placeholder || "请选择")
|
|
1770
|
-
}, null, 8, _hoisted_3$3)), vue.createVNode(_sfc_main$
|
|
1931
|
+
}, null, 8, _hoisted_3$3)), vue.createVNode(_sfc_main$t, {
|
|
1771
1932
|
type: "arrow",
|
|
1772
1933
|
size: 24,
|
|
1773
1934
|
color: "#8a9099",
|
|
@@ -1918,7 +2079,7 @@
|
|
|
1918
2079
|
key: 0,
|
|
1919
2080
|
class: "subtitle",
|
|
1920
2081
|
textContent: vue.toDisplayString(_ctx.subtitle)
|
|
1921
|
-
}, 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, {
|
|
1922
2083
|
type: "arrow",
|
|
1923
2084
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
1924
2085
|
onClick: onStatusClick
|
|
@@ -2396,7 +2557,7 @@
|
|
|
2396
2557
|
key: 1
|
|
2397
2558
|
}, [_cache[4] || (_cache[4] = vue.createElementVNode("div", {
|
|
2398
2559
|
class: "indent"
|
|
2399
|
-
}, 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, {
|
|
2400
2561
|
key: 0,
|
|
2401
2562
|
class: vue.normalizeClass(statusRef.value),
|
|
2402
2563
|
type: "custom",
|
|
@@ -2629,7 +2790,7 @@
|
|
|
2629
2790
|
key: 0,
|
|
2630
2791
|
class: "validate",
|
|
2631
2792
|
title: validateRef.value
|
|
2632
|
-
}, [vue.createVNode(_sfc_main$
|
|
2793
|
+
}, [vue.createVNode(_sfc_main$t, {
|
|
2633
2794
|
type: "error",
|
|
2634
2795
|
size: 16,
|
|
2635
2796
|
color: "red"
|
|
@@ -2723,12 +2884,12 @@
|
|
|
2723
2884
|
onTouchstart: onStartDrag,
|
|
2724
2885
|
onTouchmove: onDragMove,
|
|
2725
2886
|
onTouchend: onDragEnd
|
|
2726
|
-
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2887
|
+
}, [dragInfoRef.value.status == "success" ? (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2727
2888
|
key: 0,
|
|
2728
2889
|
type: "success",
|
|
2729
2890
|
size: 20,
|
|
2730
2891
|
color: "white"
|
|
2731
|
-
})) : (vue.openBlock(), vue.createBlock(_sfc_main$
|
|
2892
|
+
})) : (vue.openBlock(), vue.createBlock(_sfc_main$t, {
|
|
2732
2893
|
key: 1,
|
|
2733
2894
|
type: "custom",
|
|
2734
2895
|
size: 20,
|
|
@@ -2740,11 +2901,12 @@
|
|
|
2740
2901
|
});
|
|
2741
2902
|
|
|
2742
2903
|
const components = {
|
|
2743
|
-
Button: _sfc_main$
|
|
2744
|
-
Choose: _sfc_main$
|
|
2904
|
+
Button: _sfc_main$u,
|
|
2905
|
+
Choose: _sfc_main$s,
|
|
2906
|
+
DatePicker: _sfc_main$r,
|
|
2745
2907
|
Footer: _sfc_main$q,
|
|
2746
2908
|
Header: _sfc_main$p,
|
|
2747
|
-
Icon: _sfc_main$
|
|
2909
|
+
Icon: _sfc_main$t,
|
|
2748
2910
|
Search: _sfc_main$o,
|
|
2749
2911
|
Select: _sfc_main$d,
|
|
2750
2912
|
Switch: _sfc_main$c,
|
|
@@ -2,10 +2,12 @@
|
|
|
2
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
3
|
/* src:base\choose.vue index:0 */
|
|
4
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\
|
|
6
|
-
.snail-
|
|
5
|
+
/* src:base\datepicker.vue index:0 */
|
|
6
|
+
.snail-datepicker{height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;width:100%}
|
|
7
7
|
/* src:base\footer.vue index:0 */
|
|
8
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}
|
|
9
|
+
/* src:base\header.vue index:0 */
|
|
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}
|
|
9
11
|
/* src:base\icon.vue index:0 */
|
|
10
12
|
.snail-icon{cursor:pointer;opacity:1}
|
|
11
13
|
/* src:base\search.vue index:0 */
|
|
@@ -14,22 +16,22 @@
|
|
|
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
|
-
/* src:container\table.vue index:0 */
|
|
24
|
-
.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{background-color:#fff;position:sticky!important;top:0;z-index:1}.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}
|
|
25
25
|
/* src:container\scroll.vue index:0 */
|
|
26
26
|
.snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
|
|
27
|
-
/* src:container\components\table-col.vue index:0 */
|
|
28
|
-
.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}
|
|
29
27
|
/* src:container\sort.vue index:0 */
|
|
30
28
|
.snail-sort-drag{background:#fff;border:1px solid #4c9aff;border-radius:4px;cursor:move}.snail-sort-ghost{border:1px dashed #4c9aff;border-radius:4px}
|
|
29
|
+
/* src:container\table.vue index:0 */
|
|
30
|
+
.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{background-color:#fff;position:sticky!important;top:0;z-index:1}.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}
|
|
31
31
|
/* src:container\components\table-row.vue index:0 */
|
|
32
32
|
.table-row{align-items:center;display:flex}
|
|
33
|
+
/* src:container\components\table-col.vue index:0 */
|
|
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
35
|
/* src:container\tree.vue index:0 */
|
|
34
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}
|
|
35
37
|
/* src:container\wrapper.vue index:0 */
|
|
@@ -48,10 +50,10 @@
|
|
|
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)}
|
|
49
51
|
/* src:popup\components\follow-container.vue index:0 */
|
|
50
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}
|
|
51
|
-
/* src:popup\components\popup-container.vue index:0 */
|
|
52
|
-
.snail-popup{left:0;position:fixed;top:0}
|
|
53
53
|
/* src:popup\components\toast-container.vue index:0 */
|
|
54
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}
|
|
55
|
+
/* src:popup\components\popup-container.vue index:0 */
|
|
56
|
+
.snail-popup{left:0;position:fixed;top:0}
|
|
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",
|