@opentiny/vue-renderless 3.18.3 → 3.18.5

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.
@@ -60,9 +60,9 @@ const handleFocus = ({
60
60
  api.debouncedGetData(props.modelValue);
61
61
  }
62
62
  };
63
- const handleBlur = ({ emit, state, dispatch, props }) => (event) => {
63
+ const handleBlur = ({ emit, state, dispatch, props }) => () => {
64
64
  state.suggestionDisabled = true;
65
- emit("blur", event);
65
+ emit("blur");
66
66
  if (state.validateEvent) {
67
67
  dispatch(FORM_ITEM, FORM_EVENT.blur, [props.modelValue]);
68
68
  }
@@ -99,10 +99,15 @@ const select = ({
99
99
  emit,
100
100
  nextTick,
101
101
  props,
102
- state
102
+ state,
103
+ dispatch
103
104
  }) => (item) => {
104
- emit("update:modelValue", item[props.valueKey]);
105
+ const value = item[props.valueKey];
106
+ emit("update:modelValue", value);
105
107
  emit("select", item);
108
+ if (state.validateEvent) {
109
+ dispatch(FORM_ITEM, FORM_EVENT.change, [value]);
110
+ }
106
111
  nextTick(() => {
107
112
  state.activated = false;
108
113
  state.suggestions = [];
@@ -19,7 +19,6 @@ import {
19
19
  } from "./index";
20
20
  const api = [
21
21
  "state",
22
- "select",
23
22
  "suggestionState",
24
23
  "getInput",
25
24
  "handleChange",
@@ -95,7 +94,7 @@ const initApi = ({
95
94
  mounted: mounted({ vm, state, suggestionState }),
96
95
  highlight: highlight({ constants, vm, state }),
97
96
  handleClear: handleClear({ emit, state }),
98
- select: select({ emit, nextTick, props, state }),
97
+ select: select({ emit, nextTick, props, state, dispatch }),
99
98
  watchVisible: watchVisible({ suggestionState, vm }),
100
99
  handleChange: handleChange({ api: api2, emit, state, props, dispatch }),
101
100
  handleFocus: handleFocus({ api: api2, emit, props, state }),
package/common/index.js CHANGED
@@ -237,7 +237,7 @@ const CASCADER = {
237
237
  PropsHover: "hoverThreshold",
238
238
  MenuConnector: "cascader-menu-"
239
239
  };
240
- const version = "3.18.3";
240
+ const version = "3.18.5";
241
241
  const log = (data, type = "log") => {
242
242
  uLog.logger[type](data);
243
243
  };
package/common/runtime.js CHANGED
@@ -22,7 +22,7 @@ import vuePopup from "./deps/vue-popup";
22
22
  import validate from "./validate";
23
23
  import memorize from "./deps/memorize";
24
24
  import * as common from ".";
25
- const version = "3.18.3";
25
+ const version = "3.18.5";
26
26
  const Renderless = {
27
27
  browser,
28
28
  array,
@@ -3,6 +3,40 @@ import {
3
3
  __spreadValues
4
4
  } from "../chunk-G2ADBYYC.js";
5
5
  import { isNull } from "../common/type";
6
+ const fontFamilyConfig = [
7
+ "songti",
8
+ "yahei",
9
+ "kaiti",
10
+ "heiti",
11
+ "lishu",
12
+ "mono",
13
+ "arial",
14
+ "arialblack",
15
+ "comic",
16
+ "impact",
17
+ "times"
18
+ ];
19
+ const fontSizeConfig = [
20
+ "12px",
21
+ "13px",
22
+ "14px",
23
+ "15px",
24
+ "16px",
25
+ "17px",
26
+ "18px",
27
+ "19px",
28
+ "20px",
29
+ "22px",
30
+ "24px",
31
+ "26px",
32
+ "29px",
33
+ "32px",
34
+ "36px",
35
+ "40px",
36
+ "48px",
37
+ "72px"
38
+ ];
39
+ const lineHeightConfig = ["1", "1.2", "1.5", "2", "2.5", "3", "4", "5"];
6
40
  const betterTable = {
7
41
  operationMenu: {
8
42
  items: {
@@ -22,7 +56,7 @@ const betterTable = {
22
56
  color: true
23
57
  }
24
58
  };
25
- const toolbar = (FluentEditor) => {
59
+ const toolbar = () => {
26
60
  const underline = ["bold", "italic", "underline", "strike"];
27
61
  const list = [{ list: "ordered" }, { list: "bullet" }];
28
62
  const script = [{ script: "sub" }, { script: "super" }];
@@ -30,9 +64,9 @@ const toolbar = (FluentEditor) => {
30
64
  container: [
31
65
  ["undo", "redo", "clean"],
32
66
  [
33
- { font: FluentEditor.imports["formats/font"].whitelist },
34
- { size: FluentEditor.imports["formats/size"].whitelist },
35
- { lineheight: FluentEditor.imports["formats/lineheight"].whitelist },
67
+ { font: fontFamilyConfig },
68
+ { size: fontSizeConfig },
69
+ { lineheight: lineHeightConfig },
36
70
  { header: [1, 2, 3, 4, 5, 6, false] }
37
71
  ],
38
72
  underline,
@@ -155,7 +189,7 @@ const defaultOption = ({ FluentEditor, state, mentionObj }) => {
155
189
  // 上传文件需开启
156
190
  image: FluentEditor.imports["modules/image-spec"],
157
191
  counter: false,
158
- toolbar: toolbar(FluentEditor),
192
+ toolbar: toolbar(),
159
193
  "better-table": betterTable,
160
194
  mention: mention(mentionObj),
161
195
  keyboard: keyboard({ FluentEditor, state })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.18.3",
3
+ "version": "3.18.5",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "author": "OpenTiny Team",
6
6
  "license": "MIT",
@@ -133,7 +133,7 @@ declare const handleFocus: ({ api, emit, props, state }: {
133
133
  state: IAutoCompleteState;
134
134
  props: IAutoCompleteProps;
135
135
  }) => (event: any) => void;
136
- declare const handleBlur: ({ emit, state, dispatch, props }: Pick<IAutoCompleteRenderlessParams, 'emit' | 'state' | 'dispatch' | 'props'>) => (event: any) => void;
136
+ declare const handleBlur: ({ emit, state, dispatch, props }: Pick<IAutoCompleteRenderlessParams, 'emit' | 'state' | 'dispatch' | 'props'>) => () => void;
137
137
  declare const handleClear: ({ emit, state }: {
138
138
  emit: IAutoCompleteRenderlessParamUtils['emit'];
139
139
  state: IAutoCompleteState;
@@ -146,7 +146,7 @@ declare const handleKeyEnter: ({ api, emit, nextTick, props, state }: {
146
146
  props: IAutoCompleteProps;
147
147
  state: IAutoCompleteState;
148
148
  }) => (event: any) => void;
149
- declare const select: ({ emit, nextTick, props, state }: {
149
+ declare const select: ({ emit, nextTick, props, state, dispatch }: {
150
150
  emit: IAutoCompleteRenderlessParamUtils['emit'];
151
151
  nextTick: IAutoCompleteRenderlessParamUtils['nextTick'];
152
152
  props: IAutoCompleteProps;
@@ -82,6 +82,10 @@ declare const dropdownItemProps: {
82
82
  type: StringConstructor;
83
83
  default: string;
84
84
  };
85
+ effect: {
86
+ type: StringConstructor;
87
+ default: string;
88
+ };
85
89
  tiny_mode: StringConstructor;
86
90
  tiny_mode_root: BooleanConstructor;
87
91
  tiny_template: (FunctionConstructor | ObjectConstructor)[];
@@ -1,4 +1,4 @@
1
1
  import 'vue';
2
- export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-678794c9.js';
2
+ export { k as IDropdownItemApi, i as IDropdownItemConstants, q as IDropdownItemMfDataStore, p as IDropdownItemOptionStyle, h as IDropdownItemProps, m as IDropdownItemRenderlessParamUtils, l as IDropdownItemRenderlessParams, j as IDropdownItemState, n as IDropdownItemStyle, o as IDropdownItemTag, g as IDropdownItemVm } from './dropdown-item.type-16d59fd0.js';
3
3
  import './shared.type.js';
4
4
  import './dropdown.type.js';
@@ -1,4 +1,4 @@
1
1
  import 'vue';
2
- export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-678794c9.js';
2
+ export { b as IDropdownMenuApi, e as IDropdownMenuPopperParams, I as IDropdownMenuProps, d as IDropdownMenuRenderlessParamUtils, c as IDropdownMenuRenderlessParams, a as IDropdownMenuState, f as IDropdownMenuVm } from './dropdown-item.type-16d59fd0.js';
3
3
  import './shared.type.js';
4
4
  import './dropdown.type.js';