@cloudbase/weda-ui 3.8.0 → 3.8.1

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.
@@ -108,6 +108,10 @@ export declare const configInfo: {
108
108
  readonly name: "布局导航头部";
109
109
  readonly selector: ".wd-menulayout-header";
110
110
  readonly description: "可以为布局导航头部编写样式";
111
+ }, {
112
+ readonly name: "布局导航品牌插槽";
113
+ readonly selector: ".wd-menulayout-header__logo-wrap";
114
+ readonly description: "可以为布局导航品牌插槽编写样式";
111
115
  }, {
112
116
  readonly name: "布局导航主体";
113
117
  readonly selector: ".wd-menulayout-body";
@@ -312,6 +316,10 @@ declare const config: {
312
316
  readonly name: "布局导航头部";
313
317
  readonly selector: ".wd-menulayout-header";
314
318
  readonly description: "可以为布局导航头部编写样式";
319
+ }, {
320
+ readonly name: "布局导航品牌插槽";
321
+ readonly selector: ".wd-menulayout-header__logo-wrap";
322
+ readonly description: "可以为布局导航品牌插槽编写样式";
315
323
  }, {
316
324
  readonly name: "布局导航主体";
317
325
  readonly selector: ".wd-menulayout-body";
@@ -166,6 +166,11 @@ export const configInfo = {
166
166
  selector: '.wd-menulayout-header',
167
167
  description: '可以为布局导航头部编写样式',
168
168
  },
169
+ {
170
+ name: '布局导航品牌插槽',
171
+ selector: '.wd-menulayout-header__logo-wrap',
172
+ description: '可以为布局导航品牌插槽编写样式',
173
+ },
169
174
  {
170
175
  name: '布局导航主体',
171
176
  selector: '.wd-menulayout-body',
@@ -18714,6 +18714,10 @@ export declare const components: {
18714
18714
  readonly name: "布局导航头部";
18715
18715
  readonly selector: ".wd-menulayout-header";
18716
18716
  readonly description: "可以为布局导航头部编写样式";
18717
+ }, {
18718
+ readonly name: "布局导航品牌插槽";
18719
+ readonly selector: ".wd-menulayout-header__logo-wrap";
18720
+ readonly description: "可以为布局导航品牌插槽编写样式";
18717
18721
  }, {
18718
18722
  readonly name: "布局导航主体";
18719
18723
  readonly selector: ".wd-menulayout-body";
@@ -38802,6 +38806,10 @@ declare const _default: {
38802
38806
  readonly name: "布局导航头部";
38803
38807
  readonly selector: ".wd-menulayout-header";
38804
38808
  readonly description: "可以为布局导航头部编写样式";
38809
+ }, {
38810
+ readonly name: "布局导航品牌插槽";
38811
+ readonly selector: ".wd-menulayout-header__logo-wrap";
38812
+ readonly description: "可以为布局导航品牌插槽编写样式";
38805
38813
  }, {
38806
38814
  readonly name: "布局导航主体";
38807
38815
  readonly selector: ".wd-menulayout-body";
@@ -497,10 +497,6 @@ export const getItems = (template = 'horizontal') => {
497
497
  id: 'headSlot',
498
498
  component: '',
499
499
  },
500
- {
501
- id: 'headRightSlot',
502
- component: '',
503
- },
504
500
  ]);
505
501
  }
506
502
  else if (template === 'base') {
@@ -513,10 +509,6 @@ export const getItems = (template = 'horizontal') => {
513
509
  id: 'headSlot',
514
510
  component: '',
515
511
  },
516
- {
517
- id: 'headRightSlot',
518
- component: '',
519
- },
520
512
  ]);
521
513
  }
522
514
  else {
@@ -4,6 +4,7 @@ import './style';
4
4
  import type { CommonFormPropsType } from '../types';
5
5
  import { IUseoptionsParams } from './request';
6
6
  import { TSingleForeignFormat } from './formats-util';
7
+ import { AttachContainer } from 'tea-component/lib/_util/get-overlay-root';
7
8
  export declare const moment: any;
8
9
  declare const Select: React.NamedExoticComponent<PropsType>;
9
10
  export default Select;
@@ -57,6 +58,7 @@ export interface PropsType extends CommonFormPropsType {
57
58
  readOnly?: boolean;
58
59
  ignoreCase?: boolean;
59
60
  staticSearchable?: boolean;
61
+ popupContainer?: AttachContainer;
60
62
  }
61
63
  export declare const defaultProps: {
62
64
  events: {};
@@ -70,7 +70,7 @@ export const defaultProps = {
70
70
  separator: ',',
71
71
  };
72
72
  // const button = <Button type="icon" icon="more" />;
73
- function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, enumName, defaultValue, placeholder = '请选择', mode = 'selector', dateMode = 'day', events = emptyObject, disabled = false, range = defaultProps.range, startDate, endDate, defaultDate, defaultTime, startTime, endTime, defaultRegion, defaultMutiRegion, regionType, separator = defaultProps.separator, size = defaultProps.size, clearable = false, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, }) {
73
+ function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, enumName, defaultValue, placeholder = '请选择', mode = 'selector', dateMode = 'day', events = emptyObject, disabled = false, range = defaultProps.range, startDate, endDate, defaultDate, defaultTime, startTime, endTime, defaultRegion, defaultMutiRegion, regionType, separator = defaultProps.separator, size = defaultProps.size, clearable = false, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, popupContainer, }) {
74
74
  const { classPrefix } = useConfig();
75
75
  // 两次默认值不同, 需要刷新
76
76
  const prevDefaultRef = React.useRef();
@@ -251,5 +251,5 @@ function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, e
251
251
  }
252
252
  };
253
253
  const dropdown = createDropdown();
