snail.vue 1.0.48 → 1.0.49
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/.code-snippets +6 -0
- package/dist/snail.vue.d.ts +77 -15
- package/dist/snail.vue.js +145 -94
- package/dist/snail.vue.umd.js +144 -93
- package/dist/styles/app.css +1 -1
- package/dist/styles/snail.vue.vue.css +20 -20
- package/package.json +2 -2
package/.code-snippets
CHANGED
|
@@ -39,5 +39,11 @@
|
|
|
39
39
|
"scope": "html",
|
|
40
40
|
"description": "公共类样式:提示文本",
|
|
41
41
|
"body": "class=\"text-tips\"",
|
|
42
|
+
},
|
|
43
|
+
".placeholder":{
|
|
44
|
+
"prefix": ".placeholder",
|
|
45
|
+
"scope": "html",
|
|
46
|
+
"description": "placeholder,针对div、span元素,设置placeholder样式",
|
|
47
|
+
"body": "placeholder",
|
|
42
48
|
}
|
|
43
49
|
}
|
package/dist/snail.vue.d.ts
CHANGED
|
@@ -450,6 +450,13 @@ interface ITreeBaseContext<T> {
|
|
|
450
450
|
* @returns 从【顶级节点】->【指定节点】的全路径数据
|
|
451
451
|
*/
|
|
452
452
|
getPath(node: TreeNode<T, TreeNodeExtend>): TreeNode<T, TreeNodeExtend>[];
|
|
453
|
+
/**
|
|
454
|
+
* 获取指定【树节点】的唯一Key值
|
|
455
|
+
* - 相同节点确保唯一,且不变;用于唯一标记此节点
|
|
456
|
+
* @param node
|
|
457
|
+
* @returns 返回节点唯一Key值
|
|
458
|
+
*/
|
|
459
|
+
getKey(node: TreeNode<T>): string;
|
|
453
460
|
}
|
|
454
461
|
/**
|
|
455
462
|
* 树搜索结果
|
|
@@ -777,6 +784,12 @@ type SelectBaseOptions<T> = {
|
|
|
777
784
|
* - 仅针对【单选模式】生效
|
|
778
785
|
*/
|
|
779
786
|
showPath?: boolean;
|
|
787
|
+
/**
|
|
788
|
+
* 是否显示【清空已选】按钮
|
|
789
|
+
* - true:则在弹窗的底部显示【清空已选】按钮,点击时清空所有已选选项
|
|
790
|
+
* - 若存在多级选项,仅在第一级弹窗中显示
|
|
791
|
+
*/
|
|
792
|
+
showClear?: boolean;
|
|
780
793
|
/**
|
|
781
794
|
* 选择项 follow弹窗样式
|
|
782
795
|
* - 支持指定弹窗高度,如最大高度,不指定则默认尽可能展示全
|
|
@@ -789,7 +802,7 @@ type SelectBaseOptions<T> = {
|
|
|
789
802
|
type SelectBaseEvents<T> = {
|
|
790
803
|
/**
|
|
791
804
|
* 选中的【选择项】改变时
|
|
792
|
-
* - @param values
|
|
805
|
+
* - @param values 已选的【选择项】:单选时,为【选择项】路径(父->子);其他情况为已选的【选择项】
|
|
793
806
|
*/
|
|
794
807
|
change: [values: SelectItem<T>[]];
|
|
795
808
|
};
|
|
@@ -807,7 +820,22 @@ type SelectItem<T> = TreeNode<T, TreeNodeExtend & {
|
|
|
807
820
|
/**
|
|
808
821
|
* 选项菜单组件 配置选项
|
|
809
822
|
*/
|
|
810
|
-
type SelectOptions<T> = ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<T> & {
|
|
823
|
+
type SelectOptions<T> = ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<T> & {
|
|
824
|
+
/** 父类<see cref="SelectBaseOptions"/>已有属性:
|
|
825
|
+
* items 【选择项】集合
|
|
826
|
+
* search 启用 【搜索】功能
|
|
827
|
+
* searchPlaceholder 搜索框提示语
|
|
828
|
+
* multiple 是否【多选模式】
|
|
829
|
+
* showPath 显示选项路径
|
|
830
|
+
* popupStyle 弹出的选项选择窗体样式
|
|
831
|
+
*/
|
|
832
|
+
/**
|
|
833
|
+
* 禁用【值的路径】
|
|
834
|
+
* - 仅在 multiple 不为 true 时生效
|
|
835
|
+
* - 为true时,则v-model绑定时为单个值而非数组
|
|
836
|
+
*/
|
|
837
|
+
valuePathDisabled?: boolean;
|
|
838
|
+
};
|
|
811
839
|
/**
|
|
812
840
|
* 选项菜单 组件 事件
|
|
813
841
|
*/
|
|
@@ -862,6 +890,20 @@ type SelectPopupOptions<T> = SelectBaseOptions<T> & {
|
|
|
862
890
|
*/
|
|
863
891
|
level: number;
|
|
864
892
|
};
|
|
893
|
+
/**
|
|
894
|
+
* 【选项菜单】 弹窗组件事件
|
|
895
|
+
*/
|
|
896
|
+
type SelectPopupEvents<T> = {
|
|
897
|
+
/**
|
|
898
|
+
* 清空选项
|
|
899
|
+
*/
|
|
900
|
+
clear: [];
|
|
901
|
+
/**
|
|
902
|
+
* 选项点击事件
|
|
903
|
+
* @param path 选中的【选择项】路径;父->子
|
|
904
|
+
*/
|
|
905
|
+
click: [path: SelectItem<T>[]];
|
|
906
|
+
};
|
|
865
907
|
/**
|
|
866
908
|
* 【选项菜单】 弹窗组件扩展
|
|
867
909
|
*/
|
|
@@ -939,6 +981,18 @@ type IconOptions = TitleOptions & {
|
|
|
939
981
|
* 图标大小:默认24
|
|
940
982
|
*/
|
|
941
983
|
size?: number;
|
|
984
|
+
/**
|
|
985
|
+
* 轮廓描边颜色
|
|
986
|
+
* - 配合 strokeWidth 使用,完成图标加粗效果等
|
|
987
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/SVG/Reference/Attribute/stroke
|
|
988
|
+
*/
|
|
989
|
+
stroke?: string;
|
|
990
|
+
/**
|
|
991
|
+
* 轮廓宽度
|
|
992
|
+
* - 配合 stroke 使用,完成图标加粗效果等
|
|
993
|
+
* @see https://developer.mozilla.org/zh-CN/docs/Web/SVG/Reference/Attribute/stroke-width
|
|
994
|
+
*/
|
|
995
|
+
strokeWidth?: number;
|
|
942
996
|
/**
|
|
943
997
|
* 图标绘制路径
|
|
944
998
|
* - 等效 svg-path的d属性
|
|
@@ -968,10 +1022,12 @@ type IconOptions = TitleOptions & {
|
|
|
968
1022
|
* - 指向类:
|
|
969
1023
|
* - - arrow 向右箭头
|
|
970
1024
|
* - 其他类:
|
|
1025
|
+
* - - plus 加号
|
|
1026
|
+
* - - subtract 减号
|
|
971
1027
|
* - - grip 紧握图标,垂直方向,一般用于拖动句柄
|
|
972
1028
|
* - - custom 自定义图标:此时IconOptions.draw属性传入绘制路径
|
|
973
1029
|
*/
|
|
974
|
-
type IconType = "success" | "error" | "warn" | "close" | "trash" | "download" | "print" | "edit" | "arrow" | "grip" | "custom";
|
|
1030
|
+
type IconType = "success" | "error" | "warn" | "close" | "trash" | "download" | "print" | "edit" | "arrow" | "plus" | "subtract" | "grip" | "custom";
|
|
975
1031
|
|
|
976
1032
|
/**
|
|
977
1033
|
* 检查选项 数据结构
|
|
@@ -1231,11 +1287,11 @@ declare function triggerAppCreated(app: App, type?: AppType): App;
|
|
|
1231
1287
|
|
|
1232
1288
|
/**
|
|
1233
1289
|
* 基于类型获取Svg图标绘制路径
|
|
1234
|
-
* @param
|
|
1235
|
-
* @param
|
|
1290
|
+
* @param iconType 图标类型
|
|
1291
|
+
* @param draw 绘制路径;自定义时生效
|
|
1236
1292
|
* @returns 图标路径
|
|
1237
1293
|
*/
|
|
1238
|
-
declare function getSvgDraw(
|
|
1294
|
+
declare function getSvgDraw(iconType: IconType, draw: string[] | string): string[];
|
|
1239
1295
|
|
|
1240
1296
|
/**
|
|
1241
1297
|
* 排序组件 配置选项
|
|
@@ -1863,13 +1919,15 @@ declare const components: {
|
|
|
1863
1919
|
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1864
1920
|
Select: {
|
|
1865
1921
|
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
|
|
1866
|
-
|
|
1922
|
+
valuePathDisabled?: boolean;
|
|
1923
|
+
} & {
|
|
1924
|
+
modelValue?: SelectItem<any>[] | SelectItem<any>;
|
|
1867
1925
|
}> & Readonly<{
|
|
1868
1926
|
onChange?: (values: SelectItem<any>[]) => any;
|
|
1869
|
-
"onUpdate:modelValue"?: (value: SelectItem<any>[]) => any;
|
|
1927
|
+
"onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
|
|
1870
1928
|
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1871
1929
|
change: (values: SelectItem<any>[]) => any;
|
|
1872
|
-
"update:modelValue": (value: SelectItem<any>[]) => any;
|
|
1930
|
+
"update:modelValue": (value: SelectItem<any> | SelectItem<any>[]) => any;
|
|
1873
1931
|
}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
|
|
1874
1932
|
P: {};
|
|
1875
1933
|
B: {};
|
|
@@ -1878,22 +1936,26 @@ declare const components: {
|
|
|
1878
1936
|
M: {};
|
|
1879
1937
|
Defaults: {};
|
|
1880
1938
|
}, Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
|
|
1881
|
-
|
|
1939
|
+
valuePathDisabled?: boolean;
|
|
1940
|
+
} & {
|
|
1941
|
+
modelValue?: SelectItem<any>[] | SelectItem<any>;
|
|
1882
1942
|
}> & Readonly<{
|
|
1883
1943
|
onChange?: (values: SelectItem<any>[]) => any;
|
|
1884
|
-
"onUpdate:modelValue"?: (value: SelectItem<any>[]) => any;
|
|
1944
|
+
"onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
|
|
1885
1945
|
}>, {}, {}, {}, {}, {}>;
|
|
1886
1946
|
__isFragment?: never;
|
|
1887
1947
|
__isTeleport?: never;
|
|
1888
1948
|
__isSuspense?: never;
|
|
1889
1949
|
} & vue.ComponentOptionsBase<Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
|
|
1890
|
-
|
|
1950
|
+
valuePathDisabled?: boolean;
|
|
1951
|
+
} & {
|
|
1952
|
+
modelValue?: SelectItem<any>[] | SelectItem<any>;
|
|
1891
1953
|
}> & Readonly<{
|
|
1892
1954
|
onChange?: (values: SelectItem<any>[]) => any;
|
|
1893
|
-
"onUpdate:modelValue"?: (value: SelectItem<any>[]) => any;
|
|
1955
|
+
"onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
|
|
1894
1956
|
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1895
1957
|
change: (values: SelectItem<any>[]) => any;
|
|
1896
|
-
"update:modelValue": (value: SelectItem<any>[]) => any;
|
|
1958
|
+
"update:modelValue": (value: SelectItem<any> | SelectItem<any>[]) => any;
|
|
1897
1959
|
}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
1898
1960
|
$slots: {
|
|
1899
1961
|
default?: (props: {
|
|
@@ -2321,4 +2383,4 @@ declare const components: {
|
|
|
2321
2383
|
};
|
|
2322
2384
|
|
|
2323
2385
|
export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
|
|
2324
|
-
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, SelectPopupExtend, SelectPopupOptions, SelectSlotOptions, SortEvents, SortOptions, SwitchEvents, SwitchOptions, TableColOptions, TableOptions, TableRowOptions, TitleOptions, ToastOptions, TreeEvents, TreeNode, TreeNodeEvents, TreeNodeExtend, TreeNodeModel, TreeNodeOptions, TreeNodeRenderOptions, TreeNodeSlotOptions, TreeOptions, TreeSearchResult, WrapperEvents, WrapperOptions };
|
|
2386
|
+
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, WrapperEvents, WrapperOptions };
|