@jetlinks-web/components 2.4.13 → 2.4.15

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 (60) hide show
  1. package/es/AMap/Map.js +6 -2
  2. package/es/ConfigProvider/context.js +3 -0
  3. package/es/ConfigProvider/index.js +5 -2
  4. package/es/DragModal/DragModal.js +7 -3
  5. package/es/EditTable/FormItem.js +1 -1
  6. package/es/Empty/Empty.js +23 -13
  7. package/es/FullPage/FullPage.js +1 -1
  8. package/es/LocaleProvider/index.js +44 -0
  9. package/es/LocaleReciver/index.js +12 -0
  10. package/es/ProLayout/PageContainer/index.js +6 -2
  11. package/es/ProTable/Alert.js +11 -3
  12. package/es/ProTable/Pagination.js +10 -1
  13. package/es/RadioButton/RadioButton.js +1 -1
  14. package/es/Scrollbar/style/index.css +61 -0
  15. package/es/Scrollbar/style/index.js +1 -0
  16. package/es/Scrollbar/style/index.less +82 -0
  17. package/es/Search/Advanced/History.js +10 -6
  18. package/es/Search/Advanced/SaveHistory.js +15 -11
  19. package/es/Search/Advanced/index.js +11 -7
  20. package/es/Search/Item.js +15 -11
  21. package/es/Search/Search.js +7 -5
  22. package/es/Search/setting.js +63 -57
  23. package/es/Search/util.js +4 -4
  24. package/es/index.js +1 -0
  25. package/es/locale/en-US.js +77 -0
  26. package/es/locale/zh-CN.js +77 -0
  27. package/es/style/index.css +61 -0
  28. package/es/style/index.less +11 -10
  29. package/es/style.js +2 -1
  30. package/lib/AMap/Map.js +6 -2
  31. package/lib/ConfigProvider/context.js +3 -0
  32. package/lib/ConfigProvider/index.js +5 -2
  33. package/lib/DragModal/DragModal.js +7 -3
  34. package/lib/EditTable/FormItem.js +1 -1
  35. package/lib/Empty/Empty.js +23 -13
  36. package/lib/FullPage/FullPage.js +1 -1
  37. package/lib/LocaleProvider/index.js +44 -0
  38. package/lib/LocaleReciver/index.js +19 -0
  39. package/lib/ProLayout/PageContainer/index.js +6 -1
  40. package/lib/ProTable/Alert.js +11 -3
  41. package/lib/ProTable/Pagination.js +10 -1
  42. package/lib/RadioButton/RadioButton.js +1 -1
  43. package/lib/Scrollbar/style/index.css +61 -0
  44. package/lib/Scrollbar/style/index.js +3 -0
  45. package/lib/Scrollbar/style/index.less +82 -0
  46. package/lib/Search/Advanced/History.js +10 -6
  47. package/lib/Search/Advanced/SaveHistory.js +15 -11
  48. package/lib/Search/Advanced/index.js +11 -7
  49. package/lib/Search/Item.js +15 -11
  50. package/lib/Search/Search.js +7 -5
  51. package/lib/Search/setting.js +63 -57
  52. package/lib/Search/util.js +4 -4
  53. package/lib/index.js +1 -0
  54. package/lib/locale/en-US.js +83 -0
  55. package/lib/locale/zh-CN.js +83 -0
  56. package/lib/style/components.less +1 -0
  57. package/lib/style/index.css +61 -0
  58. package/lib/style/index.less +11 -10
  59. package/lib/style.js +2 -1
  60. package/package.json +2 -2
@@ -11,7 +11,9 @@
11
11
  "Textarea": "setup-maybe-ref",
12
12
  "message": "setup-maybe-ref",
13
13
  "isFunction": "setup-maybe-ref",
14
+ "useLocaleReceiver": "setup-maybe-ref",
14
15
  "props": "setup-reactive-const",
16
+ "contextLocale": "setup-maybe-ref",
15
17
  "saveHistoryLoading": "setup-ref",
16
18
  "visible": "setup-ref",
17
19
  "formRef": "setup-ref",
@@ -20,8 +22,8 @@
20
22
  "saveHistory": "setup-const"
21
23
  } */
22
24
  import { defineComponent as _defineComponent } from 'vue';
