snail.vue 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/snail.vue.d.ts +34 -23
- package/dist/snail.vue.js +59 -64
- package/dist/snail.vue.umd.js +58 -62
- package/dist/styles/snail.vue.vue.css +20 -20
- package/package.json +1 -1
package/dist/snail.vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as vue from 'vue';
|
|
2
|
-
import { ShallowRef, Component, Ref, WatchSource, App } from 'vue';
|
|
3
1
|
import * as snail_view from 'snail.view';
|
|
4
2
|
import { BaseStyle, HeightStyle, FlexBoxStyle, WidthStyle, BorderStyle, PaddingStyle, MarginStyle } from 'snail.view';
|
|
3
|
+
import * as vue from 'vue';
|
|
4
|
+
import { Component, ShallowRef, Ref, WatchSource, App } from 'vue';
|
|
5
5
|
import { IScope, RunResult, IAsyncScope } from 'snail.core';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -194,7 +194,6 @@ type SearchEvents = {
|
|
|
194
194
|
* 2、配合树形组件使用;如select的多级筛选,树组件等
|
|
195
195
|
* 3、封装树的基础共性操作,如显隐判断、搜索查询等
|
|
196
196
|
*/
|
|
197
|
-
|
|
198
197
|
/**
|
|
199
198
|
* 树节点
|
|
200
199
|
* - 仅提供树节点基础属性;可以基于 Extend 为 TreeNode 扩展节点属性
|
|
@@ -247,41 +246,41 @@ type TreeNodeExtend = {
|
|
|
247
246
|
fixed?: boolean;
|
|
248
247
|
};
|
|
249
248
|
/**
|
|
250
|
-
*
|
|
249
|
+
* 树的基础上下文对象
|
|
251
250
|
*/
|
|
252
|
-
interface
|
|
251
|
+
interface ITreeBaseContext<T> {
|
|
253
252
|
/**
|
|
254
253
|
* 执行搜索
|
|
255
254
|
* @param text 搜索文本
|
|
256
255
|
*/
|
|
257
256
|
doSearch(text: string): void;
|
|
258
257
|
/**
|
|
259
|
-
*
|
|
258
|
+
* 能否显示指定【树节点】
|
|
260
259
|
* @param node 要判断的节点
|
|
261
260
|
* @returns 能显示返回true;否则返回false
|
|
262
261
|
*/
|
|
263
262
|
canShow(node: TreeNode<T, TreeNodeExtend>): boolean;
|
|
264
263
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
* @
|
|
264
|
+
* 能否显示指定【树节点】的子节点
|
|
265
|
+
* - 不会判断node节点自身是否可显示
|
|
266
|
+
* @param node 要判断的节点
|
|
267
|
+
* @returns 能显示返回true;否则返回false
|
|
268
268
|
*/
|
|
269
|
-
|
|
269
|
+
canShowChildren(node: TreeNode<T, TreeNodeExtend>): boolean;
|
|
270
270
|
}
|
|
271
271
|
/**
|
|
272
|
-
*
|
|
272
|
+
* 树搜索结果
|
|
273
273
|
*/
|
|
274
|
-
|
|
274
|
+
type TreeSearchResult<T> = {
|
|
275
275
|
/**
|
|
276
|
-
*
|
|
276
|
+
* 匹配上的节点集合
|
|
277
277
|
*/
|
|
278
|
-
|
|
278
|
+
matched: TreeNode<T>[];
|
|
279
279
|
/**
|
|
280
|
-
*
|
|
281
|
-
* - 若node.children有值,但不能显示出来,则也算无子节点
|
|
280
|
+
* 未匹配上的节点集合
|
|
282
281
|
*/
|
|
283
|
-
|
|
284
|
-
}
|
|
282
|
+
failed: TreeNode<T>[];
|
|
283
|
+
};
|
|
285
284
|
|
|
286
285
|
/**
|
|
287
286
|
* 树组件 相关实体
|
|
@@ -334,7 +333,7 @@ type TreeNodeOptions<T> = {
|
|
|
334
333
|
/**
|
|
335
334
|
* 树组件的上下文对象
|
|
336
335
|
*/
|
|
337
|
-
context:
|
|
336
|
+
context: ITreeBaseContext<T>;
|
|
338
337
|
};
|
|
339
338
|
/**
|
|
340
339
|
* 树节点事件
|
|
@@ -373,7 +372,7 @@ type TreeNodeRenderOptions = {
|
|
|
373
372
|
/**
|
|
374
373
|
* 树节点 插槽配置选项
|
|
375
374
|
*/
|
|
376
|
-
type
|
|
375
|
+
type TreeNodeSlotOptions<T> = {
|
|
377
376
|
/**
|
|
378
377
|
* 当前节点
|
|
379
378
|
*/
|
|
@@ -597,7 +596,7 @@ type SelectEvents<T> = SelectBaseEvents<T> & {};
|
|
|
597
596
|
/**
|
|
598
597
|
* 【选项菜单】 组件上下文
|
|
599
598
|
*/
|
|
600
|
-
interface ISelectContext<T> extends
|
|
599
|
+
interface ISelectContext<T> extends ITreeBaseContext<T> {
|
|
601
600
|
/**
|
|
602
601
|
* 指定节点是否选中了
|
|
603
602
|
* @param multiple 是否是【多选模式】
|
|
@@ -933,6 +932,18 @@ type SwitchEvents = {
|
|
|
933
932
|
change: [value: boolean];
|
|
934
933
|
};
|
|
935
934
|
|
|
935
|
+
/**
|
|
936
|
+
* 树的基础组件信息
|
|
937
|
+
* 1、组件基础上下文 默认实现
|
|
938
|
+
*/
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* 使用【树上下文】
|
|
942
|
+
* @param nodes 树节点集合
|
|
943
|
+
* @returns 上下文对象+作用域
|
|
944
|
+
*/
|
|
945
|
+
declare function useTreeContext<T>(nodes: TreeNode<T, TreeNodeExtend>[]): ITreeBaseContext<T> & IScope;
|
|
946
|
+
|
|
936
947
|
/**
|
|
937
948
|
* 使用【响应式管理器】
|
|
938
949
|
* - 请在Vue组件的setup中使用此方法,否则 getCurrentScope 方法无法取到值
|
|
@@ -1895,5 +1906,5 @@ declare const components: {
|
|
|
1895
1906
|
});
|
|
1896
1907
|
};
|
|
1897
1908
|
|
|
1898
|
-
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive };
|
|
1899
|
-
export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentMountOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, MessageOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupExtend, SelectPopupOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNodeEvents, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions,
|
|
1909
|
+
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
|
1910
|
+
export type { ButtonOptions, ChooseEvents, ChooseItem, ChooseOptions, ComponentMountOptions, ComponentOptions, ConfirmAreaOptions, ConfirmOptions, DialogHandle, DialogOptions, DisabledOptions, DragVerifyInfo, DragVerifyOptions, EmptyOptions, FoldEvents, FoldOptions, FoldStatus, FollowElectResult, FollowExtend, FollowHandle, FollowOptions, FollowStrategy, FollowStrategyOptions, FooterEvents, FooterOptions, HeaderEvents, HeaderOptions, IPopupManager, IReactiveManager, ISelectContext, ITreeBaseContext, IconOptions, IconType, InputEvents, InputOptions, LoadingOptions, MessageOptions, PlaceholderOptions, PopupDescriptor, PopupHandle, PopupOptions, PopupStatus, PopupStatusOptions, ReactiveVar, ReadonlyOptions, ScrollEvents, ScrollOptions, ScrollTouchType, SearchEvents, SearchOptions, SelectBaseEvents, SelectBaseOptions, SelectEvents, SelectItem, SelectNodeEvents, SelectNodeOptions, SelectOptions, SelectPopupExtend, SelectPopupOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult };
|
package/dist/snail.vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//@ sourceURL=/snail.vue.js
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, mergeModels, useModel, computed, Fragment, renderList, normalizeStyle, unref, createElementVNode, createCommentVNode, toDisplayString, createBlock, shallowRef, withDirectives, vModelText, createVNode, createApp, Transition, withCtx, normalizeProps, guardReactiveProps, watch, ref, onErrorCaptured, resolveDynamicComponent, mergeProps, createSlots, onMounted, withModifiers, getCurrentInstance, nextTick, useTemplateRef, resolveComponent, onActivated, onDeactivated, onBeforeUnmount, getCurrentScope, onScopeDispose } from 'vue';
|
|
3
3
|
import { isArray, newId, throwError, isArrayNotEmpty, isStringNotEmpty, mustFunction, useScope, removeFromArray, mustObject, throwIfFalse, isObject, isNumberNotNaN, useScopes, mountScope, isPromise, wait, script, delay, useTimer, defer, useAsyncScope, useHook, hasAny, throwIfTrue, isFunction, onMountScope } from 'snail.core';
|
|
4
|
-
import {
|
|
4
|
+
import { css, link, useObserver, useAnimation } from 'snail.view';
|
|
5
5
|
|
|
6
6
|
var _sfc_main$r = defineComponent({
|
|
7
7
|
...{
|
|
@@ -23,10 +23,6 @@ var _sfc_main$r = defineComponent({
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
var addLink = href => setTimeout(link.register, 0, href);
|
|
27
|
-
|
|
28
|
-
addLink("/styles/snail.vue.vue.css");
|
|
29
|
-
|
|
30
26
|
const _hoisted_1$e = ["onClick"];
|
|
31
27
|
const _hoisted_2$9 = ["type", "checked"];
|
|
32
28
|
const _hoisted_3$6 = ["textContent"];
|
|
@@ -100,6 +96,10 @@ var _sfc_main$q = defineComponent({
|
|
|
100
96
|
}
|
|
101
97
|
});
|
|
102
98
|
|
|
99
|
+
var addLink = href => setTimeout(link.register, 0, href);
|
|
100
|
+
|
|
101
|
+
addLink("/styles/snail.vue.vue.css");
|
|
102
|
+
|
|
103
103
|
var _sfc_main$p = defineComponent({
|
|
104
104
|
...{
|
|
105
105
|
name: "Footer",
|
|
@@ -1205,25 +1205,25 @@ var _sfc_main$d = defineComponent({
|
|
|
1205
1205
|
emit: __emit
|
|
1206
1206
|
} = _ref;
|
|
1207
1207
|
const emits = __emit;
|
|
1208
|
-
const
|
|
1209
|
-
const
|
|
1210
|
-
const
|
|
1208
|
+
const rootDom = useTemplateRef("select-node");
|
|
1209
|
+
const selectedRef = computed(() => __props.context.selected(__props.multiple, __props.item));
|
|
1210
|
+
const showRef = computed(() => __props.context.canShow(__props.item));
|
|
1211
|
+
const showChildrenRef = __props.showChildren == true && __props.item.type == "group" ? computed(() => (__props.item.children || []).filter(__props.context.canShow)) : [];
|
|
1211
1212
|
const classRef = computed(() => ({
|
|
1212
1213
|
child: __props.showChildren != true,
|
|
1213
1214
|
clickable: __props.item.clickable,
|
|
1214
1215
|
group: __props.item.type == "group",
|
|
1215
1216
|
item: __props.item.type != "group",
|
|
1216
|
-
selected:
|
|
1217
|
+
selected: selectedRef.value
|
|
1217
1218
|
}));
|
|
1218
|
-
const selected = computed(() => __props.context.selected(__props.multiple, __props.item));
|
|
1219
1219
|
return (_ctx, _cache) => {
|
|
1220
1220
|
const _component_SelectNode = resolveComponent("SelectNode", true);
|
|
1221
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
1221
|
+
return openBlock(), createElementBlock(Fragment, null, [showRef.value ? (openBlock(), createElementBlock("div", {
|
|
1222
1222
|
key: 0,
|
|
1223
1223
|
class: normalizeClass(["select-node", classRef.value]),
|
|
1224
1224
|
title: _ctx.item.text,
|
|
1225
1225
|
ref: "select-node",
|
|
1226
|
-
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter",
|
|
1226
|
+
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter", rootDom.value, _ctx.item)),
|
|
1227
1227
|
onClick: _cache[1] || (_cache[1] = () => emits("click", _ctx.item))
|
|
1228
1228
|
}, [createElementVNode("div", {
|
|
1229
1229
|
class: "item-text",
|
|
@@ -1232,9 +1232,9 @@ var _sfc_main$d = defineComponent({
|
|
|
1232
1232
|
key: 0,
|
|
1233
1233
|
type: "arrow",
|
|
1234
1234
|
color: "#8a9099"
|
|
1235
|
-
})) : createCommentVNode("", true)], 42, _hoisted_1$7)) : createCommentVNode("", true),
|
|
1235
|
+
})) : createCommentVNode("", true)], 42, _hoisted_1$7)) : createCommentVNode("", true), showRef.value ? (openBlock(true), createElementBlock(Fragment, {
|
|
1236
1236
|
key: 1
|
|
1237
|
-
}, renderList(unref(
|
|
1237
|
+
}, renderList(unref(showChildrenRef), child => {
|
|
1238
1238
|
return openBlock(), createBlock(_component_SelectNode, {
|
|
1239
1239
|
key: child.id || unref(newId)(),
|
|
1240
1240
|
multiple: _ctx.multiple,
|
|
@@ -1285,9 +1285,6 @@ var _sfc_main$c = defineComponent({
|
|
|
1285
1285
|
emit: __emit
|
|
1286
1286
|
} = _ref;
|
|
1287
1287
|
const props = __props;
|
|
1288
|
-
const {
|
|
1289
|
-
context
|
|
1290
|
-
} = props;
|
|
1291
1288
|
const emits = __emit;
|
|
1292
1289
|
const {
|
|
1293
1290
|
follow
|
|
@@ -1299,24 +1296,25 @@ var _sfc_main$c = defineComponent({
|
|
|
1299
1296
|
watcher
|
|
1300
1297
|
} = useReactive();
|
|
1301
1298
|
const {
|
|
1299
|
+
context,
|
|
1302
1300
|
popupStatus,
|
|
1303
1301
|
pinned,
|
|
1304
1302
|
parentPinned
|
|
1305
1303
|
} = props;
|
|
1306
|
-
const
|
|
1304
|
+
const itemsRef = computed(() => (props.items || []).filter(context.canShow));
|
|
1307
1305
|
const classRef = computed(() => ({
|
|
1308
1306
|
"snail-select-popup": true,
|
|
1309
1307
|
"child-popup": props.level > 1,
|
|
1310
|
-
"text-tips":
|
|
1311
|
-
"has-group":
|
|
1308
|
+
"text-tips": itemsRef.value.length == 0,
|
|
1309
|
+
"has-group": itemsRef.value.find(node => node.type == "group") != void 0
|
|
1312
1310
|
}));
|
|
1313
|
-
const
|
|
1311
|
+
const childDestroyTimerRef = shallowRef(void 0);
|
|
1314
1312
|
var mouseStatus = "Leave";
|
|
1315
1313
|
var childFollowTargetDom = void 0;
|
|
1316
1314
|
var childFollowScope = void 0;
|
|
1317
1315
|
function destroyChildFollow(onlyTimer) {
|
|
1318
|
-
|
|
1319
|
-
|
|
1316
|
+
childDestroyTimerRef.value && childDestroyTimerRef.value.destroy();
|
|
1317
|
+
childDestroyTimerRef.value = void 0;
|
|
1320
1318
|
if (onlyTimer != true && childFollowScope && childFollowScope.destroyed == false) {
|
|
1321
1319
|
childFollowScope.destroy();
|
|
1322
1320
|
childFollowScope = void 0;
|
|
@@ -1372,7 +1370,7 @@ var _sfc_main$c = defineComponent({
|
|
|
1372
1370
|
search: void 0,
|
|
1373
1371
|
level: props.level + 1,
|
|
1374
1372
|
popupStyle: props.popupStyle,
|
|
1375
|
-
childDestroyTimer,
|
|
1373
|
+
childDestroyTimer: childDestroyTimerRef,
|
|
1376
1374
|
parentPinned: pinned
|
|
1377
1375
|
})
|
|
1378
1376
|
});
|
|
@@ -1402,7 +1400,7 @@ var _sfc_main$c = defineComponent({
|
|
|
1402
1400
|
key: 0
|
|
1403
1401
|
}, props.search, {
|
|
1404
1402
|
onSearch
|
|
1405
|
-
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
1403
|
+
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
1406
1404
|
return openBlock(), createBlock(_sfc_main$d, {
|
|
1407
1405
|
key: item.id || unref(newId)(),
|
|
1408
1406
|
multiple: props.multiple,
|
|
@@ -1412,7 +1410,7 @@ var _sfc_main$c = defineComponent({
|
|
|
1412
1410
|
onEnter: onEnterSelectNode,
|
|
1413
1411
|
onClick: onClickSelectNode
|
|
1414
1412
|
}, null, 8, ["multiple", "item", "context"]);
|
|
1415
|
-
}), 128)),
|
|
1413
|
+
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$e, {
|
|
1416
1414
|
key: 1,
|
|
1417
1415
|
message: "无结果"
|
|
1418
1416
|
})) : createCommentVNode("", true)], 64))], 38);
|
|
@@ -1431,18 +1429,13 @@ function useTreeContext(nodes) {
|
|
|
1431
1429
|
function canShow(node) {
|
|
1432
1430
|
return node.hidden != true && (failed.value == void 0 || failed.value.includes(node) == false);
|
|
1433
1431
|
}
|
|
1434
|
-
function
|
|
1435
|
-
|
|
1436
|
-
const showChildren = computed(() => node.children ? node.children.filter(canShow).length > 0 : false);
|
|
1437
|
-
return {
|
|
1438
|
-
show,
|
|
1439
|
-
showChildren
|
|
1440
|
-
};
|
|
1432
|
+
function canShowChildren(node) {
|
|
1433
|
+
return node.children ? node.children.filter(canShow).length > 0 : false;
|
|
1441
1434
|
}
|
|
1442
1435
|
const context = mountScope({
|
|
1443
1436
|
doSearch,
|
|
1444
1437
|
canShow,
|
|
1445
|
-
|
|
1438
|
+
canShowChildren
|
|
1446
1439
|
});
|
|
1447
1440
|
context.onDestroy(() => {
|
|
1448
1441
|
scopes.destroy();
|
|
@@ -1472,17 +1465,17 @@ function searchTree(nodes, text) {
|
|
|
1472
1465
|
return result;
|
|
1473
1466
|
}
|
|
1474
1467
|
|
|
1475
|
-
function useSelectContext(items,
|
|
1468
|
+
function useSelectContext(items, selectsRef) {
|
|
1476
1469
|
const treeContxt = useTreeContext(items);
|
|
1477
1470
|
function selected(multiple, item) {
|
|
1478
|
-
if (
|
|
1479
|
-
return multiple == true ?
|
|
1471
|
+
if (selectsRef.value) {
|
|
1472
|
+
return multiple == true ? selectsRef.value.includes(item) : selectsRef.value[selectsRef.value.length - 1] == item;
|
|
1480
1473
|
}
|
|
1481
1474
|
return false;
|
|
1482
1475
|
}
|
|
1483
1476
|
function selectedText(multiple, showPath) {
|
|
1484
|
-
if (
|
|
1485
|
-
return multiple == true || showPath == true ?
|
|
1477
|
+
if (selectsRef.value) {
|
|
1478
|
+
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(multiple ? "、" : " / ") : selectsRef.value[selectsRef.value.length - 1].text;
|
|
1486
1479
|
}
|
|
1487
1480
|
return "";
|
|
1488
1481
|
}
|
|
@@ -1493,8 +1486,8 @@ function useSelectContext(items, selects) {
|
|
|
1493
1486
|
});
|
|
1494
1487
|
}
|
|
1495
1488
|
|
|
1496
|
-
const _hoisted_1$6 = ["
|
|
1497
|
-
const _hoisted_2$3 = ["
|
|
1489
|
+
const _hoisted_1$6 = ["title"];
|
|
1490
|
+
const _hoisted_2$3 = ["textContent"];
|
|
1498
1491
|
const _hoisted_3$3 = ["textContent"];
|
|
1499
1492
|
const _hoisted_4$3 = {
|
|
1500
1493
|
key: 1,
|
|
@@ -1540,10 +1533,10 @@ var _sfc_main$b = defineComponent({
|
|
|
1540
1533
|
const {
|
|
1541
1534
|
follow
|
|
1542
1535
|
} = usePopup();
|
|
1543
|
-
const selects = shallowRef([...valuesModel.value]);
|
|
1544
|
-
const context = useSelectContext(props.items, selects);
|
|
1545
1536
|
const rootDom = useTemplateRef("select");
|
|
1546
|
-
const
|
|
1537
|
+
const selectsRef = shallowRef([...valuesModel.value]);
|
|
1538
|
+
const context = useSelectContext(props.items, selectsRef);
|
|
1539
|
+
const selectTextRef = computed(() => context.selectedText(props.multiple, props.showPath));
|
|
1547
1540
|
var followScope = void 0;
|
|
1548
1541
|
async function onClick() {
|
|
1549
1542
|
if (props.readonly == true || rootDom.value == void 0) {
|
|
@@ -1582,7 +1575,7 @@ var _sfc_main$b = defineComponent({
|
|
|
1582
1575
|
}
|
|
1583
1576
|
function onSelectItemChange(items) {
|
|
1584
1577
|
items = hasAny(items) ? [...items] : [];
|
|
1585
|
-
|
|
1578
|
+
selectsRef.value = items;
|
|
1586
1579
|
valuesModel.value = items;
|
|
1587
1580
|
emits("change", items);
|
|
1588
1581
|
}
|
|
@@ -1593,20 +1586,20 @@ var _sfc_main$b = defineComponent({
|
|
|
1593
1586
|
}]),
|
|
1594
1587
|
onClick: _cache[0] || (_cache[0] = $event => onClick()),
|
|
1595
1588
|
ref: "select"
|
|
1596
|
-
}, [props.items
|
|
1589
|
+
}, [unref(hasAny)(props.items) == true ? (openBlock(), createElementBlock(Fragment, {
|
|
1597
1590
|
key: 0
|
|
1598
|
-
}, [unref(
|
|
1591
|
+
}, [unref(hasAny)(selectsRef.value) ? (openBlock(), createElementBlock("div", {
|
|
1599
1592
|
key: 0,
|
|
1600
|
-
class: "select-result text-tips",
|
|
1601
|
-
textContent: toDisplayString(props.placeholder || "请选择")
|
|
1602
|
-
}, null, 8, _hoisted_1$6)) : (openBlock(), createElementBlock("div", {
|
|
1603
|
-
key: 1,
|
|
1604
1593
|
class: "select-result",
|
|
1605
|
-
title:
|
|
1594
|
+
title: selectTextRef.value
|
|
1606
1595
|
}, [createElementVNode("div", {
|
|
1607
1596
|
class: "select-text",
|
|
1608
|
-
textContent: toDisplayString(
|
|
1609
|
-
}, null, 8,
|
|
1597
|
+
textContent: toDisplayString(selectTextRef.value)
|
|
1598
|
+
}, null, 8, _hoisted_2$3)], 8, _hoisted_1$6)) : (openBlock(), createElementBlock("div", {
|
|
1599
|
+
key: 1,
|
|
1600
|
+
class: "select-result text-tips",
|
|
1601
|
+
textContent: toDisplayString(props.placeholder || "请选择")
|
|
1602
|
+
}, null, 8, _hoisted_3$3)), createVNode(_sfc_main$o, {
|
|
1610
1603
|
type: "arrow",
|
|
1611
1604
|
size: 24,
|
|
1612
1605
|
color: "#8a9099",
|
|
@@ -2020,10 +2013,13 @@ var _sfc_main$3 = defineComponent({
|
|
|
2020
2013
|
const {
|
|
2021
2014
|
transition
|
|
2022
2015
|
} = useAnimation();
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2016
|
+
const showRef = computed(() => __props.context.canShow(__props.node));
|
|
2017
|
+
const showChildrenRef = computed(() => __props.context.canShowChildren(__props.node));
|
|
2018
|
+
const classRef = computed(() => {
|
|
2019
|
+
const array = [`level-${__props.level}`];
|
|
2020
|
+
__props.node.clickable && array.push("clickable");
|
|
2021
|
+
return array;
|
|
2022
|
+
});
|
|
2027
2023
|
const slotOptions = Object.freeze({
|
|
2028
2024
|
node: __props.node,
|
|
2029
2025
|
parent: __props.parent,
|
|
@@ -2071,16 +2067,16 @@ var _sfc_main$3 = defineComponent({
|
|
|
2071
2067
|
}
|
|
2072
2068
|
return (_ctx, _cache) => {
|
|
2073
2069
|
const _component_TreeNode = resolveComponent("TreeNode", true);
|
|
2074
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2070
|
+
return openBlock(), createElementBlock(Fragment, null, [showRef.value ? (openBlock(), createElementBlock("div", {
|
|
2075
2071
|
key: 0,
|
|
2076
|
-
class: normalizeClass(["snail-tree-node",
|
|
2072
|
+
class: normalizeClass(["snail-tree-node", classRef.value])
|
|
2077
2073
|
}, [_ctx.options.rewrite == true ? renderSlot(_ctx.$slots, "default", normalizeProps(mergeProps({
|
|
2078
2074
|
key: 0
|
|
2079
2075
|
}, unref(slotOptions)))) : (openBlock(), createElementBlock(Fragment, {
|
|
2080
2076
|
key: 1
|
|
2081
2077
|
}, [_cache[2] || (_cache[2] = createElementVNode("div", {
|
|
2082
2078
|
class: "indent"
|
|
2083
|
-
}, null, -1)), _ctx.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
2079
|
+
}, null, -1)), _ctx.options.foldDisabled != true ? (openBlock(), createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (openBlock(), createBlock(_sfc_main$o, {
|
|
2084
2080
|
key: 0,
|
|
2085
2081
|
class: normalizeClass(statusRef.value),
|
|
2086
2082
|
type: "custom",
|
|
@@ -2093,7 +2089,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
2093
2089
|
title: _ctx.node.text,
|
|
2094
2090
|
textContent: toDisplayString(_ctx.node.text),
|
|
2095
2091
|
onClick: _cache[0] || (_cache[0] = $event => onNodeClick(_ctx.node))
|
|
2096
|
-
}, null, 8, _hoisted_2$1), createElementVNode("div", _hoisted_3$1, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 2)) : createCommentVNode("", true),
|
|
2092
|
+
}, null, 8, _hoisted_2$1), createElementVNode("div", _hoisted_3$1, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(slotOptions))))])], 64))], 2)) : createCommentVNode("", true), showRef.value && showChildrenRef.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.node.children, child => {
|
|
2097
2093
|
return openBlock(), createBlock(_component_TreeNode, {
|
|
2098
2094
|
key: child.id || unref(newId)(),
|
|
2099
2095
|
node: child,
|
|
@@ -2135,7 +2131,6 @@ var _sfc_main$2 = defineComponent({
|
|
|
2135
2131
|
const props = __props;
|
|
2136
2132
|
const emits = __emit;
|
|
2137
2133
|
const context = useTreeContext(props.nodes);
|
|
2138
|
-
shallowRef([]);
|
|
2139
2134
|
return (_ctx, _cache) => {
|
|
2140
2135
|
return openBlock(), createElementBlock("div", _hoisted_1$2, [props.search ? (openBlock(), createBlock(_sfc_main$m, mergeProps({
|
|
2141
2136
|
key: 0
|
|
@@ -2394,4 +2389,4 @@ const components = {
|
|
|
2394
2389
|
|
|
2395
2390
|
onMountScope(scope => getCurrentScope() && onScopeDispose(scope.destroy));
|
|
2396
2391
|
|
|
2397
|
-
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive };
|
|
2392
|
+
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
package/dist/snail.vue.umd.js
CHANGED
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
29
|
-
|
|
30
|
-
addLink("/styles/snail.vue.vue.css");
|
|
31
|
-
|
|
32
28
|
const _hoisted_1$e = ["onClick"];
|
|
33
29
|
const _hoisted_2$9 = ["type", "checked"];
|
|
34
30
|
const _hoisted_3$6 = ["textContent"];
|
|
@@ -102,6 +98,10 @@
|
|
|
102
98
|
}
|
|
103
99
|
});
|
|
104
100
|
|
|
101
|
+
var addLink = href => setTimeout(snail_view.link.register, 0, href);
|
|
102
|
+
|
|
103
|
+
addLink("/styles/snail.vue.vue.css");
|
|
104
|
+
|
|
105
105
|
var _sfc_main$p = vue.defineComponent({
|
|
106
106
|
...{
|
|
107
107
|
name: "Footer",
|
|
@@ -1207,25 +1207,25 @@
|
|
|
1207
1207
|
emit: __emit
|
|
1208
1208
|
} = _ref;
|
|
1209
1209
|
const emits = __emit;
|
|
1210
|
-
const
|
|
1211
|
-
const
|
|
1212
|
-
const
|
|
1210
|
+
const rootDom = vue.useTemplateRef("select-node");
|
|
1211
|
+
const selectedRef = vue.computed(() => __props.context.selected(__props.multiple, __props.item));
|
|
1212
|
+
const showRef = vue.computed(() => __props.context.canShow(__props.item));
|
|
1213
|
+
const showChildrenRef = __props.showChildren == true && __props.item.type == "group" ? vue.computed(() => (__props.item.children || []).filter(__props.context.canShow)) : [];
|
|
1213
1214
|
const classRef = vue.computed(() => ({
|
|
1214
1215
|
child: __props.showChildren != true,
|
|
1215
1216
|
clickable: __props.item.clickable,
|
|
1216
1217
|
group: __props.item.type == "group",
|
|
1217
1218
|
item: __props.item.type != "group",
|
|
1218
|
-
selected:
|
|
1219
|
+
selected: selectedRef.value
|
|
1219
1220
|
}));
|
|
1220
|
-
const selected = vue.computed(() => __props.context.selected(__props.multiple, __props.item));
|
|
1221
1221
|
return (_ctx, _cache) => {
|
|
1222
1222
|
const _component_SelectNode = vue.resolveComponent("SelectNode", true);
|
|
1223
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
1223
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [showRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1224
1224
|
key: 0,
|
|
1225
1225
|
class: vue.normalizeClass(["select-node", classRef.value]),
|
|
1226
1226
|
title: _ctx.item.text,
|
|
1227
1227
|
ref: "select-node",
|
|
1228
|
-
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter",
|
|
1228
|
+
onMouseenter: _cache[0] || (_cache[0] = $event => emits("enter", rootDom.value, _ctx.item)),
|
|
1229
1229
|
onClick: _cache[1] || (_cache[1] = () => emits("click", _ctx.item))
|
|
1230
1230
|
}, [vue.createElementVNode("div", {
|
|
1231
1231
|
class: "item-text",
|
|
@@ -1234,9 +1234,9 @@
|
|
|
1234
1234
|
key: 0,
|
|
1235
1235
|
type: "arrow",
|
|
1236
1236
|
color: "#8a9099"
|
|
1237
|
-
})) : vue.createCommentVNode("", true)], 42, _hoisted_1$7)) : vue.createCommentVNode("", true),
|
|
1237
|
+
})) : vue.createCommentVNode("", true)], 42, _hoisted_1$7)) : vue.createCommentVNode("", true), showRef.value ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, {
|
|
1238
1238
|
key: 1
|
|
1239
|
-
}, vue.renderList(vue.unref(
|
|
1239
|
+
}, vue.renderList(vue.unref(showChildrenRef), child => {
|
|
1240
1240
|
return vue.openBlock(), vue.createBlock(_component_SelectNode, {
|
|
1241
1241
|
key: child.id || vue.unref(snail_core.newId)(),
|
|
1242
1242
|
multiple: _ctx.multiple,
|
|
@@ -1287,9 +1287,6 @@
|
|
|
1287
1287
|
emit: __emit
|
|
1288
1288
|
} = _ref;
|
|
1289
1289
|
const props = __props;
|
|
1290
|
-
const {
|
|
1291
|
-
context
|
|
1292
|
-
} = props;
|
|
1293
1290
|
const emits = __emit;
|
|
1294
1291
|
const {
|
|
1295
1292
|
follow
|
|
@@ -1301,24 +1298,25 @@
|
|
|
1301
1298
|
watcher
|
|
1302
1299
|
} = useReactive();
|
|
1303
1300
|
const {
|
|
1301
|
+
context,
|
|
1304
1302
|
popupStatus,
|
|
1305
1303
|
pinned,
|
|
1306
1304
|
parentPinned
|
|
1307
1305
|
} = props;
|
|
1308
|
-
const
|
|
1306
|
+
const itemsRef = vue.computed(() => (props.items || []).filter(context.canShow));
|
|
1309
1307
|
const classRef = vue.computed(() => ({
|
|
1310
1308
|
"snail-select-popup": true,
|
|
1311
1309
|
"child-popup": props.level > 1,
|
|
1312
|
-
"text-tips":
|
|
1313
|
-
"has-group":
|
|
1310
|
+
"text-tips": itemsRef.value.length == 0,
|
|
1311
|
+
"has-group": itemsRef.value.find(node => node.type == "group") != void 0
|
|
1314
1312
|
}));
|
|
1315
|
-
const
|
|
1313
|
+
const childDestroyTimerRef = vue.shallowRef(void 0);
|
|
1316
1314
|
var mouseStatus = "Leave";
|
|
1317
1315
|
var childFollowTargetDom = void 0;
|
|
1318
1316
|
var childFollowScope = void 0;
|
|
1319
1317
|
function destroyChildFollow(onlyTimer) {
|
|
1320
|
-
|
|
1321
|
-
|
|
1318
|
+
childDestroyTimerRef.value && childDestroyTimerRef.value.destroy();
|
|
1319
|
+
childDestroyTimerRef.value = void 0;
|
|
1322
1320
|
if (onlyTimer != true && childFollowScope && childFollowScope.destroyed == false) {
|
|
1323
1321
|
childFollowScope.destroy();
|
|
1324
1322
|
childFollowScope = void 0;
|
|
@@ -1374,7 +1372,7 @@
|
|
|
1374
1372
|
search: void 0,
|
|
1375
1373
|
level: props.level + 1,
|
|
1376
1374
|
popupStyle: props.popupStyle,
|
|
1377
|
-
childDestroyTimer,
|
|
1375
|
+
childDestroyTimer: childDestroyTimerRef,
|
|
1378
1376
|
parentPinned: pinned
|
|
1379
1377
|
})
|
|
1380
1378
|
});
|
|
@@ -1404,7 +1402,7 @@
|
|
|
1404
1402
|
key: 0
|
|
1405
1403
|
}, props.search, {
|
|
1406
1404
|
onSearch
|
|
1407
|
-
}), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
1405
|
+
}), null, 16)) : vue.createCommentVNode("", true), (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(itemsRef.value, item => {
|
|
1408
1406
|
return vue.openBlock(), vue.createBlock(_sfc_main$d, {
|
|
1409
1407
|
key: item.id || vue.unref(snail_core.newId)(),
|
|
1410
1408
|
multiple: props.multiple,
|
|
@@ -1414,7 +1412,7 @@
|
|
|
1414
1412
|
onEnter: onEnterSelectNode,
|
|
1415
1413
|
onClick: onClickSelectNode
|
|
1416
1414
|
}, null, 8, ["multiple", "item", "context"]);
|
|
1417
|
-
}), 128)),
|
|
1415
|
+
}), 128)), itemsRef.value.length == 0 ? (vue.openBlock(), vue.createBlock(_sfc_main$e, {
|
|
1418
1416
|
key: 1,
|
|
1419
1417
|
message: "无结果"
|
|
1420
1418
|
})) : vue.createCommentVNode("", true)], 64))], 38);
|
|
@@ -1433,18 +1431,13 @@
|
|
|
1433
1431
|
function canShow(node) {
|
|
1434
1432
|
return node.hidden != true && (failed.value == void 0 || failed.value.includes(node) == false);
|
|
1435
1433
|
}
|
|
1436
|
-
function
|
|
1437
|
-
|
|
1438
|
-
const showChildren = vue.computed(() => node.children ? node.children.filter(canShow).length > 0 : false);
|
|
1439
|
-
return {
|
|
1440
|
-
show,
|
|
1441
|
-
showChildren
|
|
1442
|
-
};
|
|
1434
|
+
function canShowChildren(node) {
|
|
1435
|
+
return node.children ? node.children.filter(canShow).length > 0 : false;
|
|
1443
1436
|
}
|
|
1444
1437
|
const context = snail_core.mountScope({
|
|
1445
1438
|
doSearch,
|
|
1446
1439
|
canShow,
|
|
1447
|
-
|
|
1440
|
+
canShowChildren
|
|
1448
1441
|
});
|
|
1449
1442
|
context.onDestroy(() => {
|
|
1450
1443
|
scopes.destroy();
|
|
@@ -1474,17 +1467,17 @@
|
|
|
1474
1467
|
return result;
|
|
1475
1468
|
}
|
|
1476
1469
|
|
|
1477
|
-
function useSelectContext(items,
|
|
1470
|
+
function useSelectContext(items, selectsRef) {
|
|
1478
1471
|
const treeContxt = useTreeContext(items);
|
|
1479
1472
|
function selected(multiple, item) {
|
|
1480
|
-
if (
|
|
1481
|
-
return multiple == true ?
|
|
1473
|
+
if (selectsRef.value) {
|
|
1474
|
+
return multiple == true ? selectsRef.value.includes(item) : selectsRef.value[selectsRef.value.length - 1] == item;
|
|
1482
1475
|
}
|
|
1483
1476
|
return false;
|
|
1484
1477
|
}
|
|
1485
1478
|
function selectedText(multiple, showPath) {
|
|
1486
|
-
if (
|
|
1487
|
-
return multiple == true || showPath == true ?
|
|
1479
|
+
if (selectsRef.value) {
|
|
1480
|
+
return multiple == true || showPath == true ? selectsRef.value.map(item => item.text).join(multiple ? "、" : " / ") : selectsRef.value[selectsRef.value.length - 1].text;
|
|
1488
1481
|
}
|
|
1489
1482
|
return "";
|
|
1490
1483
|
}
|
|
@@ -1495,8 +1488,8 @@
|
|
|
1495
1488
|
});
|
|
1496
1489
|
}
|
|
1497
1490
|
|
|
1498
|
-
const _hoisted_1$6 = ["
|
|
1499
|
-
const _hoisted_2$3 = ["
|
|
1491
|
+
const _hoisted_1$6 = ["title"];
|
|
1492
|
+
const _hoisted_2$3 = ["textContent"];
|
|
1500
1493
|
const _hoisted_3$3 = ["textContent"];
|
|
1501
1494
|
const _hoisted_4$3 = {
|
|
1502
1495
|
key: 1,
|
|
@@ -1542,10 +1535,10 @@
|
|
|
1542
1535
|
const {
|
|
1543
1536
|
follow
|
|
1544
1537
|
} = usePopup();
|
|
1545
|
-
const selects = vue.shallowRef([...valuesModel.value]);
|
|
1546
|
-
const context = useSelectContext(props.items, selects);
|
|
1547
1538
|
const rootDom = vue.useTemplateRef("select");
|
|
1548
|
-
const
|
|
1539
|
+
const selectsRef = vue.shallowRef([...valuesModel.value]);
|
|
1540
|
+
const context = useSelectContext(props.items, selectsRef);
|
|
1541
|
+
const selectTextRef = vue.computed(() => context.selectedText(props.multiple, props.showPath));
|
|
1549
1542
|
var followScope = void 0;
|
|
1550
1543
|
async function onClick() {
|
|
1551
1544
|
if (props.readonly == true || rootDom.value == void 0) {
|
|
@@ -1584,7 +1577,7 @@
|
|
|
1584
1577
|
}
|
|
1585
1578
|
function onSelectItemChange(items) {
|
|
1586
1579
|
items = snail_core.hasAny(items) ? [...items] : [];
|
|
1587
|
-
|
|
1580
|
+
selectsRef.value = items;
|
|
1588
1581
|
valuesModel.value = items;
|
|
1589
1582
|
emits("change", items);
|
|
1590
1583
|
}
|
|
@@ -1595,20 +1588,20 @@
|
|
|
1595
1588
|
}]),
|
|
1596
1589
|
onClick: _cache[0] || (_cache[0] = $event => onClick()),
|
|
1597
1590
|
ref: "select"
|
|
1598
|
-
}, [
|
|
1591
|
+
}, [vue.unref(snail_core.hasAny)(props.items) == true ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
1599
1592
|
key: 0
|
|
1600
|
-
}, [vue.unref(snail_core.
|
|
1593
|
+
}, [vue.unref(snail_core.hasAny)(selectsRef.value) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1601
1594
|
key: 0,
|
|
1602
|
-
class: "select-result text-tips",
|
|
1603
|
-
textContent: vue.toDisplayString(props.placeholder || "请选择")
|
|
1604
|
-
}, null, 8, _hoisted_1$6)) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
1605
|
-
key: 1,
|
|
1606
1595
|
class: "select-result",
|
|
1607
|
-
title:
|
|
1596
|
+
title: selectTextRef.value
|
|
1608
1597
|
}, [vue.createElementVNode("div", {
|
|
1609
1598
|
class: "select-text",
|
|
1610
|
-
textContent: vue.toDisplayString(
|
|
1611
|
-
}, null, 8,
|
|
1599
|
+
textContent: vue.toDisplayString(selectTextRef.value)
|
|
1600
|
+
}, null, 8, _hoisted_2$3)], 8, _hoisted_1$6)) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
1601
|
+
key: 1,
|
|
1602
|
+
class: "select-result text-tips",
|
|
1603
|
+
textContent: vue.toDisplayString(props.placeholder || "请选择")
|
|
1604
|
+
}, null, 8, _hoisted_3$3)), vue.createVNode(_sfc_main$o, {
|
|
1612
1605
|
type: "arrow",
|
|
1613
1606
|
size: 24,
|
|
1614
1607
|
color: "#8a9099",
|
|
@@ -2022,10 +2015,13 @@
|
|
|
2022
2015
|
const {
|
|
2023
2016
|
transition
|
|
2024
2017
|
} = snail_view.useAnimation();
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2018
|
+
const showRef = vue.computed(() => __props.context.canShow(__props.node));
|
|
2019
|
+
const showChildrenRef = vue.computed(() => __props.context.canShowChildren(__props.node));
|
|
2020
|
+
const classRef = vue.computed(() => {
|
|
2021
|
+
const array = [`level-${__props.level}`];
|
|
2022
|
+
__props.node.clickable && array.push("clickable");
|
|
2023
|
+
return array;
|
|
2024
|
+
});
|
|
2029
2025
|
const slotOptions = Object.freeze({
|
|
2030
2026
|
node: __props.node,
|
|
2031
2027
|
parent: __props.parent,
|
|
@@ -2073,16 +2069,16 @@
|
|
|
2073
2069
|
}
|
|
2074
2070
|
return (_ctx, _cache) => {
|
|
2075
2071
|
const _component_TreeNode = vue.resolveComponent("TreeNode", true);
|
|
2076
|
-
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2072
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [showRef.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
2077
2073
|
key: 0,
|
|
2078
|
-
class: vue.normalizeClass(["snail-tree-node",
|
|
2074
|
+
class: vue.normalizeClass(["snail-tree-node", classRef.value])
|
|
2079
2075
|
}, [_ctx.options.rewrite == true ? vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.mergeProps({
|
|
2080
2076
|
key: 0
|
|
2081
2077
|
}, vue.unref(slotOptions)))) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
2082
2078
|
key: 1
|
|
2083
2079
|
}, [_cache[2] || (_cache[2] = vue.createElementVNode("div", {
|
|
2084
2080
|
class: "indent"
|
|
2085
|
-
}, null, -1)), _ctx.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
|
|
2081
|
+
}, null, -1)), _ctx.options.foldDisabled != true ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [showChildrenRef.value ? (vue.openBlock(), vue.createBlock(_sfc_main$o, {
|
|
2086
2082
|
key: 0,
|
|
2087
2083
|
class: vue.normalizeClass(statusRef.value),
|
|
2088
2084
|
type: "custom",
|
|
@@ -2095,7 +2091,7 @@
|
|
|
2095
2091
|
title: _ctx.node.text,
|
|
2096
2092
|
textContent: vue.toDisplayString(_ctx.node.text),
|
|
2097
2093
|
onClick: _cache[0] || (_cache[0] = $event => onNodeClick(_ctx.node))
|
|
2098
|
-
}, null, 8, _hoisted_2$1), vue.createElementVNode("div", _hoisted_3$1, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 2)) : vue.createCommentVNode("", true),
|
|
2094
|
+
}, null, 8, _hoisted_2$1), vue.createElementVNode("div", _hoisted_3$1, [vue.renderSlot(_ctx.$slots, "default", vue.normalizeProps(vue.guardReactiveProps(vue.unref(slotOptions))))])], 64))], 2)) : vue.createCommentVNode("", true), showRef.value && showChildrenRef.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$1, [(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.node.children, child => {
|
|
2099
2095
|
return vue.openBlock(), vue.createBlock(_component_TreeNode, {
|
|
2100
2096
|
key: child.id || vue.unref(snail_core.newId)(),
|
|
2101
2097
|
node: child,
|
|
@@ -2137,7 +2133,6 @@
|
|
|
2137
2133
|
const props = __props;
|
|
2138
2134
|
const emits = __emit;
|
|
2139
2135
|
const context = useTreeContext(props.nodes);
|
|
2140
|
-
vue.shallowRef([]);
|
|
2141
2136
|
return (_ctx, _cache) => {
|
|
2142
2137
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [props.search ? (vue.openBlock(), vue.createBlock(_sfc_main$m, vue.mergeProps({
|
|
2143
2138
|
key: 0
|
|
@@ -2403,5 +2398,6 @@
|
|
|
2403
2398
|
exports.triggerAppCreated = triggerAppCreated;
|
|
2404
2399
|
exports.usePopup = usePopup;
|
|
2405
2400
|
exports.useReactive = useReactive;
|
|
2401
|
+
exports.useTreeContext = useTreeContext;
|
|
2406
2402
|
|
|
2407
2403
|
}));
|
|
@@ -1,53 +1,53 @@
|
|
|
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: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>span{margin-left:4px}.snail-choose.readonly>div.choose-item{cursor:not-allowed}
|
|
1
3
|
/* src:base\button.vue index:0 */
|
|
2
4
|
.snail-button{align-items:center;border-radius:2px;cursor:pointer;display:flex;display:inline-flex;font-size:14px;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.snail-button.max{height:40px;width:120px}.snail-button.middle{height:32px;width:90px}.snail-button.normal{height:28px;width:54px}.snail-button.small{height:20px;width:30px}.snail-button.primary{background-color:#5ca3ff;color:#fff}.snail-button.default{background-color:#fff;border:1px solid #dddfed;color:#2e2f33}.snail-button.link{color:#4c9aff}
|
|
5
|
+
/* src:base\footer.vue index:0 */
|
|
6
|
+
.snail-footer{align-items:center;background-color:#fff;display:flex;flex-shrink:0;height:72px;padding:0 40px;width:100%}.snail-footer>.snail-button:nth-child(n+2){margin-left:20px}.snail-footer.start-divider{border-top:1px solid #dddfed}.snail-footer.left{justify-content:left}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:right}
|
|
3
7
|
/* src:base\header.vue index:0 */
|
|
4
8
|
.snail-header{align-items:center;background-color:#fff;display:flex;flex-shrink:0;position:relative;width:100%}.snail-header>.header-title{color:#2e3033;flex:1;line-height:48px;overflow:hidden;padding:0 30px;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-header>.header-title.left{text-align:left}.snail-header>.header-title.center{text-align:center}.snail-header>.header-title.right{text-align:right}.snail-header.start-divider{border-bottom:1px solid #dddfed}.snail-header.page{height:48px}.snail-header.page>.header-title{font-size:16px;font-weight: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}
|
|
5
9
|
/* src:base\icon.vue index:0 */
|
|
6
10
|
.snail-icon{cursor:pointer;opacity:1}
|
|
7
|
-
/* src:base\choose.vue index:0 */
|
|
8
|
-
.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: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>span{margin-left:4px}.snail-choose.readonly>div.choose-item{cursor:not-allowed}
|
|
9
|
-
/* src:base\footer.vue index:0 */
|
|
10
|
-
.snail-footer{align-items:center;background-color:#fff;display:flex;flex-shrink:0;height:72px;padding:0 40px;width:100%}.snail-footer>.snail-button:nth-child(n+2){margin-left:20px}.snail-footer.start-divider{border-top:1px solid #dddfed}.snail-footer.left{justify-content:left}.snail-footer.center{justify-content:center}.snail-footer.right{justify-content:right}
|
|
11
|
-
/* src:base\search.vue index:0 */
|
|
12
|
-
.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
|
-
/* src:base\select.vue index:0 */
|
|
14
|
-
.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;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{cursor:text;padding:0 8px}.snail-select.readonly{cursor:auto}.snail-select.readonly>svg.snail-icon{display:none}
|
|
15
11
|
/* src:base\switch.vue index:0 */
|
|
16
12
|
.snail-switch{border-radius:10px 10px 10px 10px;cursor:pointer;height:20px!important;overflow:hidden;position:relative;width:36px!important}.snail-switch>div{height:100%;width:100%}.snail-switch>div.on{background-color:#5ca3ff}.snail-switch>div.off{background-color:#c4c8cc;position:absolute;transition:left .2s ease}.snail-switch>div.status{background:#fff;border-radius:10px 10px 10px 10px;height:16px;position:absolute;top:2px;transition:left .2s ease;width:16px}.snail-switch.on>div.off{left:100%;top:0}.snail-switch.on>div.status{left:calc(100% - 18px)}.snail-switch.off>div.off{left:0;top:0}.snail-switch.off>div.status{left:2px}.snail-switch.readonly{cursor:default}
|
|
17
|
-
/* src:
|
|
18
|
-
.snail-
|
|
13
|
+
/* src:base\select.vue index:0 */
|
|
14
|
+
.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;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{cursor:text;padding:0 8px}.snail-select.readonly{cursor:auto}.snail-select.readonly>svg.snail-icon{display:none}
|
|
19
15
|
/* src:container\dynamic.vue index:0 */
|
|
20
16
|
.snail-dynamic-error{color:red}.snail-dynamic-error>span{color:gray}
|
|
21
|
-
/* src:container\
|
|
22
|
-
.snail-
|
|
17
|
+
/* src:container\fold.vue index:0 */
|
|
18
|
+
.snail-fold{flex-shrink:0}.snail-fold>div.fold-header{align-items:center;display:flex;height:32px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.snail-fold>div.fold-header:before{background-color:#2c97fb;content:"";height:18px;left:0;position:absolute;top:7px;width:4px}.snail-fold>div.fold-header>.subtitle,.snail-fold>div.fold-header>.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.snail-fold>div.fold-header>.title{color:#2e3033;font-size:14px;font-weight:bold;padding-left:20px}.snail-fold>div.fold-header>.subtitle{color:#8a9099;font-size:13px}.snail-fold>div.fold-header>div.status{align-items:right;display:flex;flex:1;justify-content:right}.snail-fold>div.fold-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)}
|
|
19
|
+
/* src:base\search.vue index:0 */
|
|
20
|
+
.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}
|
|
23
21
|
/* src:container\sort.vue index:0 */
|
|
24
22
|
.snail-sort-drag{background:#fff;border:1px solid #4c9aff;border-radius:4px;cursor:move}.snail-sort-ghost{border:1px dashed #4c9aff;border-radius:4px}
|
|
23
|
+
/* src:container\scroll.vue index:0 */
|
|
24
|
+
.snail-scroll{overflow:hidden}.snail-scroll.scroll-x{overflow-x:auto}.snail-scroll.scroll-y{overflow-y:auto}
|
|
25
|
+
/* src:container\table.vue index:0 */
|
|
26
|
+
.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
27
|
/* src:container\components\table-row.vue index:0 */
|
|
26
28
|
.table-row{align-items:center;display:flex}
|
|
27
29
|
/* src:container\components\table-col.vue index:0 */
|
|
28
30
|
.table-col{align-items:center;display:flex;height:100%;white-space:nowrap}.table-col.left{justify-content:left}.table-col.center{justify-content:center}.table-col.right{justify-content:right}
|
|
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\tree.vue index:0 */
|
|
32
32
|
.snail-tree{background-color:#fff;display:flex;flex-direction:column}.snail-tree .snail-search{flex-direction:0;margin:12px}.snail-tree .snail-scroll{flex:1}
|
|
33
|
+
/* src:prompt\drag-verify.vue index:0 */
|
|
34
|
+
.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}}
|
|
33
35
|
/* src:form\input.vue index:0 */
|
|
34
36
|
.snail-input{display:inline-flex;min-height:34px}.snail-input>.input-title{flex-shrink:0;font-size:14px;padding-top:6px}.snail-input>.input-title>span.text{color:#2e3033}.snail-input>.input-title>span.required{color:#f74b4b;margin-left:2px}.snail-input>.input-body{align-self:start;display:flex;flex:1;height:32px}.snail-input>.input-body>input{flex:1}.snail-input>.input-body>span{background-color:red;flex-shrink:0}
|
|
35
37
|
/* src:prompt\empty.vue index:0 */
|
|
36
38
|
.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-size:14px;font-weight:400;padding:0 10px 10px}
|
|
37
|
-
/* src:prompt\drag-verify.vue index:0 */
|
|
38
|
-
.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}}
|
|
39
39
|
/* src:prompt\loading.vue index:0 */
|
|
40
40
|
.snail-loading{height:100%;left:0;position:absolute;top:0;width:100%;z-index:10000}.snail-loading.show-mask{background-color:rgba(0,0,0,.15)}.snail-loading:after,.snail-loading:before{animation:snail-loading-stretch 1s ease-in-out infinite;border-radius:50%;content:"";display:block;display:inline-block;height:10px;left:50%;margin-left:-18px;margin-top:-6px;position:absolute;top:50%;width:10px}.snail-loading:before{background-color:#279bf1}.snail-loading:after{animation-delay:-.5s;background:#64d214;margin-left:0;margin-right:-18px}@keyframes snail-loading-stretch{0%,to{transform:scale(1)}50%{transform:scale(2)}}.snail-loading-enter-active,.snail-loading-leave-active{transition:opacity .5s ease-in-out}.snail-loading-enter-from,.snail-loading-leave-to{opacity:0}
|
|
41
|
-
/* src:popup\components\confirm-container.vue index:0 */
|
|
42
|
-
.snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>div.confirm-body{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word}
|
|
43
41
|
/* src:popup\components\dialog-container.vue index:0 */
|
|
44
42
|
.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)}
|
|
43
|
+
/* src:popup\components\confirm-container.vue index:0 */
|
|
44
|
+
.snail-confirm{background-color:#fff;border-radius:4px;color:#2e2f33;display:flex;flex-direction:column;max-height:350px;max-width:548px;min-width:348px}.snail-confirm>div.confirm-body{flex:1;font-size:14px;margin:20px 40px;overflow:auto;word-wrap:break-word}
|
|
45
|
+
/* src:popup\components\toast-container.vue index:0 */
|
|
46
|
+
.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}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
|
|
45
47
|
/* src:popup\components\follow-container.vue index:0 */
|
|
46
48
|
.snail-follow{background-color:#fff;display:inline-block;max-height:100%;max-width:100%;position:fixed;transition-duration:.5s;transition-property:left,top;transition-timing-function:ease}
|
|
47
49
|
/* src:popup\components\popup-container.vue index:0 */
|
|
48
50
|
.snail-popup{left:0;position:fixed;top:0}
|
|
49
|
-
/* src:popup\components\toast-container.vue index:0 */
|
|
50
|
-
.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}.snail-toast>div.message{flex:1;line-height:24px;overflow:hidden;word-break:break-all}
|
|
51
51
|
/* src:container\components\tree-node.vue index:0 */
|
|
52
52
|
.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>.node-text{cursor:pointer}.snail-tree-children{width:100%}.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}
|
|
53
53
|
/* src:base\components\select-popup.vue index:0 */
|