254
- return _jsx(ConfigProvider, { classPrefix: "wedatea2td", children: dropdown });
254
+ return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", popupContainer: popupContainer, children: dropdown }));
255
255
  }
@@ -23,6 +23,7 @@ export function ImageUploaderH5({ title: label, maxUploadCount, maxSize = 10, ac
23
23
  'weda-ui': true,
24
24
  [className]: className,
25
25
  });
26
+ const inputRef = React.useRef(null);
26
27
  // 上传中
27
28
  const [uploading, setUploading] = React.useState(false);
28
29
  //上传进度
@@ -173,7 +174,11 @@ export function ImageUploaderH5({ title: label, maxUploadCount, maxSize = 10, ac
173
174
  };
174
175
  return (_jsx("div", { className: cls, id: id, style: style, children: _jsxs("div", { className: classNames('weui-uploader weui-cells weui-cells_form weda-formcells', layout, layoutCls), children: [_jsx("div", { className: classNames('weui-uploader__hd', layout), children: _jsx(UploaderLabel, { layout: layout, label: label, labelVisible: labelVisible, currentCount: fileIdList.length, maxCount: finalMaxImgCount, requiredFlag: requiredFlag }) }), _jsxs("div", { className: "weui-uploader__bd", children: [_jsxs("ul", { className: "weui-uploader__files", id: "uploaderFiles", children: [(fileIdList !== null && fileIdList !== void 0 ? fileIdList : []).map((f) => (_jsx(SingleImage, { src: f, deleteBySrc: deleteFile, disabled: disabled || readOnly || sourceType === 'album', imgTypeCls: imgTypeCls }, f))), fileIdList.length < 1 && readOnly && _jsx(_Fragment, { children: "\u2014" }), uploading && (_jsx("li", { className: `weui-uploader__file weui-uploader__file_status ${imgTypeCls}`, children: _jsxs("div", { className: "weui-uploader__file-content", children: [progress, "%"] }) }))] }), showAdd && !readOnly && (_jsx("div", { className: `weui-uploader__input-box ${imgTypeCls}`, children: !disabled &&
175
176
  sourceType !== 'album' &&
176
- (sourceType === 'camera' ? (_jsx("input", { "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), capture: true, onChange: uploadChange })) : (_jsx("input", { "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), onChange: uploadChange }))) }))] })] }) }));
177
+ (sourceType === 'camera' ? (_jsx("input", { ref: inputRef, onClick: () => {
178
+ inputRef.current && (inputRef.current.value = '');
179
+ }, "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), capture: true, onChange: uploadChange })) : (_jsx("input", { ref: inputRef, onClick: () => {
180
+ inputRef.current && (inputRef.current.value = '');
181
+ }, "data-testid": "uploaderh5_input", id: "uploaderInput", className: "weui-uploader__input", type: "file", accept: accepts.join(','), multiple: !single && !(browserEnv().android && browserEnv().weixin), onChange: uploadChange }))) }))] })] }) }));
177
182
  }
178
183
  function SingleImage({ src, deleteBySrc, disabled, imgTypeCls, }) {
179
184
  const cls = classNames({
@@ -48,6 +48,7 @@ events = emptyObject, defaultValue, uploadPath = 'weda-uploader', single = true,
48
48
  // 两次默认值不同, 需要刷新
49
49
  const prevDefaultRef = React.useRef([]);
50
50
  const fileRef = React.useRef(fileIDList);
51
+ const inputRef = React.useRef(null);
51
52
  const maxSizeLimit = maxSize;
52
53
  const formType = ((_a = getParentForm($node)) === null || _a === void 0 ? void 0 : _a.formType) || 'create';
53
54
  const changeTypeRef = React.useRef('');
@@ -131,7 +132,9 @@ events = emptyObject, defaultValue, uploadPath = 'weda-uploader', single = true,
131
132
  isEdit,
132
133
  events,
133
134
  fileSizeObj,
134
- }, children: _jsx("div", { "data-testid": "uploadFileH5", className: cls, id: id, style: style, children: _jsxs("div", { className: classNames(`${CLASS_PREFIX}`), children: [isEdit && (_jsx("div", { className: classNames(`${CLASS_PREFIX}__hd`, layout), children: _jsx("div", { children: btnDisabled ? (readOnly ? null : (_jsx(WdButton, { variant: "outline", className: classNames(`${CLASS_PREFIX}__btn--weak`), disabled: btnDisabled, text: btnTitle }))) : (_jsxs("div", { children: [_jsx("input", { id: "uploaderInput", type: "file", "data-testid": "button-up", className: "weui-uploader-mobile__input", accept: accepts.join(','), multiple: !single, onChange: async (e) => {
135
+ }, children: _jsx("div", { "data-testid": "uploadFileH5", className: cls, id: id, style: style, children: _jsxs("div", { className: classNames(`${CLASS_PREFIX}`), children: [isEdit && (_jsx("div", { className: classNames(`${CLASS_PREFIX}__hd`, layout), children: _jsx("div", { children: btnDisabled ? (readOnly ? null : (_jsx(WdButton, { variant: "outline", className: classNames(`${CLASS_PREFIX}__btn--weak`), disabled: btnDisabled, text: btnTitle }))) : (_jsxs("div", { children: [_jsx("input", { ref: inputRef, id: "uploaderInput", type: "file", "data-testid": "button-up", className: "weui-uploader-mobile__input", accept: accepts.join(','), multiple: !single, onClick: () => {
136
+ inputRef.current && (inputRef.current.value = '');
137
+ }, onChange: async (e) => {
135
138
  var _a, _b, _c, _d, _e, _f, _g, _h;
136
139
  let fileList = [...e.target.files];
137
140
  if (single && fileList.length > 1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",