23
- import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
24
- const _withScopeId = n => (_pushScopeId("data-v-1735098506939"), n = n(), _popScopeId(), n);
25
+ import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
+ const _withScopeId = n => (_pushScopeId("data-v-1735888080808"), n = n(), _popScopeId(), n);
25
27
  const _hoisted_1 = {
26
28
  key: 0,
27
29
  style: { "width": "240px" }
@@ -29,6 +31,7 @@ const _hoisted_1 = {
29
31
  import { ref, reactive } from 'vue';
30
32
  import { Form, Button, FormItem, Popover, Textarea, message } from 'ant-design-vue';
31
33
  import { isFunction } from 'lodash-es';
34
+ import { useLocaleReceiver } from "../../LocaleReciver";
32
35
  const __sfc_main__ = _defineComponent({
33
36
  props: {
34
37
  terms: {
@@ -47,6 +50,7 @@ const __sfc_main__ = _defineComponent({
47
50
  },
48
51
  setup(__props) {
49
52
  const props = __props;
53
+ const [contextLocale] = useLocaleReceiver('Search');
50
54
  const saveHistoryLoading = ref(false);
51
55
  const visible = ref(false);
52
56
  const formRef = ref();
@@ -73,11 +77,11 @@ const __sfc_main__ = _defineComponent({
73
77
  const resp = await props.request(formData, props.target);
74
78
  saveHistoryLoading.value = false;
75
79
  if (resp.success || resp.status === 200 || resp.code === 200) {
76
- message.success('操作成功');
80
+ message.success(contextLocale.value.advanced.saveHistory.success);
77
81
  visibleChange(false);
78
82
  }
79
83
  else {
80
- message.error('操作失败');
84
+ message.error(contextLocale.value.advanced.saveHistory.fail);
81
85
  }
82
86
  }
83
87
  };
@@ -85,7 +89,7 @@ const __sfc_main__ = _defineComponent({
85
89
  return (_openBlock(), _createBlock(_unref(Popover), {
86
90
  visible: visible.value,
87
91
  "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => ((visible).value = $event)),
88
- title: "搜索名称",
92
+ title: _unref(contextLocale).advanced.saveHistory.searchName,
89
93
  trigger: "click",
90
94
  placement: "bottom",
91
95
  onVisibleChange: visibleChange
@@ -102,8 +106,8 @@ const __sfc_main__ = _defineComponent({
102
106
  _createVNode(_unref(FormItem), {
103
107
  name: "name",
104
108
  rules: [
105
- { required: true, message: '请输入名称' },
106
- { max: 64, message: '最多64个字符' },
109
+ { required: true, message: _unref(contextLocale).advanced.saveHistory.placeholder },
110
+ { max: 64, message: _unref(contextLocale).advanced.saveHistory.ruleName },
107
111
  ]
108
112
  }, {
109
113
  default: _withCtx(() => [
@@ -115,7 +119,7 @@ const __sfc_main__ = _defineComponent({
115
119
  }, null, 8 /* PROPS */, ["value"])
116
120
  ]),
117
121
  _: 1 /* STABLE */
118
- })
122
+ }, 8 /* PROPS */, ["rules"])
119
123
  ]),
120
124
  _: 1 /* STABLE */
121
125
  }, 8 /* PROPS */, ["model"]),
@@ -127,7 +131,7 @@ const __sfc_main__ = _defineComponent({
127
131
  onClick: saveHistory
128
132
  }, {
129
133
  default: _withCtx(() => [
130
- _createTextVNode(" 保存 ")
134
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.saveHistory.save), 1 /* TEXT */)
131
135
  ]),
132
136
  _: 1 /* STABLE */
133
137
  }, 8 /* PROPS */, ["loading"])
@@ -140,13 +144,13 @@ const __sfc_main__ = _defineComponent({
140
144
  type: "primary"
141
145
  }, {
142
146
  default: _withCtx(() => [
143
- _createTextVNode(" 保存")
147
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.saveHistory.save), 1 /* TEXT */)
144
148
  ]),
145
149
  _: 1 /* STABLE */
146
150
  })
147
151
  ]),
148
152
  _: 1 /* STABLE */
149
- }, 8 /* PROPS */, ["visible"]));
153
+ }, 8 /* PROPS */, ["visible", "title"]));
150
154
  };
151
155
  }
152
156
  });
