yootd 0.0.56 → 0.0.58

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.
Files changed (68) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +43 -43
  3. package/dist/Preview/components/preview/phone.scss +8 -8
  4. package/dist/Preview/index.scss +35 -35
  5. package/dist/Preview/types/type.d.ts +22 -22
  6. package/dist/anchor/index.scss +23 -23
  7. package/dist/approval-process/index.scss +95 -95
  8. package/dist/areas/index.scss +21 -21
  9. package/dist/areas/types/types.d.ts +40 -40
  10. package/dist/areas-treeSelect/index.scss +6 -6
  11. package/dist/areas-treeSelect/types/type.d.ts +39 -39
  12. package/dist/aside/components/SortableItem.scss +93 -93
  13. package/dist/aside/index.scss +25 -25
  14. package/dist/aside/types/types.d.ts +44 -44
  15. package/dist/badge/index.scss +5 -5
  16. package/dist/buildings/types/types.d.ts +21 -21
  17. package/dist/button/index.scss +30 -30
  18. package/dist/cascader/index.scss +5 -5
  19. package/dist/courses/types/types.d.ts +18 -18
  20. package/dist/department/types/types.d.ts +23 -23
  21. package/dist/dictionary/types/types.d.ts +14 -14
  22. package/dist/drawer-modal/index.scss +39 -39
  23. package/dist/drawer-modal/types/types.d.ts +3 -3
  24. package/dist/dropdown/assets/arrow-down.svg +5 -5
  25. package/dist/dropdown-select/index.scss +6 -6
  26. package/dist/dropdown-select/types/type.d.ts +18 -18
  27. package/dist/empty/index.scss +15 -15
  28. package/dist/export/components/DownIcon.d.ts +3 -0
  29. package/dist/export/components/DownIcon.js +29 -0
  30. package/dist/export/components/UpIcon.d.ts +3 -0
  31. package/dist/export/components/UpIcon.js +28 -0
  32. package/dist/export/index.d.ts +5 -0
  33. package/dist/export/index.js +44 -0
  34. package/dist/export/index.scss +6 -0
  35. package/dist/go-back/components/index.scss +5 -5
  36. package/dist/go-back/index.scss +24 -24
  37. package/dist/group-title/index.scss +31 -31
  38. package/dist/hooks/useBem.js +10 -10
  39. package/dist/image/index.scss +26 -26
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.js +1 -0
  42. package/dist/input/index.scss +5 -5
  43. package/dist/job-title/types/types.d.ts +17 -17
  44. package/dist/modal/index.scss +76 -76
  45. package/dist/pagination/index.scss +47 -47
  46. package/dist/role/types/types.d.ts +22 -22
  47. package/dist/school/index.scss +21 -21
  48. package/dist/school/types/types.d.ts +85 -85
  49. package/dist/state/index.scss +89 -89
  50. package/dist/steps/index.scss +32 -32
  51. package/dist/student-dropdown/types/types.d.ts +44 -44
  52. package/dist/table/components/primary-header-row/index.scss +58 -58
  53. package/dist/table/components/primary-tbody-row/index.scss +5 -5
  54. package/dist/table/index.module.scss +9 -9
  55. package/dist/table/index.scss +33 -33
  56. package/dist/tabs/index.scss +86 -86
  57. package/dist/tag/index.scss +4 -4
  58. package/dist/teacher/types/types.d.ts +33 -33
  59. package/dist/tree/index.scss +25 -25
  60. package/dist/upload/index.scss +115 -115
  61. package/dist/user-dropdown/types/types.d.ts +45 -45
  62. package/dist/video-player/index.scss +310 -310
  63. package/dist/year-term/index.js +31 -8
  64. package/dist/year-term/index.scss +21 -21
  65. package/dist/year-term/types/types.d.ts +5 -1
  66. package/dist/zones/index.module.scss +23 -23
  67. package/dist/zones/types/types.d.ts +26 -26
  68. package/package.json +1 -1
