@tddc/assign-modal 3.0.9 → 3.1.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.
@@ -8,12 +8,11 @@
8
8
  display: flex;
9
9
  height: calc(100% - 24px);
10
10
  margin-top: 16px;
11
- transition: transform 0.2s ease;
11
+ // transition 已移至 inline style,支持动态面板数量
12
12
 
13
13
  .panel {
14
- // width: 650px;
15
- flex: 1;
16
- min-width: 652px;
14
+ flex: 1 0 0; // flex-grow: 1, flex-shrink: 0, flex-basis: 0
15
+ // 每个面板平分 slider 宽度,不压缩,从 0 基准开始计算
17
16
  height: 100%;
18
17
  padding: 16px;
19
18
  overflow: hidden;
@@ -161,18 +160,6 @@
161
160
  }
162
161
  }
163
162
 
164
- .slider.panel-0 {
165
- transform: translateX(0);
166
- }
167
-
168
- .slider.panel-1 {
169
- transform: translateX(-852px);
170
- }
171
-
172
- .slider.panel-2 {
173
- transform: translateX(-1504px);
174
- }
175
-
176
163
  .menu-header {
177
164
  & {
178
165
  display: flex;
@@ -153,7 +153,7 @@ export var preorder = function preorder(root, cb) {
153
153
  root.show = true;
154
154
  }
155
155
  res.push(root.code || root.key);
156
- cb && cb(root.key, root);
156
+ cb && cb(root.code || root.key, root);
157
157
  for (
158
158
  var i = 0;
159
159
  i <
@@ -1,5 +1,14 @@
1
1
  import _Drawer from 'tntd/es/drawer';
2
- var _excluded = ['visible', 'close', 'disabled', 'title', 'onSubmit', 'locale'];
2
+ var _excluded = [
3
+ 'visible',
4
+ 'close',
5
+ 'disabled',
6
+ 'title',
7
+ 'onSubmit',
8
+ 'locale',
9
+ 'okText',
10
+ 'cancelText',
11
+ ];
3
12
  function _extends() {
4
13
  return (
5
14
  (_extends = Object.assign
@@ -83,9 +92,9 @@ function _objectWithoutProperties(e, t) {
83
92
  r,
84
93
  i = _objectWithoutPropertiesLoose(e, t);
85
94
  if (Object.getOwnPropertySymbols) {
86
- var s = Object.getOwnPropertySymbols(e);
87
- for (r = 0; r < s.length; r++)
88
- (o = s[r]), t.includes(o) || ({}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]));
95
+ var n = Object.getOwnPropertySymbols(e);
96
+ for (r = 0; r < n.length; r++)
97
+ (o = n[r]), -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
89
98
  }
90
99
  return i;
91
100
  }
@@ -94,7 +103,7 @@ function _objectWithoutPropertiesLoose(r, e) {
94
103
  var t = {};
95
104
  for (var n in r)
96
105
  if ({}.hasOwnProperty.call(r, n)) {
97
- if (e.includes(n)) continue;
106
+ if (-1 !== e.indexOf(n)) continue;
98
107
  t[n] = r[n];
99
108
  }
100
109
  return t;
@@ -108,11 +117,16 @@ var cookies = new Cookies();
108
117
  var AssignModal = function AssignModal(props) {
109
118
  var visible = props.visible,
110
119
  close = props.close,
111
- disabled = props.disabled,
120
+ _props$disabled = props.disabled,
121
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
112
122
  _props$title = props.title,
113
123
  title = _props$title === void 0 ? '' : _props$title,
114
124
  onSubmit = props.onSubmit,
115
125
  locale = props.locale,
126
+ _props$okText = props.okText,
127
+ okText = _props$okText === void 0 ? '确定' : _props$okText,
128
+ _props$cancelText = props.cancelText,
129
+ cancelText = _props$cancelText === void 0 ? '取消' : _props$cancelText,
116
130
  restProps = _objectWithoutProperties(props, _excluded);
117
131
  var _useState = useState({}),
118
132
  _useState2 = _slicedToArray(_useState, 2),
@@ -130,6 +144,8 @@ var AssignModal = function AssignModal(props) {
130
144
  width: 900,
131
145
  onCancel: close,
132
146
  onOk: submit,
147
+ // okText={okText}
148
+ // cancelText={cancelText}
133
149
  maskClosable: disabled,
134
150
  destroyOnClose: true,
135
151
  showFooter: !disabled,
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@tddc/assign-modal",
3
- "version": "3.0.9",
3
+ "version": "3.1.1",
4
4
  "description": "assign-modal",
5
5
  "author": "zj <jun.zhang002383@tongdun.net>",
6
6
  "license": "ISC",
7
7
  "main": "es/index.js",
8
8
  "files": [
9
- "es"
9
+ "es",
10
+ "src",
11
+ "README.md"
10
12
  ],
11
13
  "devDependencies": {
12
14
  "universal-cookie": ">=2.2.0",