yootd 0.2.17 → 0.2.19

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.
@@ -28,7 +28,12 @@
28
28
  max-height: 529px;
29
29
  overflow-y: auto;
30
30
  }
31
-
31
+ @media (max-width: 1366px) {
32
+ .ant-modal-body {
33
+ max-height: 400px;
34
+ overflow-y: auto;
35
+ }
36
+ }
32
37
  .ant-modal-footer {
33
38
  margin-top: 40px;
34
39
  }
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
+ import './index.scss';
2
3
  import { ZoneProps } from './types/types';
3
4
  export declare const Zone: React.FC<ZoneProps>;
@@ -5,7 +5,8 @@ import { useQuery } from '@tanstack/react-query';
5
5
  import React, { useEffect, useState } from 'react';
6
6
  import { Select } from "./..";
7
7
  import { useRequest } from "../hooks/useRequest";
8
- import styles from "./index.module.scss";
8
+ import { useBem } from "../hooks/useBem";
9
+ import "./index.scss";
9
10
  export var Zone = function Zone(_ref) {
10
11
  var _allProvinceData$cont, _cityData$content, _districtData$content;
11
12
  var _ref$zoneLevel = _ref.zoneLevel,
@@ -19,6 +20,7 @@ export var Zone = function Zone(_ref) {
19
20
  allowClear = _ref$allowClear === void 0 ? true : _ref$allowClear,
20
21
  _ref$showSearch = _ref.showSearch,
21
22
  showSearch = _ref$showSearch === void 0 ? false : _ref$showSearch;
23
+ var mb = useBem('Zones');
22
24
  var request = useRequest();
23
25
  // 用户所选择的省市区的id数组
24
26
  var _useState = useState([]),
@@ -129,12 +131,12 @@ export var Zone = function Zone(_ref) {
129
131
  }
130
132
  }, [value]);
131
133
  return /*#__PURE__*/React.createElement("div", {
132
- className: zoneLevel === 'province' ? '' : "".concat(styles === null || styles === void 0 ? void 0 : styles.content),
134
+ className: zoneLevel === 'province' ? '' : "".concat(mb),
133
135
  style: zoneLevel === 'province' ? {} : style
134
136
  }, /*#__PURE__*/React.createElement(Select, {
135
137
  allowClear: allowClear,
136
138
  showSearch: showSearch,
137
- className: "zone-select",
139
+ className: "".concat(mb.b('zone-select')),
138
140
  value: zoneIds === null || zoneIds === void 0 ? void 0 : zoneIds[0],
139
141
  onChange: changeProvince,
140
142
  options: provinceOptions,
@@ -147,7 +149,7 @@ export var Zone = function Zone(_ref) {
147
149
  }), zoneLevel !== 'province' ? /*#__PURE__*/React.createElement(Select, {
148
150
  allowClear: allowClear,
149
151
  showSearch: showSearch,
150
- className: zoneLevel === 'city' ? '' : 'zone-select',
152
+ className: zoneLevel === 'city' ? '' : "".concat(mb.b('zone-select')),
151
153
  value: zoneIds === null || zoneIds === void 0 ? void 0 : zoneIds[1],
152
154
  onChange: changeCity,
153
155
  options: cityOptions,
@@ -0,0 +1,21 @@
1
+ .yot-Zones {
2
+ border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
+ border-radius: var(--ant-border-radius);
4
+ &-zone-select::after {
5
+ content: '';
6
+ position: absolute;
7
+ right: 0;
8
+ top: 50%; /* 从中间开始 */
9
+ width: 1px; /* 边框宽度 */
10
+ height: 50%; /* 设为盒子高度的百分之五十 */
11
+ background-color: var(--ant-color-border); /* 边框颜色 */
12
+ transform: translateY(-50%);
13
+ }
14
+ .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-show-arrow {
15
+ .ant-select-selector {
16
+ padding-left: var(--ant-padding);
17
+ padding-right: var(--ant-padding);
18
+ border: 0;
19
+ }
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yootd",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "基于 Antd 二次开发的组件库",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -1,23 +0,0 @@
1
- .content {
2
- border: var(--ant-line-width) var(--ant-line-type) var(--ant-color-border);
3
- border-radius: var(--ant-border-radius);
4
- :global {
5
- .zone-select::after {
6
- content: '';
7
- position: absolute;
8
- right: 0;
9
- top: 50%; /* 从中间开始 */
10
- width: 1px; /* 边框宽度 */
11
- height: 50%; /* 设为盒子高度的百分之五十 */
12
- background-color: var(--ant-color-border); /* 边框颜色 */
13
- transform: translateY(-50%);
14
- }
15
- .ant-select.ant-select-outlined.css-var-yootd.ant-select-css-var.ant-select-single.ant-select-show-arrow {
16
- .ant-select-selector {
17
- padding-left: var(--ant-padding);
18
- padding-right: var(--ant-padding);
19
- border: 0;
20
- }
21
- }
22
- }
23
- }