@@ -1,39 +1,39 @@
1
- .yot-drawer {
2
- .ant-drawer-content-wrapper {
3
- max-width: 66.67vw;
4
- width: 100%;
5
- }
6
- .ant-drawer-header {
7
- background-color: var(--ant-color-bg-layout);
8
- .ant-drawer-header-title {
9
- font-size: 18px;
10
- font-weight: bold;
11
- .ant-drawer-close {
12
- display: none;
13
- }
14
- }
15
- }
16
- .ant-drawer-footer {
17
- padding: 0;
18
- }
19
- .ant-drawer-footer & {
20
- padding-left: 24px;
21
- padding-right: 24px;
22
- &-footer {
23
- padding: 8px 16px;
24
- }
25
- &__foot-confirm {
26
- width: 64px;
27
- height: 32px;
28
- }
29
- &__foot-close {
30
- width: 64px;
31
- height: 32px;
32
- background-color: var(--ant-color-bg-layout);
33
- margin-right: 8px;
34
- }
35
- }
36
- &__close {
37
- cursor: pointer;
38
- }
39
- }
1
+ .yot-drawer {
2
+ .ant-drawer-content-wrapper {
3
+ max-width: 66.67vw;
4
+ width: 100%;
5
+ }
6
+ .ant-drawer-header {
7
+ background-color: var(--ant-color-bg-layout);
8
+ .ant-drawer-header-title {
9
+ font-size: 18px;
10
+ font-weight: bold;
11
+ .ant-drawer-close {
12
+ display: none;
13
+ }
14
+ }
15
+ }
16
+ .ant-drawer-footer {
17
+ padding: 0;
18
+ }
19
+ .ant-drawer-footer & {
20
+ padding-left: 24px;
21
+ padding-right: 24px;
22
+ &-footer {
23
+ padding: 8px 16px;
24
+ }
25
+ &__foot-confirm {
26
+ width: 64px;
27
+ height: 32px;
28
+ }
29
+ &__foot-close {
30
+ width: 64px;
31
+ height: 32px;
32
+ background-color: var(--ant-color-bg-layout);
33
+ margin-right: 8px;
34
+ }
35
+ }
36
+ &__close {
37
+ cursor: pointer;
38
+ }
39
+ }
@@ -1,3 +1,3 @@
1
- export interface DrawerModalProps {
2
- onConfirm?: () => void;
3
- }
1
+ export interface DrawerModalProps {
2
+ onConfirm?: () => void;
3
+ }
@@ -1,6 +1,6 @@
1
- <svg t="1729587167155" class="icon" viewBox="0 0 1024 1024" version="1.1"
2
- xmlns="http://www.w3.org/2000/svg" p-id="3741" width="20" height="20">
3
- <path
4
- d="M474.282667 690.176L148.053333 363.904l45.226667-45.226667 318.72 318.72 318.72-318.72 45.226667 45.226667-326.229334 326.272a53.333333 53.333333 0 0 1-75.434666 0z"
5
- p-id="3742" fill="#1f1f1f"></path>
1
+ <svg t="1729587167155" class="icon" viewBox="0 0 1024 1024" version="1.1"
2
+ xmlns="http://www.w3.org/2000/svg" p-id="3741" width="20" height="20">
3
+ <path
4
+ d="M474.282667 690.176L148.053333 363.904l45.226667-45.226667 318.72 318.72 318.72-318.72 45.226667 45.226667-326.229334 326.272a53.333333 53.333333 0 0 1-75.434666 0z"
5
+ p-id="3742" fill="#1f1f1f"></path>
6
6
  </svg>
