shineout 3.9.0-beta.3 → 3.9.0-beta.31

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.0-beta.3'
525
+ version: '3.9.0-beta.31'
526
526
  };
@@ -8,13 +8,13 @@ export type ModalFunctionOptions = Omit<ModalOptions, 'jssStyle'>;
8
8
  * @title ModalMethods
9
9
  * @cn Modal 提供了一组方法供全局调用,这些方法生成的元素,会在关闭后销毁。
10
10
  * 该组方法应仅供展示所用, 如果需要数据交互, 请使用 Modal。
11
- * Modal.info(options) // 提示信息
12
- * Modal.success(options) // 成功信息
13
- * Modal.warning(options) // 警告信息
14
- * Modal.error(options) // 错误信息
15
- * Modal.confirm(options) // 确认信息
16
- * Modal.show(options) // 普通信息
17
- * Modal.closeAll // 关闭所有Modal
11
+ * - `Modal.info(options)` 提示信息
12
+ * - `Modal.success(options)` 成功信息
13
+ * - `Modal.warn(options)` 警告信息
14
+ * - `Modal.error(options)` 错误信息
15
+ * - `Modal.confirm(options)` 确认信息
16
+ * - `Modal.show(options)` 普通信息
17
+ * - `Modal.closeAll` 关闭所有Modal
18
18
  * options 支持 Modal除了 destory, visible 的其他任何属性, 此外还有如下的额外属性:
19
19
  */
20
20
  export type ModalFunctionExternalOptions = Omit<ModalFunctionOptions, keyof ModalProps>;
@@ -9,7 +9,7 @@ export declare function textContentTest(element: Element, text: string | null |
9
9
  export declare function classContentTest(element: Element, name: string, bool?: boolean): void;
10
10
  export declare function styleTest(element: Element, style: string | null): void;
11
11
  export declare function styleContainTest(element: Element, styleObject: object): void;
12
- export declare function styleContentTest(element: Element, name: string, bool?: boolean): void;
12
+ export declare function styleContentTest(element: Element, styles: string | string[], bool?: boolean): void;
13
13
  export interface StyleProps {
14
14
  [key: string]: string;
15
15
  }
@@ -87,10 +87,19 @@ function styleTest(element, style) {
87
87
  function styleContainTest(element, styleObject) {
88
88
  expect(element.style).toEqual(expect.objectContaining(styleObject));
89
89
  }
90
- function styleContentTest(element, name) {
91
- var _element$getAttribute2;
90
+ function styleContentTest(element, styles) {
92
91
  var bool = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
93
- expect((_element$getAttribute2 = element.getAttribute('style')) === null || _element$getAttribute2 === void 0 ? void 0 : _element$getAttribute2.includes(name)).toBe(bool);
92
+ var elementStyle = element.getAttribute('style');
93
+ if (Array.isArray(styles)) {
94
+ // 如果是数组,检查每个样式属性是否都存在
95
+ var allMatch = styles.every(function (style) {
96
+ return elementStyle === null || elementStyle === void 0 ? void 0 : elementStyle.includes(style);
97
+ });
98
+ expect(allMatch).toBe(bool);
99
+ } else {
100
+ // 原有的字符串匹配方式
101
+ expect(elementStyle === null || elementStyle === void 0 ? void 0 : elementStyle.includes(styles)).toBe(bool);
102
+ }
94
103
  }
95
104
  function baseTest(Component, selector) {
96
105
  var styleV = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
@@ -5,7 +5,7 @@ export type BaseUploadButtonProps<T> = Omit<UnStyledUploadButtonProps<T>, 'jssSt
5
5
  export type UploadButtonProps<T> = GetWithFieldProps<BaseUploadButtonProps<T>, BaseUploadButtonProps<T>['value']>;
6
6
  /**
7
7
  * @title Upload.Button
8
- * @cn 基本API 和 Upload 一致,特定API如下
8
+ * @cn 不支持这些API: listType, imageStyle, canDelete, showUploadList, customResult, multiple, leftHandler, onPreview, renderContent, recoverAble,其他API 和 Upload 一致,特有API如下
9
9
  * @en The basic API is consistent with Upload, and the specific API is as follows
10
10
  * @sort 2
11
11
  */