@jetlinks-web/components 3.3.5 → 3.3.7

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.
@@ -74,7 +74,7 @@ export var genSiderMenuStyle = function genSiderMenuStyle(config) {
74
74
  zIndex: 10,
75
75
  minHeight: '100%',
76
76
  boxShadow: '2px 0 6px rgba(0, 21, 41, 0.35)'
77
- }), "".concat(token.antCls, "-layout-sider-children"), {
77
+ }), "".concat(token.antCls, "-layout-sider-children"), _defineProperty({
78
78
  display: 'flex',
79
79
  flexDirection: 'column',
80
80
  height: '100%',
@@ -93,7 +93,11 @@ export var genSiderMenuStyle = function genSiderMenuStyle(config) {
93
93
  borderRadius: '3px',
94
94
  boxShadow: 'inset 0 0 5px rgba(255, 255, 255, 0.05)'
95
95
  }
96
- }), "&".concat(token.antCls, "-layout-sider-collapsed"), _defineProperty(_defineProperty({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
96
+ }, "".concat(proLayoutSiderMenuCls, "-logo"), {
97
+ h1: {
98
+ color: '#333'
99
+ }
100
+ })), "&".concat(token.antCls, "-layout-sider-collapsed"), _defineProperty(_defineProperty({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
97
101
  width: '48px'
98
102
  }), "".concat(proLayoutSiderMenuCls), _defineProperty({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
99
103
  padding: '16px 24px'
@@ -132,7 +136,7 @@ export var genSiderMenuStyle = function genSiderMenuStyle(config) {
132
136
  borderRightColor: 'transparent'
133
137
  }), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
134
138
  borderTop: "".concat(token.lineWidth, " solid ").concat(token.colorSplit)
135
- })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat9, "".concat(proLayoutSiderMenuCls, "-icon"), {
139
+ })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat9, "".concat(proLayoutSiderMenuCls, "-icon"), {
136
140
  width: '14px',
137
141
  verticalAlign: 'baseline'
138
142
  }), "".concat(proLayoutSiderMenuCls, "-link"), _defineProperty({
@@ -149,11 +153,7 @@ export var genSiderMenuStyle = function genSiderMenuStyle(config) {
149
153
  lineHeight: 1
150
154
  }), '.drawer .drawer-content', {
151
155
  background: "#001529"
152
- }), "".concat(token.antCls, "-layout-sider-children"), _defineProperty({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
153
- h1: {
154
- color: '#333'
155
- }
156
- })))), "".concat(token.antCls, "-pro-menu-item"), _defineProperty({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
156
+ }))), "".concat(token.antCls, "-pro-menu-item"), _defineProperty({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
157
157
  marginLeft: '10px'
158
158
  })), '.sider-app-menus', {
159
159
  width: '100px',
@@ -297,7 +297,11 @@ const __sfc_main__ = _defineComponent({
297
297
  }
298
298
  };
299
299
  watch(() => props.params, (newValue) => {
300
- _debounceFn(newValue || {});
300
+ _debounceFn({
301
+ ...(newValue || {}),
302
+ pageSize: page.pageSize || 12,
303
+ pageIndex: 0,
304
+ });
301
305
  }, { deep: true, immediate: true });
302
306
  watch(props.modeValue, (newValue) => {
303
307
  if (newValue) {
package/es/Search/Item.js CHANGED
@@ -28,7 +28,6 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
28
28
  "reactive": "setup-const",
29
29
  "watch": "setup-const",
30
30
  "isRef": "setup-const",
31
- "nextTick": "setup-const",
32
31
  "Select": "setup-maybe-ref",
33
32
  "DatePicker": "setup-maybe-ref",
34
33
  "RangePicker": "setup-maybe-ref",
@@ -64,6 +63,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
64
63
  "handleColumnsOptions": "setup-const",
65
64
  "onTypeChange": "setup-const",
66
65
  "onColumnChange": "setup-const",
66
+ "normalizeTermsModelValue": "setup-const",
67
67
  "onTermTypeChange": "setup-const",
68
68
  "onValueChange": "setup-const",
69
69
  "handleTermsModelValue": "setup-const"
@@ -76,7 +76,7 @@ const _hoisted_1 = {
76
76
  };
77
77
  const _hoisted_2 = { key: 1 };
78
78
  const _hoisted_3 = { class: "JSearch-item--value" };
79
- import { computed, ref, reactive, watch, isRef, } from 'vue';
79
+ import { computed, ref, reactive, watch, isRef } from 'vue';
80
80
  import { Select, DatePicker, RangePicker } from 'ant-design-vue';
81
81
  import { componentProps, componentType, typeOptions } from "./setting";
82
82
  import { getTermOptions, getItemDefaultValue } from "./util";
@@ -139,9 +139,9 @@ const __sfc_main__ = _defineComponent({
139
139
  const btwKeys = computed(() => {
140
140
  const record = findItemByColumn();
141
141
  if (record.search.isBtw && Array.isArray(record.search.isBtw)) {
142
- return [...record.search.isBtw, 'in', 'nin'];
142
+ return [...record.search.isBtw, 'in', 'nin', 'btw', 'nbtw'];
143
143
  }
144
- return ['in', 'nin'];
144
+ return ['in', 'nin', 'btw', 'nbtw'];
145
145
  });
146
146
  const prefixCls = computed(() => 'JSearch');
147
147
  const [wrapSSR, hashId] = useSearchStyle(prefixCls);
@@ -196,17 +196,21 @@ const __sfc_main__ = _defineComponent({
196
196
  onTermTypeChange();
197
197
  onValueChange();
198
198
  };
199
- const onTermTypeChange = () => {
199
+ const normalizeTermsModelValue = () => {
200
200
  const isBtw = btwKeys.value.includes(termsModel.termType);
201
- if (!isBtw && termsModel.value && Array.isArray(termsModel.value)) {
202
- termsModel.value = termsModel.value[0];
203
- onValueChange();
201
+ if ([componentType.treeSelect, componentType.select].includes(targetComponents.value.type)) {
202
+ handleTermsModelValue(isBtw);
203
+ return;
204
204
  }
205
- else if (isBtw && termsModel.value && !Array.isArray(termsModel.value)) {
206
- termsModel.value = [termsModel.value];
207
- onValueChange();
205
+ if (targetComponents.value.type === componentType.date) {
206
+ const isDateRange = ['btw', 'between'].includes(termsModel.termType);
207
+ termsModel.value = isDateRange ? [] : Array.isArray(termsModel.value) ? termsModel.value[0] : termsModel.value;
208
208
  }
209
+ };
210
+ const onTermTypeChange = () => {
211
+ normalizeTermsModelValue();
209
212
  emit('update:termType', termsModel.termType);
213
+ onValueChange();
210
214
  };
211
215
  const onValueChange = () => {
212
216
  emit('update:value', termsModel.value);
@@ -248,13 +252,12 @@ const __sfc_main__ = _defineComponent({
248
252
  else if (targetComponents.value.type === componentType.date && ['btw', 'between'].includes(termsModel.termType)) {
249
253
  // 当日期类型选择了 btw 时,切换到 RangePicker 组件
250
254
  targetComponents.value.name = RangePicker;
251
- termsModel.value = [];
252
255
  }
253
256
  else if (targetComponents.value.type === componentType.date && !['btw', 'between'].includes(termsModel.termType)) {
254
257
  // 当 RangePicker 取消 btw 时,切换回 DatePicker 组件
255
258
  targetComponents.value.name = DatePicker;
256
- termsModel.value = undefined;
257
259
  }
260
+ normalizeTermsModelValue();
258
261
  }, { immediate: true, deep: true });
259
262
  watch(() => [termsModel.column, columnsMap.value], async () => {
260
263
  // 根据column从map中获取record,再解析search属性
@@ -10,7 +10,7 @@ export var genSearchStyle = function genSearchStyle(config) {
10
10
  flex: '1 1 auto',
11
11
  '.left': {
12
12
  minWidth: '380px',
13
- maxWidth: '580px'
13
+ maxWidth: '610px'
14
14
  }
15
15
  }),
16
16
  '&.senior': _defineProperty({}, "> ".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
@@ -81,7 +81,7 @@ var genSiderMenuStyle = exports.genSiderMenuStyle = function genSiderMenuStyle(c
81
81
  zIndex: 10,
82
82
  minHeight: '100%',
83
83
  boxShadow: '2px 0 6px rgba(0, 21, 41, 0.35)'
84
- }), "".concat(token.antCls, "-layout-sider-children"), {
84
+ }), "".concat(token.antCls, "-layout-sider-children"), (0, _defineProperty2.default)({
85
85
  display: 'flex',
86
86
  flexDirection: 'column',
87
87
  height: '100%',
@@ -100,7 +100,11 @@ var genSiderMenuStyle = exports.genSiderMenuStyle = function genSiderMenuStyle(c
100
100
  borderRadius: '3px',
101
101
  boxShadow: 'inset 0 0 5px rgba(255, 255, 255, 0.05)'
102
102
  }
103
- }), "&".concat(token.antCls, "-layout-sider-collapsed"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
103
+ }, "".concat(proLayoutSiderMenuCls, "-logo"), {
104
+ h1: {
105
+ color: '#333'
106
+ }
107
+ })), "&".concat(token.antCls, "-layout-sider-collapsed"), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
104
108
  width: '48px'
105
109
  }), "".concat(proLayoutSiderMenuCls), (0, _defineProperty2.default)({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
106
110
  padding: '16px 24px'
@@ -139,7 +143,7 @@ var genSiderMenuStyle = exports.genSiderMenuStyle = function genSiderMenuStyle(c
139
143
  borderRightColor: 'transparent'
140
144
  }), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
141
145
  borderTop: "".concat(token.lineWidth, " solid ").concat(token.colorSplit)
142
- })), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_$concat9, "".concat(proLayoutSiderMenuCls, "-icon"), {
146
+ })), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_$concat9, "".concat(proLayoutSiderMenuCls, "-icon"), {
143
147
  width: '14px',
144
148
  verticalAlign: 'baseline'
145
149
  }), "".concat(proLayoutSiderMenuCls, "-link"), (0, _defineProperty2.default)({
@@ -156,11 +160,7 @@ var genSiderMenuStyle = exports.genSiderMenuStyle = function genSiderMenuStyle(c
156
160
  lineHeight: 1
157
161
  }), '.drawer .drawer-content', {
158
162
  background: "#001529"
159
- }), "".concat(token.antCls, "-layout-sider-children"), (0, _defineProperty2.default)({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
160
- h1: {
161
- color: '#333'
162
- }
163
- })))), "".concat(token.antCls, "-pro-menu-item"), (0, _defineProperty2.default)({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
163
+ }))), "".concat(token.antCls, "-pro-menu-item"), (0, _defineProperty2.default)({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
164
164
  marginLeft: '10px'
165
165
  })), '.sider-app-menus', {
166
166
  width: '100px',
@@ -297,7 +297,11 @@ const __sfc_main__ = _defineComponent({
297
297
  }
298
298
  };
299
299
  watch(() => props.params, (newValue) => {
300
- _debounceFn(newValue || {});
300
+ _debounceFn({
301
+ ...(newValue || {}),
302
+ pageSize: page.pageSize || 12,
303
+ pageIndex: 0,
304
+ });
301
305
  }, { deep: true, immediate: true });
302
306
  watch(props.modeValue, (newValue) => {
303
307
  if (newValue) {
@@ -28,7 +28,6 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
28
28
  "reactive": "setup-const",
29
29
  "watch": "setup-const",
30
30
  "isRef": "setup-const",
31
- "nextTick": "setup-const",
32
31
  "Select": "setup-maybe-ref",
33
32
  "DatePicker": "setup-maybe-ref",
34
33
  "RangePicker": "setup-maybe-ref",
@@ -64,6 +63,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
64
63
  "handleColumnsOptions": "setup-const",
65
64
  "onTypeChange": "setup-const",
66
65
  "onColumnChange": "setup-const",
66
+ "normalizeTermsModelValue": "setup-const",
67
67
  "onTermTypeChange": "setup-const",
68
68
  "onValueChange": "setup-const",
69
69
  "handleTermsModelValue": "setup-const"
@@ -76,7 +76,7 @@ const _hoisted_1 = {
76
76
  };
77
77
  const _hoisted_2 = { key: 1 };
78
78
  const _hoisted_3 = { class: "JSearch-item--value" };
79
- import { computed, ref, reactive, watch, isRef, } from 'vue';
79
+ import { computed, ref, reactive, watch, isRef } from 'vue';
80
80
  import { Select, DatePicker, RangePicker } from 'ant-design-vue';
81
81
  import { componentProps, componentType, typeOptions } from "./setting";
82
82
  import { getTermOptions, getItemDefaultValue } from "./util";
@@ -139,9 +139,9 @@ const __sfc_main__ = _defineComponent({
139
139
  const btwKeys = computed(() => {
140
140
  const record = findItemByColumn();
141
141
  if (record.search.isBtw && Array.isArray(record.search.isBtw)) {
142
- return [...record.search.isBtw, 'in', 'nin'];
142
+ return [...record.search.isBtw, 'in', 'nin', 'btw', 'nbtw'];
143
143
  }
144
- return ['in', 'nin'];
144
+ return ['in', 'nin', 'btw', 'nbtw'];
145
145
  });
146
146
  const prefixCls = computed(() => 'JSearch');
147
147
  const [wrapSSR, hashId] = useSearchStyle(prefixCls);
@@ -196,17 +196,21 @@ const __sfc_main__ = _defineComponent({
196
196
  onTermTypeChange();
197
197
  onValueChange();
198
198
  };
199
- const onTermTypeChange = () => {
199
+ const normalizeTermsModelValue = () => {
200
200
  const isBtw = btwKeys.value.includes(termsModel.termType);
201
- if (!isBtw && termsModel.value && Array.isArray(termsModel.value)) {
202
- termsModel.value = termsModel.value[0];
203
- onValueChange();
201
+ if ([componentType.treeSelect, componentType.select].includes(targetComponents.value.type)) {
202
+ handleTermsModelValue(isBtw);
203
+ return;
204
204
  }
205
- else if (isBtw && termsModel.value && !Array.isArray(termsModel.value)) {
206
- termsModel.value = [termsModel.value];
207
- onValueChange();
205
+ if (targetComponents.value.type === componentType.date) {
206
+ const isDateRange = ['btw', 'between'].includes(termsModel.termType);
207
+ termsModel.value = isDateRange ? [] : Array.isArray(termsModel.value) ? termsModel.value[0] : termsModel.value;
208
208
  }
209
+ };
210
+ const onTermTypeChange = () => {
211
+ normalizeTermsModelValue();
209
212
  emit('update:termType', termsModel.termType);
213
+ onValueChange();
210
214
  };
211
215
  const onValueChange = () => {
212
216
  emit('update:value', termsModel.value);
@@ -248,13 +252,12 @@ const __sfc_main__ = _defineComponent({
248
252
  else if (targetComponents.value.type === componentType.date && ['btw', 'between'].includes(termsModel.termType)) {
249
253
  // 当日期类型选择了 btw 时,切换到 RangePicker 组件
250
254
  targetComponents.value.name = RangePicker;
251
- termsModel.value = [];
252
255
  }
253
256
  else if (targetComponents.value.type === componentType.date && !['btw', 'between'].includes(termsModel.termType)) {
254
257
  // 当 RangePicker 取消 btw 时,切换回 DatePicker 组件
255
258
  targetComponents.value.name = DatePicker;
256
- termsModel.value = undefined;
257
259
  }
260
+ normalizeTermsModelValue();
258
261
  }, { immediate: true, deep: true });
259
262
  watch(() => [termsModel.column, columnsMap.value], async () => {
260
263
  // 根据column从map中获取record,再解析search属性
@@ -17,7 +17,7 @@ var genSearchStyle = exports.genSearchStyle = function genSearchStyle(config) {
17
17
  flex: '1 1 auto',
18
18
  '.left': {
19
19
  minWidth: '380px',
20
- maxWidth: '580px'
20
+ maxWidth: '610px'
21
21
  }
22
22
  }),
23
23
  '&.senior': (0, _defineProperty2.default)({}, "> ".concat(componentCls, "-content"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "3.3.5",
3
+ "version": "3.3.7",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -155,8 +155,8 @@
155
155
  "webpack-merge": "^5.0.0",
156
156
  "webpackbar": "^5.0.2",
157
157
  "@jetlinks-web/constants": "^1.0.9",
158
- "@jetlinks-web/utils": "^1.3.3",
159
- "@jetlinks-web/hooks": "^1.1.2"
158
+ "@jetlinks-web/hooks": "^1.1.2",
159
+ "@jetlinks-web/utils": "^1.3.3"
160
160
  },
161
161
  "publishConfig": {
162
162
  "registry": "https://registry.npmjs.org/",