@@ -1,6 +1,6 @@
1
- .yot-dropdownselect {
2
- .ant-dropdown-menu-item.ant-dropdown-menu-item-active{
3
- background-color: #F0F8FF !important;
4
- }
5
- }
6
-
1
+ .yot-dropdownselect {
2
+ .ant-dropdown-menu-item.ant-dropdown-menu-item-active{
3
+ background-color: #F0F8FF !important;
4
+ }
5
+ }
6
+
@@ -1,18 +1,18 @@
1
- export interface DropdownSelectProps {
2
- defaultValue?: string; // 默认选中的key值
3
- items: MenuItemType[]; // 下拉菜单
4
- onChange?: (value: string) => void; // 选中值改变时触发
5
- arrow?: boolean; // 下拉箭头是否显示
6
- overlayClassName?: string; // 下拉菜单的样式
7
- autoAdjustOverflow?: boolean; // 下拉框被遮挡时自动调整位置
8
- autoFocus?: boolean; // 打开后自动聚焦下拉框
9
- disabled?: boolean; // 菜单是否禁用
10
- destroyPopupOnHide?: boolean; // 关闭后是否销毁 Dropdown
11
- dropdownRender?: (menus: ReactNode) => ReactNode; // 自定义下拉菜单
12
- getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; // 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位
13
- overlayClassName?: string; // 下拉菜单的样式
14
- overlayStyle?: React.CSSProperties; // 下拉菜单的样式
15
- placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; // 菜单弹出位置
16
- trigger?: Array<click | hover | contextMenu>; // 触发下拉的行为
17
- open?: boolean; // 菜单是否显示
18
- }
1
+ export interface DropdownSelectProps {
2
+ defaultValue?: string; // 默认选中的key值
3
+ items: MenuItemType[]; // 下拉菜单
4
+ onChange?: (value: string) => void; // 选中值改变时触发
5
+ arrow?: boolean; // 下拉箭头是否显示
6
+ overlayClassName?: string; // 下拉菜单的样式
7
+ autoAdjustOverflow?: boolean; // 下拉框被遮挡时自动调整位置
8
+ autoFocus?: boolean; // 打开后自动聚焦下拉框
9
+ disabled?: boolean; // 菜单是否禁用
10
+ destroyPopupOnHide?: boolean; // 关闭后是否销毁 Dropdown
11
+ dropdownRender?: (menus: ReactNode) => ReactNode; // 自定义下拉菜单
12
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; // 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位
13
+ overlayClassName?: string; // 下拉菜单的样式
14
+ overlayStyle?: React.CSSProperties; // 下拉菜单的样式
15
+ placement?: 'bottomLeft' | 'bottomRight' | 'topLeft' | 'topRight'; // 菜单弹出位置
16
+ trigger?: Array<click | hover | contextMenu>; // 触发下拉的行为
17
+ open?: boolean; // 菜单是否显示
18
+ }
@@ -1,15 +1,15 @@
1
- .yot-empty {
2
- &-description {
3
- &-content {
4
- &__title {
5
- font-size: 20px;
6
- font-weight: bold;
7
- color: var(--ant-color-text);
8
- }
9
- &__text {
10
- font-size: 14px;
11
- color: var(--ant-color-text-secondary);
12
- }
13
- }
14
- }
15
- }
1
+ .yot-empty {
2
+ &-description {
3
+ &-content {
4
+ &__title {
5
+ font-size: 20px;
6
+ font-weight: bold;
7
+ color: var(--ant-color-text);
8
+ }
9
+ &__text {
10
+ font-size: 14px;
11
+ color: var(--ant-color-text-secondary);
12
+ }
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ISvgIconProps } from "../../utils/types";
3
+ export declare const DownIcon: React.ForwardRefExoticComponent<Omit<ISvgIconProps, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,29 @@
1
+ var _excluded = ["style", "className"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import React, { forwardRef } from 'react';
6
+ export var DownIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
+ var style = _ref.style,
8
+ className = _ref.className,
9
+ rest = _objectWithoutProperties(_ref, _excluded);
10
+ return /*#__PURE__*/React.createElement("svg", _extends({
11
+ ref: ref,
12
+ width: "16",
13
+ height: "16",
14
+ viewBox: "0 0 16 16",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, rest, {
18
+ style: style,
19
+ className: className
20
+ }), /*#__PURE__*/React.createElement("g", {
21
+ id: "chevron-left"
22
+ }, /*#__PURE__*/React.createElement("path", {
23
+ id: "union",
24
+ d: "M12.46 6.4603L11.5407 5.54106L8.00034 9.08144L4.45996 5.54106L3.54072 6.4603L8.00034 10.9199L12.46 6.4603Z",
25
+ fill: "black",
26
+ "fill-opacity": "0.45"
27
+ })));
28
+ });
29
+ DownIcon.displayName = 'DownIcon';
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { ISvgIconProps } from "../../utils/types";
3
+ export declare const UpIcon: React.ForwardRefExoticComponent<Omit<ISvgIconProps, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,28 @@
1
+ var _excluded = ["style", "className"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import React, { forwardRef } from 'react';
6
+ export var UpIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
+ var style = _ref.style,
8
+ className = _ref.className,
9
+ rest = _objectWithoutProperties(_ref, _excluded);
10
+ return /*#__PURE__*/React.createElement("svg", _extends({
11
+ ref: ref,
12
+ width: "16",
13
+ height: "16",
14
+ viewBox: "0 0 16 16",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, rest, {
18
+ style: style,
19
+ className: className
20
+ }), /*#__PURE__*/React.createElement("g", {
21
+ id: "chevron-left"
22
+ }, /*#__PURE__*/React.createElement("path", {
23
+ id: "union",
24
+ d: "M12.46 9.5397L11.5407 10.4589L8.00034 6.91856L4.45996 10.4589L3.54072 9.5397L8.00034 5.08008L12.46 9.5397Z",
25
+ fill: "#4D8DE2"
26
+ })));
27
+ });
28
+ UpIcon.displayName = 'UpIcon';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './index.scss';
3
+ export declare const Export: React.FC<{
4
+ onChange?: (key: string) => void;
5
+ }>;
@@ -0,0 +1,44 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { Dropdown } from 'antd';
8
+ import React, { useState } from 'react';
9
+ import { useBem } from "../hooks/useBem";
10
+ import { DownIcon } from "./components/DownIcon";
11
+ import { UpIcon } from "./components/UpIcon";
12
+ import "./index.scss";
13
+ export var Export = function Export(_ref) {
14
+ var onChange = _ref.onChange;
15
+ var mb = useBem('export');
16
+ // 当前菜单展开状态
17
+ var _useState = useState(false),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ open = _useState2[0],
20
+ setOpen = _useState2[1];
21
+ var items = [{
22
+ label: '导入',
23
+ key: '1'
24
+ }, {
25
+ label: '下载模板',
26
+ key: '2'
27
+ }];
28
+ // 点击事件
29
+ var handleMenuClick = function handleMenuClick(e) {
30
+ onChange === null || onChange === void 0 || onChange(e.key);
31
+ };
32
+ var menuProps = {
33
+ items: items,
34
+ onClick: handleMenuClick
35
+ };
36
+ return /*#__PURE__*/React.createElement(Dropdown.Button, {
37
+ menu: menuProps,
38
+ icon: open ? /*#__PURE__*/React.createElement(UpIcon, null) : /*#__PURE__*/React.createElement(DownIcon, null),
39
+ overlayClassName: "".concat(mb),
40
+ onOpenChange: function onOpenChange(open) {
41
+ setOpen(open);
42
+ }
43
+ }, "\u5BFC\u5165");
44
+ };
@@ -0,0 +1,6 @@
1
+ .yot-export {
2
+ .ant-dropdown-menu-item.ant-dropdown-menu-item-active{
3
+ background-color: var(--ant-color-primary-bg-hover) !important;
4
+ }
5
+ }
6
+
@@ -1,5 +1,5 @@
1
- .yot-goback-icon {
2
- rect {
3
- fill: var(--ant-color-primary);
4
- }
5
- }
1
+ .yot-goback-icon {
2
+ rect {
3
+ fill: var(--ant-color-primary);
4
+ }
5
+ }
@@ -1,24 +1,24 @@
1
- .yot-goback {
2
- height: 59px;
3
- background-color: #ffffff;
4
- border-radius: 8px;
5
- box-sizing: border-box;
6
- padding: 0 24px;
7
- display: flex;
8
- align-items: center;
9
-
10
- &-content {
11
- width: fit-content;
12
- max-width: 60px;
13
- height: 100%;
14
- display: flex;
15
- align-items: center;
16
- cursor: pointer;
17
-
18
- &__title {
19
- font-size: 18px;
20
- margin-left: 5px;
21
- font-weight: bold;
22
- }
23
- }
24
- }
1
+ .yot-goback {
2
+ height: 59px;
3
+ background-color: #ffffff;
4
+ border-radius: 8px;
5
+ box-sizing: border-box;
6
+ padding: 0 24px;
7
+ display: flex;
8
+ align-items: center;
9
+
10
+ &-content {
11
+ width: fit-content;
12
+ max-width: 60px;
13
+ height: 100%;
14
+ display: flex;
15
+ align-items: center;
16
+ cursor: pointer;
17
+
18
+ &__title {
19
+ font-size: 18px;
20
+ margin-left: 5px;
21
+ font-weight: bold;
22
+ }
23
+ }
24
+ }
@@ -1,31 +1,31 @@
1
- .yot-group-title {
2
- background-color: var(--yot-group-color-secondary);
3
- border-radius: 4px;
4
- height: 42px;
5
- position: relative;
6
-
7
- &__content::before {
8
- content: '';
9
- position: absolute;
10
- width: 4px;
11
- height: 16px;
12
- top: 13px;
13
- left: 16px;
14
- background: var(--yot-group-color-primary);
15
- border-radius: 2px 2px 2px 2px
16
- }
17
-
18
- &-title {
19
- display: flex;
20
- padding: 0px 26px;
21
- line-height: 42px;
22
-
23
- &__title-text {
24
- font-family: Source Han Sans CN, Source Han Sans CN;
25
- font-weight: 550;
26
- font-size: 16px;
27
- text-align: left;
28
- }
29
- }
30
-
31
- }
1
+ .yot-group-title {
2
+ background-color: var(--yot-group-color-secondary);
3
+ border-radius: 4px;
4
+ height: 42px;
5
+ position: relative;
6
+
7
+ &__content::before {
8
+ content: '';
9
+ position: absolute;
10
+ width: 4px;
11
+ height: 16px;
12
+ top: 13px;
13
+ left: 16px;
14
+ background: var(--yot-group-color-primary);
15
+ border-radius: 2px 2px 2px 2px
16
+ }
17
+
18
+ &-title {
19
+ display: flex;
20
+ padding: 0px 26px;
21
+ line-height: 42px;
22
+
23
+ &__title-text {
24
+ font-family: Source Han Sans CN, Source Han Sans CN;
25
+ font-weight: 550;
26
+ font-size: 16px;
27
+ text-align: left;
28
+ }
29
+ }
30
+
31
+ }
@@ -76,16 +76,16 @@ var Bem = /*#__PURE__*/function () {
76
76
  }]);
