snail.vue 1.0.49 → 1.0.51

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.
@@ -96,6 +96,17 @@ type DisabledOptions = {
96
96
  */
97
97
  disabled?: boolean;
98
98
  };
99
+ /**
100
+ * 值 配置选项
101
+ */
102
+ type ValueOptions<T> = {
103
+ /**
104
+ * 已有值
105
+ * - 用于渲染组件时,传入已有数据;
106
+ * - 具体传值规则,有组件自己决定
107
+ */
108
+ value?: T;
109
+ };
99
110
  /**
100
111
  * 确认区域 配置选项
101
112
  * - 约束 确认区域 的 确定、取消 按钮
@@ -802,7 +813,7 @@ type SelectBaseOptions<T> = {
802
813
  type SelectBaseEvents<T> = {
803
814
  /**
804
815
  * 选中的【选择项】改变时
805
- * - @param values 已选的【选择项】:单选时,为【选择项】路径(父->子);其他情况为已选的【选择项】
816
+ * - @param values 已选的【选择项】,未选中则为空数组:单选时,为【选择项】路径(父->子);其他情况为已选的【选择项】
806
817
  */
807
818
  change: [values: SelectItem<T>[]];
808
819
  };
@@ -819,23 +830,9 @@ type SelectItem<T> = TreeNode<T, TreeNodeExtend & {
819
830
  }>;
820
831
  /**
821
832
  * 选项菜单组件 配置选项
833
+ * - value 已选的【选择项】;单选时,为【选择项】路径(父->子);其他情况为已选的【选择项】
822
834
  */
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
- };
835
+ type SelectOptions<T> = ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<T> & ValueOptions<SelectItem<T>[]> & {};
839
836
  /**
840
837
  * 选项菜单 组件 事件
841
838
  */
@@ -1918,16 +1915,10 @@ declare const components: {
1918
1915
  "onUpdate:modelValue"?: (value: string) => any;
1919
1916
  }>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
1920
1917
  Select: {
1921
- new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
1922
- valuePathDisabled?: boolean;
1923
- } & {
1924
- modelValue?: SelectItem<any>[] | SelectItem<any>;
1925
- }> & Readonly<{
1918
+ new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<SelectOptions<any>> & Readonly<{
1926
1919
  onChange?: (values: SelectItem<any>[]) => any;
1927
- "onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
1928
1920
  }>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1929
1921
  change: (values: SelectItem<any>[]) => any;
1930
- "update:modelValue": (value: SelectItem<any> | SelectItem<any>[]) => any;
1931
1922
  }, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {}, any, vue.ComponentProvideOptions, {
1932
1923
  P: {};
1933
1924
  B: {};
@@ -1935,27 +1926,16 @@ declare const components: {
1935
1926
  C: {};
1936
1927
  M: {};
1937
1928
  Defaults: {};
1938
- }, Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
1939
- valuePathDisabled?: boolean;
1940
- } & {
1941
- modelValue?: SelectItem<any>[] | SelectItem<any>;
1942
- }> & Readonly<{
1929
+ }, Readonly<SelectOptions<any>> & Readonly<{
1943
1930
  onChange?: (values: SelectItem<any>[]) => any;
1944
- "onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
1945
1931
  }>, {}, {}, {}, {}, {}>;
1946
1932
  __isFragment?: never;
1947
1933
  __isTeleport?: never;
1948
1934
  __isSuspense?: never;
1949
- } & vue.ComponentOptionsBase<Readonly<ReadonlyOptions & PlaceholderOptions & SelectBaseOptions<any> & {
1950
- valuePathDisabled?: boolean;
1951
- } & {
1952
- modelValue?: SelectItem<any>[] | SelectItem<any>;
1953
- }> & Readonly<{
1935
+ } & vue.ComponentOptionsBase<Readonly<SelectOptions<any>> & Readonly<{
1954
1936
  onChange?: (values: SelectItem<any>[]) => any;
1955
- "onUpdate:modelValue"?: (value: SelectItem<any> | SelectItem<any>[]) => any;
1956
1937
  }>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
1957
1938
  change: (values: SelectItem<any>[]) => any;
1958
- "update:modelValue": (value: SelectItem<any> | SelectItem<any>[]) => any;
1959
1939
  }, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
1960
1940
  $slots: {
1961
1941
  default?: (props: {
@@ -2383,4 +2363,4 @@ declare const components: {
2383
2363
  };
2384
2364
 
2385
2365
  export { components, getSvgDraw, mount, onAppCreated, triggerAppCreated, usePopup, useReactive, useTreeContext };
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 };
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 };