@@ -50,6 +50,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
50
50
  "FormItemRest": "setup-maybe-ref",
51
51
  "AIcon": "setup-maybe-ref",
52
52
  "cloneDeep": "setup-maybe-ref",
53
+ "useLocaleReceiver": "setup-maybe-ref",
54
+ "contextLocale": "setup-maybe-ref",
53
55
  "props": "setup-reactive-const",
54
56
  "searchRef": "setup-ref",
55
57
  "searchRefContentRef": "setup-ref",
@@ -78,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
80
  "handleItems": "setup-const"
79
81
  } */
80
82
  import { defineComponent as _defineComponent } from 'vue';
81
- import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, unref as _unref, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeStyle as _normalizeStyle } from "vue";
83
+ import { createCommentVNode as _createCommentVNode, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createElementVNode as _createElementVNode, unref as _unref, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeStyle as _normalizeStyle } from "vue";
82
84
  const _hoisted_1 = { class: "left" };
83
85
  const _hoisted_2 = { class: "left-items" };
84
86
  const _hoisted_3 = {
@@ -91,7 +93,7 @@ const _hoisted_4 = {
91
93
  };
92
94
  const _hoisted_5 = { class: "right-items" };
93
95
  const _hoisted_6 = { class: "JSearch-footer--btns" };
94
- const _hoisted_7 = /*#__PURE__*/ _createElementVNode("span", { class: "more-text" }, " 更多筛选 ", -1 /* HOISTED */);
96
+ const _hoisted_7 = { class: "more-text" };
95
97
  const _hoisted_8 = { class: "JSearch-content single big pack-up" };
96
98
  const _hoisted_9 = { class: "JSearch-items" };
97
99
  const _hoisted_10 = { class: "left" };
@@ -108,6 +110,7 @@ import { compatibleOldTerms, getTermTypeFn, handleQData, hasExpand, termsParamsF
108
110
  import { Select, Button, Form, FormItemRest } from 'ant-design-vue';
109
111
  import { AIcon } from '../../../';
110
112
  import { cloneDeep } from 'lodash-es';
113
+ import { useLocaleReceiver } from "../../LocaleReciver/index";
111
114
  const __sfc_main__ = _defineComponent({
112
115
  ...{
113
116
  name: 'JAdvancedSearch',
@@ -162,6 +165,7 @@ const __sfc_main__ = _defineComponent({
162
165
  },
163
166
  emits: ["search"],
164
167
  setup(__props, { expose: __expose, emit: __emit }) {
168
+ const [contextLocale] = useLocaleReceiver('Search');
165
169
  const props = __props;
166
170
  const searchRef = ref(null);
167
171
  const searchRefContentRef = ref(null);
@@ -430,7 +434,7 @@ const __sfc_main__ = _defineComponent({
430
434
  "onUpdate:value": _cache[3] || (_cache[3] = ($event) => ((termsData.terms[1].type) = $event)),
431
435
  class: "center-select",
432
436
  style: { "width": "100px" },
433
- options: _unref(typeOptions)
437
+ options: _unref(typeOptions)(_unref(contextLocale))
434
438
  }, null, 8 /* PROPS */, ["value", "options"])
435
439
  ]))
436
440
  : _createCommentVNode("v-if", true),
@@ -464,7 +468,7 @@ const __sfc_main__ = _defineComponent({
464
468
  onClick: reset
465
469
  }, {
466
470
  default: _withCtx(() => [
467
- _createTextVNode(" 重置")
471
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.reset), 1 /* TEXT */)
468
472
  ]),
469
473
  _: 1 /* STABLE */
470
474
  }),
@@ -488,7 +492,7 @@ const __sfc_main__ = _defineComponent({
488
492
  onClick: expandChange
489
493
  }, {
490
494
  default: _withCtx(() => [
491
- _hoisted_7,
495
+ _createElementVNode("span", _hoisted_7, _toDisplayString(_unref(contextLocale).advanced.more), 1 /* TEXT */),
492
496
  _createVNode(_unref(AIcon), {
493
497
  type: "DoubleRightOutlined",
494
498
  class: _normalizeClass([
@@ -525,7 +529,7 @@ const __sfc_main__ = _defineComponent({
525
529
  onClick: reset
526
530
  }, {
527
531
  default: _withCtx(() => [
528
- _createTextVNode(" 重置 ")
532
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.reset), 1 /* TEXT */)
529
533
  ]),
530
534
  _: 1 /* STABLE */
531
535
  }),
@@ -534,7 +538,7 @@ const __sfc_main__ = _defineComponent({
534
538
  type: "primary"
535
539
  }, {
536
540
  default: _withCtx(() => [
537
- _createTextVNode(" 搜索 ")
541
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.search), 1 /* TEXT */)
538
542
  ]),
539
543
  _: 1 /* STABLE */
540
544
  })
package/es/Search/Item.js CHANGED
@@ -54,6 +54,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
54
54
  "TimeRangePicker": "setup-maybe-ref",
55
55
  "FormItem": "setup-maybe-ref",
56
56
  "isPromise": "setup-maybe-ref",
57
+ "useLocaleReceiver": "setup-maybe-ref",
58
+ "contextLocale": "setup-maybe-ref",
57
59
  "props": "setup-reactive-const",
58
60
  "emit": "setup-const",
59
61
  "termsModel": "setup-reactive-const",
@@ -78,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
78
80
  } */
79
81
  import { defineComponent as _defineComponent } from 'vue';
80
82
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
81
- const _withScopeId = n => (_pushScopeId("data-v-1735098506445"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1735888080092"), n = n(), _popScopeId(), n);
82
84
  const _hoisted_1 = { class: "JSearch-item" };
83
85
  const _hoisted_2 = {
84
86
  key: 0,
@@ -92,6 +94,7 @@ import { cloneDeep, debounce, isArray, isFunction, omit } from 'lodash-es';
92
94
  import { filterTreeSelectNode, filterSelectNode, getTermTypeFn, getTermOptions, getTermTypes, } from './util';
93
95
  import { TreeSelect, Select, Input, InputNumber, DatePicker, TimePicker, InputPassword, RangePicker, TimeRangePicker, FormItem } from 'ant-design-vue';
94
96
  import { isPromise } from '@jetlinks-web/utils';
97
+ import { useLocaleReceiver } from "../LocaleReciver/index";
95
98
  const __sfc_main__ = _defineComponent({
96
99
  props: {
97
100
  columns: {
@@ -130,6 +133,7 @@ const __sfc_main__ = _defineComponent({
130
133
  },
131
134
  emits: ["change"],
132
135
  setup(__props, { emit: __emit }) {
136
+ const [contextLocale] = useLocaleReceiver('Search');
133
137
  const props = __props;
134
138
  const emit = __emit;
135
139
  const termsModel = reactive({
@@ -147,7 +151,7 @@ const __sfc_main__ = _defineComponent({
147
151
  const options = ref([]);
148
152
  const columnOptions = ref([]);
149
153
  const columnOptionMap = inject(optionsMapKey, new Map());
150
- const termTypeOptions = reactive({ option: termType });
154
+ const termTypeOptions = reactive({ option: termType(contextLocale.value) });
151
155
  const optionLoading = ref(false);
152
156
  /**
153
157
  * 根据类型切换默termType值
@@ -159,8 +163,8 @@ const __sfc_main__ = _defineComponent({
159
163
  */
160
164
  const getTermType = (type, column, options, defaultTermType, termFilter) => {
161
165
  termTypeOptions.option = _optionalChain([options, 'optionalAccess', _10 => _10.length])
162
- ? getTermTypes(options)
163
- : getTermOptions(type, column);
166
+ ? getTermTypes(options, contextLocale.value)
167
+ : getTermOptions(type, column, contextLocale.value);
164
168
  if (_optionalChain([termFilter, 'optionalAccess', _11 => _11.length])) {
165
169
  termTypeOptions.option = termTypeOptions.option.filter((item) => !termFilter.includes(item.value));
166
170
  }
@@ -240,7 +244,7 @@ const __sfc_main__ = _defineComponent({
240
244
  termsModel.column = undefined;
241
245
  termsModel.value = undefined;
242
246
  termsModel.termType = undefined;
243
- termTypeOptions.option = termType;
247
+ termTypeOptions.option = termType(contextLocale.value);
244
248
  };
245
249
  const columnChange = (value, isChange, changeValue = true) => {
246
250
  const item = _optionalChain([columnOptionMap, 'access', _13 => _13.value, 'optionalAccess', _14 => _14.get, 'call', _15 => _15(value)]);
@@ -347,29 +351,29 @@ const __sfc_main__ = _defineComponent({
347
351
  key: 0,
348
352
  value: termsModel.type,
349
353
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => ((termsModel.type) = $event)),
350
- options: _unref(typeOptions),
354
+ options: _unref(typeOptions)(_unref(contextLocale)),
351
355
  style: { "width": "100%" },
352
356
  onChange: valueChange
353
357
  }, null, 8 /* PROPS */, ["value", "options"]))
354
- : (_openBlock(), _createElementBlock("span", _hoisted_3, _toDisplayString(__props.index === 1 ? '第一组' : '第二组'), 1 /* TEXT */))
358
+ : (_openBlock(), _createElementBlock("span", _hoisted_3, _toDisplayString(__props.index === 1 ? _unref(contextLocale).item.firstGroup : _unref(contextLocale).item.secondGroup), 1 /* TEXT */))
355
359
  ]))
356
360
  : _createCommentVNode("v-if", true),
357
361
  _createVNode(_unref(Select), {
358
362
  value: termsModel.column,
359
363
  "onUpdate:value": _cache[1] || (_cache[1] = ($event) => ((termsModel.column) = $event)),
360
- placeholder: "请选择",
364
+ placeholder: _unref(contextLocale).item.placeholder,
361
365
  class: "JSearch-item--column",
362
366
  options: columnOptions.value,
363
367
  onChange: columnChange
364
- }, null, 8 /* PROPS */, ["value", "options"]),
368
+ }, null, 8 /* PROPS */, ["value", "placeholder", "options"]),
365
369
  _createVNode(_unref(Select), {
366
370
  value: termsModel.termType,
367
371
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => ((termsModel.termType) = $event)),
368
- placeholder: "请选择",
372
+ placeholder: _unref(contextLocale).item.placeholder,
369
373
  class: "JSearch-item--termType",
370
374
  options: termTypeOptions.option,
371
375
  onChange: termTypeChange
372
- }, null, 8 /* PROPS */, ["value", "options"])
376
+ }, null, 8 /* PROPS */, ["value", "placeholder", "options"])
373
377
  ], 64 /* STABLE_FRAGMENT */))
374
378
  : (_openBlock(), _createElementBlock("div", {
375
379
  key: 1,
@@ -28,7 +28,9 @@
28
28
  "SearchItem": "setup-const",
29
29
  "optionsMapKey": "setup-maybe-ref",
30
30
  "SearchConfig": "setup-maybe-ref",
31
+ "useLocaleReceiver": "setup-maybe-ref",
31
32
  "props": "setup-reactive-const",
33
+ "contextLocale": "setup-maybe-ref",
32
34
  "columnOptionMap": "setup-ref",
33
35
  "emit": "setup-const",
34
36
  "terms": "setup-reactive-const",
@@ -43,7 +45,7 @@
43
45
  } */
44
46
  import { defineComponent as _defineComponent } from 'vue';
45
47
  import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, unref as _unref, withCtx as _withCtx, createBlock as _createBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
46
- const _withScopeId = n => (_pushScopeId("data-v-1735098506529"), n = n(), _popScopeId(), n);
48
+ const _withScopeId = n => (_pushScopeId("data-v-1735888080348"), n = n(), _popScopeId(), n);
47
49
  const _hoisted_1 = { class: "JSearch-content simple" };
48
50
  const _hoisted_2 = { class: "JSearch-items" };
49
51
  import { Button, Row, Col, Form, FormItemRest, } from 'ant-design-vue';
@@ -53,6 +55,7 @@ import { termsParamsFormat } from './util';
53
55
  import SearchItem from './Item.js';
54
56
  import { optionsMapKey } from './setting';
55
57
  import { SearchConfig } from '../utils/constants';
58
+ import { useLocaleReceiver } from "../LocaleReciver/index";
56
59
  const __sfc_main__ = _defineComponent({
57
60
  ...{
58
61
  name: 'JSearch',
@@ -86,11 +89,9 @@ const __sfc_main__ = _defineComponent({
86
89
  },
87
90
  resetText: {
88
91
  type: String,
89
- default: '重置',
90
92
  },
91
93
  submitText: {
92
94
  type: String,
93
- default: '搜索',
94
95
  },
95
96
  align: {
96
97
  type: String,
@@ -100,6 +101,7 @@ const __sfc_main__ = _defineComponent({
100
101
  emits: ["search"],
101
102
  setup(__props, { emit: __emit }) {
102
103
  const props = __props;
104
+ const [contextLocale] = useLocaleReceiver('Search');
103
105
  const columnOptionMap = ref(new Map());
104
106
  const emit = __emit;
105
107
  // 当前查询条件
@@ -234,7 +236,7 @@ const __sfc_main__ = _defineComponent({
234
236
  onClick: reset
235
237
  }, {
236
238
  default: _withCtx(() => [
237
- _createTextVNode(_toDisplayString(__props.resetText), 1 /* TEXT */)
239
+ _createTextVNode(_toDisplayString(__props.resetText || _unref(contextLocale).search.reset), 1 /* TEXT */)
238
240
  ]),
239
241
  _: 1 /* STABLE */
240
242
  }),
@@ -245,7 +247,7 @@ const __sfc_main__ = _defineComponent({
245
247
  type: "primary"
246
248
  }, {
247
249
  default: _withCtx(() => [
248
- _createTextVNode(_toDisplayString(__props.submitText), 1 /* TEXT */)
250
+ _createTextVNode(_toDisplayString(__props.submitText || _unref(contextLocale).search.search + '123123'), 1 /* TEXT */)
249
251
  ]),
250
252
  _: 1 /* STABLE */
251
253
  })
@@ -14,64 +14,70 @@ export var basicSearch = {
14
14
  default: 'advanced'
15
15
  }
16
16
  };
17
- export var typeOptions = [{
18
- label: '或者',
19
- value: 'or'
20
- }, {
21
- label: '并且',
22
- value: 'and'
23
- }];
24
- export var TermTypeMap = {
25
- EQ: {
26
- label: '=',
27
- value: 'eq'
28
- },
29
- NOT: {
30
- label: '!=',
31
- value: 'not'
32
- },
33
- LIKE: {
34
- label: '包含',
35
- value: 'like'
36
- },
37
- NLIKE: {
38
- label: '不包含',
39
- value: 'nlike'
40
- },
41
- GT: {
42
- label: '>',
43
- value: 'gt'
44
- },
45
- GTE: {
46
- label: '>=',
47
- value: 'gte'
48
- },
49
- LT: {
50
- label: '<',
51
- value: 'lt'
52
- },
53
- LTE: {
54
- label: '<=',
55
- value: 'lte'
56
- },
57
- IN: {
58
- label: '在...之中',
59
- value: 'in'
60
- },
61
- NIN: {
62
- label: '不在...之中',
63
- value: 'nin'
64
- },
65
- BTW: {
66
- label: '在...之间',
67
- value: 'btw'
68
- },
69
- NBTW: {
70
- label: '不在...之间',
71
- value: 'nbtw'
72
- }
17
+ export var typeOptions = function typeOptions(locale) {
18
+ return [{
19
+ label: locale.setting.or,
20
+ value: 'or'
21
+ }, {
22
+ label: locale.setting.and,
23
+ value: 'and'
24
+ }];
25
+ };
26
+ export var TermTypeMap = function TermTypeMap(locale) {
27
+ return {
28
+ EQ: {
29
+ label: '=',
30
+ value: 'eq'
31
+ },
32
+ NOT: {
33
+ label: '!=',
34
+ value: 'not'
35
+ },
36
+ LIKE: {
37
+ label: locale.setting.include,
38
+ value: 'like'
39
+ },
40
+ NLIKE: {
41
+ label: locale.setting.exclude,
42
+ value: 'nlike'
43
+ },
44
+ GT: {
45
+ label: '>',
46
+ value: 'gt'
47
+ },
48
+ GTE: {
49
+ label: '>=',
50
+ value: 'gte'
51
+ },
52
+ LT: {
53
+ label: '<',
54
+ value: 'lt'
55
+ },
56
+ LTE: {
57
+ label: '<=',
58
+ value: 'lte'
59
+ },
60
+ IN: {
61
+ label: locale.setting.in,
62
+ value: 'in'
63
+ },
64
+ NIN: {
65
+ label: locale.setting.notIn,
66
+ value: 'nin'
67
+ },
68
+ BTW: {
69
+ label: locale.setting.between,
70
+ value: 'btw'
71
+ },
72
+ NBTW: {
73
+ label: locale.setting.notBetween,
74
+ value: 'nbtw'
75
+ }
76
+ };
77
+ };
78
+ export var termType = function termType(locale) {
79
+ return Object.values(TermTypeMap(locale));
73
80
  };
74
- export var termType = Object.values(TermTypeMap);
75
81
  export var componentType = {
76
82
  input: 'input',
77
83
  inputNumber: 'inputNumber',
package/es/Search/util.js CHANGED
@@ -201,12 +201,12 @@ export var getTermTypeFn = function getTermTypeFn(type) {
201
201
  return 'like';
202
202
  }
203
203
  };
204
- export var getTermTypes = function getTermTypes(types) {
205
- return termType.filter(function (item) {
204
+ export var getTermTypes = function getTermTypes(types, locale) {
205
+ return termType(locale).filter(function (item) {
206
206
  return types.includes(item.value);
207
207
  });
208
208
  };
209
- export var getTermOptions = function getTermOptions(type, column) {
209
+ export var getTermOptions = function getTermOptions(type, column, locale) {
210
210
  var keys = [];
211
211
  switch (type) {
212
212
  case 'select':
@@ -231,7 +231,7 @@ export var getTermOptions = function getTermOptions(type, column) {
231
231
  // : ['like', 'nlike'];
232
232
  break;
233
233
  }
234
- return keys.length ? getTermTypes(keys) : termType;
234
+ return keys.length ? getTermTypes(keys, locale) : termType(locale);
235
235
  };
236
236
  export var termsToValue = function termsToValue(targetItem, searchItems) {
237
237
  if (['like', 'nlike'].includes(targetItem.termType) && !!targetItem.value) {
package/es/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import * as components from './components';
3
3
  export * from './components';
4
4
  export var install = function install(app) {
5
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
6
  Object.keys(components).forEach(function (key) {
6
7
  var component = components[key];
7
8
  if (component.install) {
@@ -0,0 +1,77 @@
1
+ export default {
2
+ DragModal: {
3
+ cancel: 'Cancel',
4
+ confirm: 'Confirm'
5
+ },
6
+ Search: {
7
+ search: {
8
+ reset: 'Reset',
9
+ search: 'Search'
10
+ },
11
+ advanced: {
12
+ search: 'Search',
13
+ reset: 'Reset',
14
+ more: 'More',
15
+ saveHistory: {
16
+ searchName: 'search name',
17
+ placeholder: 'Please enter a name',
18
+ ruleName: 'Up to 64 characters',
19
+ save: 'Save',
20
+ success: 'Operation successful',
21
+ fail: 'Operation fail'
22
+ },
23
+ history: {
24
+ confirmDelete: 'Confirm Delete?',
25
+ search: 'Search'
26
+ }
27
+ },
28
+ item: {
29
+ firstGroup: 'First',
30
+ secondGroup: 'Second',
31
+ placeholder: 'Please select'
32
+ },
33
+ setting: {
34
+ or: 'Or',
35
+ and: 'And',
36
+ include: 'Include',
37
+ exclude: 'Exclude',
38
+ in: 'In',
39
+ notIn: 'Not in',
40
+ between: 'Between',
41
+ notBetween: 'Not Between'
42
+ }
43
+ },
44
+ Empty: {
45
+ description: 'No Data'
46
+ },
47
+ ProTable: {
48
+ pagination: {
49
+ total: 'Articles {0} - {1}/Total of {2}'
50
+ },
51
+ alert: {
52
+ cancelChoose: 'Cancel selection',
53
+ selectItem: 'Select {0} items'
54
+ },
55
+ pageContainer: {
56
+ back: 'Back'
57
+ }
58
+ },
59
+ AMap: {
60
+ description: 'Please configure the Amap key for Gaode'
61
+ },
62
+ EditTable: {
63
+ contextMenu: {
64
+ add: 'Add new row',
65
+ copy: 'Copy row',
66
+ paste: 'Paste row',
67
+ detail: 'View details',
68
+ delete: 'Delete'
69
+ }
70
+ },
71
+ ValueItem: {
72
+ placeholder: 'Please enter the link',
73
+ cancel: 'Cancel',
74
+ confirm: 'Confirm',
75
+ title: 'Edit'
76
+ }
77
+ };