77
77
  return Bem;
78
78
  }();
79
- /**
80
- * 自定义 Hook,用于创建并缓存 BEM 命名实例
81
- * @param namespace - BEM 命名的命名空间,用于生成基础类名
82
- * @returns {Bem} 返回一个 Bem 实例,用于生成 BEM 格式的类名
83
- *
84
- * 使用示例:
85
- * const b = useBem('button');
86
- * b.toString(); // => 'yot-button'
87
- * b.e('icon').toString(); // => 'yot-button__icon'
88
- * b.m('primary').toString(); // => 'yot-button--primary'
79
+ /**
80
+ * 自定义 Hook,用于创建并缓存 BEM 命名实例
81
+ * @param namespace - BEM 命名的命名空间,用于生成基础类名
82
+ * @returns {Bem} 返回一个 Bem 实例,用于生成 BEM 格式的类名
83
+ *
84
+ * 使用示例:
85
+ * const b = useBem('button');
86
+ * b.toString(); // => 'yot-button'
87
+ * b.e('icon').toString(); // => 'yot-button__icon'
88
+ * b.m('primary').toString(); // => 'yot-button--primary'
89
89
  */
90
90
  export var useBem = function useBem(namespace) {
91
91
  // 使用 useRef 存储 Bem 实例,确保在组件重渲染时保持实例不变
@@ -1,27 +1,27 @@
1
- .yot-image {
2
- &-content {
3
- display: flex;
4
- justify-content: center;
5
- align-items: center;
6
- background-color: #f5f5f5;
7
- border-radius: 4px;
8
- position: relative;
9
-
10
- .ant-image-mask-info {
11
- display: none;
12
- }
13
-
14
- .ant-image-mask::after {
15
- content: '';
16
- position: absolute;
17
- top: 50%;
18
- left: 50%;
19
- background-image: url('./assets/eye.png');
20
- background-repeat: no-repeat;
21
- background-size: cover;
22
- width: 16px;
23
- height: 16px;
24
- transform: translate(-50%, -50%);
25
- }
26
- }
1
+ .yot-image {
2
+ &-content {
3
+ display: flex;
4
+ justify-content: center;
5
+ align-items: center;
6
+ background-color: #f5f5f5;
7
+ border-radius: 4px;
8
+ position: relative;
9
+
10
+ .ant-image-mask-info {
11
+ display: none;
12
+ }
13
+
14
+ .ant-image-mask::after {
15
+ content: '';
16
+ position: absolute;
17
+ top: 50%;
18
+ left: 50%;
19
+ background-image: url('./assets/eye.png');
20
+ background-repeat: no-repeat;
21
+ background-size: cover;
22
+ width: 16px;
23
+ height: 16px;
24
+ transform: translate(-50%, -50%);
25
+ }
26
+ }
27
27
  }
package/dist/index.d.ts CHANGED
@@ -23,6 +23,7 @@ export { Department } from './department';
23
23
  export type { DepartmentProps } from './department/types/types';
24
24
  export { DropdownSelect } from './dropdown-select';
25
25
  export type { DropdownSelectProps } from './dropdown-select/types/type';
26
+ export { Export } from './export';
26
27
  export { JobTitle } from './job-title';
27
28
  export type { JobTitleProps } from './job-title/types/types';
28
29
  export { Role } from './role';
package/dist/index.js CHANGED
@@ -12,6 +12,7 @@ export { Divider } from "./divider";
12
12
  export { Dropdown } from "./dropdown";
13
13
  export { Department } from "./department";
14
14
  export { DropdownSelect } from "./dropdown-select";
15
+ export { Export } from "./export";
15
16
  export { JobTitle } from "./job-title";
16
17
  export { Role } from "./role";
17
18
  export { Flex } from "./flex";
@@ -1,5 +1,5 @@
1
- .yot-input {
2
- height: 32px;
3
- padding-left: var(--ant-padding-sm);
4
- padding-right: var(--ant-padding-sm);
5
- }
1
+ .yot-input {
2
+ height: 32px;
3
+ padding-left: var(--ant-padding-sm);
4
+ padding-right: var(--ant-padding-sm);
5
+ }
@@ -1,17 +1,17 @@
1
- import { SelectProps } from 'yootd';
2
-
3
- export interface PageData<T> {
4
- content: T[];
5
- page: {
6
- number: number;
7
- size: number;
8
- totalElements: number;
9
- totalPages: number;
10
- };
11
- }
12
- // 查询职务返回的数据类型
13
- export interface IjobTitleItem {
14
- titleId: number;
15
- titleName: string;
16
- }
17
- export type JobTitleProps = SelectProps;
1
+ import { SelectProps } from 'yootd';
2
+
3
+ export interface PageData<T> {
4
+ content: T[];
5
+ page: {
6
+ number: number;
7
+ size: number;
8
+ totalElements: number;
9
+ totalPages: number;
10
+ };
11
+ }
12
+ // 查询职务返回的数据类型
13
+ export interface IjobTitleItem {
14
+ titleId: number;
15
+ titleName: string;
16
+ }
17
+ export type JobTitleProps = SelectProps;