@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
package/es/AMap/Map.js CHANGED
@@ -17,8 +17,10 @@
17
17
  "MapProps": "setup-maybe-ref",
18
18
  "MAPConfig": "setup-maybe-ref",
19
19
  "Empty": "setup-maybe-ref",
20
+ "useLocaleReceiver": "setup-maybe-ref",
20
21
  "emit": "setup-const",
21
22
  "props": "setup-reactive-const",
23
+ "contextLocale": "setup-maybe-ref",
22
24
  "config": "setup-maybe-ref",
23
25
  "_mapStyle": "setup-ref",
24
26
  "hasAMapKey": "setup-ref",
@@ -37,6 +39,7 @@ import { MapProps } from './util';
37
39
  import { MAPConfig } from "../utils/constants";
38
40
  import Empty from '../Empty';
39
41
  import '@vuemap/vue-amap/dist/style.css';
42
+ import { useLocaleReceiver } from "../LocaleReciver/index";
40
43
  const __sfc_main__ = _defineComponent({
41
44
  ...{
42
45
  name: 'JAMap'
@@ -61,6 +64,7 @@ const __sfc_main__ = _defineComponent({
61
64
  setup(__props, { emit: __emit }) {
62
65
  const emit = __emit;
63
66
  const props = __props;
67
+ const [contextLocale] = useLocaleReceiver('AMap');
64
68
  const config = inject(MAPConfig);
65
69
  const _mapStyle = computed(() => {
66
70
  if (props.mapStyle) {
@@ -119,9 +123,9 @@ const __sfc_main__ = _defineComponent({
119
123
  }, 16 /* FULL_PROPS */, ["map-style"]))
120
124
  : (_openBlock(), _createBlock(_unref(Empty), {
121
125
  key: 1,
122
- description: "请配置高德地图key",
126
+ description: _unref(contextLocale).description,
123
127
  style: { "padding": "20%" }
124
- }))
128
+ }, null, 8 /* PROPS */, ["description"]))
125
129
  ], 6 /* CLASS, STYLE */));
126
130
  };
127
131
  }
@@ -16,6 +16,9 @@ export var configProps = function configProps() {
16
16
  },
17
17
  FullPageConfig: {
18
18
  reduceHeight: Number
19
+ },
20
+ componentsLocale: {
21
+ type: Object
19
22
  }
20
23
  });
21
24
  };
@@ -4,6 +4,7 @@ import { defineComponent, provide, reactive, h } from 'vue';
4
4
  import { configProps } from './context';
5
5
  import { ComponentsEnum, MAPConfig, PermissionButtonConfig, SearchConfig, FullPageConfig } from '../utils/constants';
6
6
  import { ConfigProvider } from 'ant-design-vue';
7
+ import LocaleProvider from '../LocaleProvider/index.js';
7
8
  import { omit } from 'lodash-es';
8
9
  import Empty from '../Empty';
9
10
  var JConfigProvider = defineComponent({
@@ -23,13 +24,15 @@ var JConfigProvider = defineComponent({
23
24
  provide(PermissionButtonConfig, _PermissionButtonConfig); // 权限组件
24
25
  provide(FullPageConfig, _FullPageConfig); // 权限组件
25
26
  return function () {
26
- return h(ConfigProvider, _objectSpread({}, omit(props, ['IconConfig', 'MapConfig', 'SearchConfig'])), {
27
+ return h(ConfigProvider, _objectSpread({}, omit(props, ['IconConfig', 'MapConfig', 'SearchConfig'])), [h(LocaleProvider, {
28
+ locale: props.componentsLocale
29
+ }, {
27
30
  default: slots.default,
28
31
  renderEmpty: function renderEmpty() {
29
32
  var _slots$renderEmpty;
30
33
  return ((_slots$renderEmpty = slots.renderEmpty) === null || _slots$renderEmpty === void 0 ? void 0 : _slots$renderEmpty.call(slots)) || _createVNode(Empty, null, null);
31
34
  }
32
- });
35
+ })]);
33
36
  };
34
37
  }
35
38
  });
@@ -28,9 +28,11 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
28
28
  "onMounted": "setup-const",
29
29
  "watch": "setup-const",
30
30
  "Button": "setup-maybe-ref",
31
+ "useLocaleReceiver": "setup-maybe-ref",
31
32
  "props": "setup-reactive-const",
32
33
  "emits": "setup-const",
33
34
  "slots": "setup-maybe-ref",
35
+ "contextLocale": "setup-maybe-ref",
34
36
  "ele": "setup-maybe-ref",
35
37
  "dialog": "setup-ref",
36
38
  "header": "setup-ref",
@@ -47,7 +49,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
47
49
  "onOk": "setup-const"
48
50
  } */
49
51
  import { defineComponent as _defineComponent } from 'vue';
50
- import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, createTextVNode as _createTextVNode, unref as _unref, Transition as _Transition } from "vue";
52
+ import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, normalizeStyle as _normalizeStyle, unref as _unref, createTextVNode as _createTextVNode, Transition as _Transition } from "vue";
51
53
  const _hoisted_1 = {
52
54
  key: 0,
53
55
  class: "header"
@@ -58,6 +60,7 @@ const _hoisted_2 = {
58
60
  };
59
61
  import { ref, useSlots, computed, onMounted, watch } from 'vue';
60
62
  import { Button } from 'ant-design-vue';
63
+ import { useLocaleReceiver } from "../LocaleReciver/index";
61
64
  const __sfc_main__ = _defineComponent({
62
65
  ...{
63
66
  name: 'JDragModal'
@@ -93,6 +96,7 @@ const __sfc_main__ = _defineComponent({
93
96
  const props = __props;
94
97
  const emits = __emit;
95
98
  const slots = useSlots();
99
+ const [contextLocale] = useLocaleReceiver('Search');
96
100
  const ele = document.body;
97
101
  const dialog = ref();
98
102
  const header = ref();
@@ -276,7 +280,7 @@ const __sfc_main__ = _defineComponent({
276
280
  onClick: _withModifiers(onCancel, ["stop"])
277
281
  }, {
278
282
  default: _withCtx(() => [
279
- _createTextVNode("取消")
283
+ _createTextVNode(_toDisplayString(_unref(contextLocale).DragModal.cancel), 1 /* TEXT */)
280
284
  ]),
281
285
  _: 1 /* STABLE */
282
286
  }),
@@ -285,7 +289,7 @@ const __sfc_main__ = _defineComponent({
285
289
  onClick: _withModifiers(onOk, ["stop"])
286
290
  }, {
287
291
  default: _withCtx(() => [
288
- _createTextVNode("确认")
292
+ _createTextVNode(_toDisplayString(_unref(contextLocale).DragModal.confirm), 1 /* TEXT */)
289
293
  ]),
290
294
  _: 1 /* STABLE */
291
295
  })
@@ -48,7 +48,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
48
  "onFieldChange": "setup-const"
49
49
  } */
50
50
  import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, renderSlot as _renderSlot, normalizeClass as _normalizeClass, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
51
- const _withScopeId = n => (_pushScopeId("data-v-1735098504716"), n = n(), _popScopeId(), n);
51
+ const _withScopeId = n => (_pushScopeId("data-v-1735888077844"), n = n(), _popScopeId(), n);
52
52
  const _hoisted_1 = { style: { "color": "#1d2129" } };
53
53
  const _hoisted_2 = {
54
54
  key: 0,
package/es/Empty/Empty.js CHANGED
@@ -6,17 +6,22 @@
6
6
  "useSlots": "setup-const",
7
7
  "NoData": "setup-maybe-ref",
8
8
  "omit": "setup-maybe-ref",
9
+ "useLocaleReceiver": "setup-maybe-ref",
10
+ "LocaleProvider": "setup-const",
9
11
  "slots": "setup-maybe-ref",
10
12
  "renderArr": "setup-maybe-ref",
13
+ "contextLocale": "setup-maybe-ref",
11
14
  "props": "setup-reactive-const",
12
15
  "baseProps": "setup-maybe-ref"
13
16
  } */
14
17
  import { defineComponent as _defineComponent } from 'vue';
15
- import { unref as _unref, renderSlot as _renderSlot, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from "vue";
18
+ import { unref as _unref, renderSlot as _renderSlot, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue";
16
19
  import { Empty } from 'ant-design-vue';
17
20
  import { useSlots } from 'vue';
18
21
  import NoData from './image';
19
22
  import { omit } from 'lodash-es';
23
+ import { useLocaleReceiver } from "../LocaleReciver/index";
24
+ import LocaleProvider from "../LocaleProvider/index.js";
20
25
  const __sfc_main__ = _defineComponent({
21
26
  ...{
22
27
  name: 'JEmpty'
@@ -24,7 +29,6 @@ const __sfc_main__ = _defineComponent({
24
29
  props: {
25
30
  description: {
26
31
  type: String,
27
- default: '暂无数据',
28
32
  },
29
33
  image: {
30
34
  type: String,
@@ -40,19 +44,25 @@ const __sfc_main__ = _defineComponent({
40
44
  setup(__props) {
41
45
  const slots = useSlots();
42
46
  const renderArr = Object.keys(slots);
47
+ const [contextLocale] = useLocaleReceiver('Empty');
43
48
  const props = __props;
44
- const baseProps = omit(props, ...renderArr);
49
+ const baseProps = omit({ ...props, description: props.description || contextLocale.value.description }, ...renderArr);
45
50
  return (_ctx, _cache) => {
46
- return (_openBlock(), _createBlock(_unref(Empty), _normalizeProps(_guardReactiveProps(_unref(baseProps))), _createSlots({ _: 2 /* DYNAMIC */ }, [
47
- _renderList(_unref(renderArr), (item) => {
48
- return {
49
- name: item,
50
- fn: _withCtx((scope) => [
51
- _renderSlot(_ctx.$slots, item, { scope: scope })
52
- ])
53
- };
54
- })
55
- ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */));
51
+ return (_openBlock(), _createBlock(LocaleProvider, null, {
52
+ default: _withCtx(() => [
53
+ _createVNode(_unref(Empty), _normalizeProps(_guardReactiveProps(_unref(baseProps))), _createSlots({ _: 2 /* DYNAMIC */ }, [
54
+ _renderList(_unref(renderArr), (item) => {
55
+ return {
56
+ name: item,
57
+ fn: _withCtx((scope) => [
58
+ _renderSlot(_ctx.$slots, item, { scope: scope })
59
+ ])
60
+ };
61
+ })
62
+ ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */)
63
+ ]),
64
+ _: 3 /* FORWARDED */
65
+ }));
56
66
  };
57
67
  }
58
68
  });
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1735098505186"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1735888078611"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -0,0 +1,44 @@
1
+ /* Analyzed bindings: {
2
+ "locale": "props",
3
+ "provide": "setup-const",
4
+ "reactive": "setup-const",
5
+ "watch": "setup-const",
6
+ "defineOptions": "setup-const",
7
+ "defaultLocal": "setup-maybe-ref",
8
+ "props": "setup-reactive-const",
9
+ "state": "setup-reactive-const"
10
+ } */
11
+ import { defineComponent as _defineComponent } from 'vue';
12
+ import { renderSlot as _renderSlot } from "vue";
13
+ import { provide, reactive, watch, } from "vue";
14
+ import defaultLocal from '../locale/zh-CN';
15
+ const __sfc_main__ = _defineComponent({
16
+ ...{
17
+ name: 'JLocaleProvider'
18
+ },
19
+ props: {
20
+ locale: {
21
+ type: Object,
22
+ }
23
+ },
24
+ setup(__props) {
25
+ const props = __props;
26
+ const state = reactive({
27
+ antLocale: {
28
+ ...props.locale || defaultLocal || {},
29
+ exist: true,
30
+ },
31
+ });
32
+ watch(() => props.locale, () => {
33
+ state.antLocale = {
34
+ ...props.locale || defaultLocal || {},
35
+ exist: true,
36
+ };
37
+ }, { deep: true });
38
+ provide('componentLocaleData', state);
39
+ return (_ctx, _cache) => {
40
+ return _renderSlot(_ctx.$slots, "default");
41
+ };
42
+ }
43
+ });
44
+ export default __sfc_main__;
@@ -0,0 +1,12 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import { computed, inject, unref } from 'vue';
3
+ export function useLocaleReceiver(componentName, defaultLocale, propsLocale) {
4
+ var localeData = inject('componentLocaleData', {});
5
+ var componentLocale = computed(function () {
6
+ var antLocale = localeData.antLocale;
7
+ var locale = unref(defaultLocale) || [componentName || 'global'];
8
+ var localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
9
+ return _objectSpread(_objectSpread(_objectSpread({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {}), unref(propsLocale) || {});
10
+ });
11
+ return [componentLocale];
12
+ }
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment } from "vue";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import { createTextVNode as _createTextVNode } from "vue";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
6
6
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
@@ -14,6 +14,7 @@ import { getSlotVNode } from '../util';
14
14
  import 'ant-design-vue/es/_util/type';
15
15
  import 'ant-design-vue/es/_util/vue-types';
16
16
  import { LayoutType } from "../defaultSettings";
17
+ import { useLocaleReceiver } from "../../LocaleReciver";
17
18
  function _isSlot(s) {
18
19
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
19
20
  }
@@ -209,6 +210,9 @@ var ProPageHeader = function ProPageHeader(props) {
209
210
  showBack = props.showBack,
210
211
  restProps = _objectWithoutProperties(props, _excluded);
211
212
  var value = useRouteContext();
213
+ var _useLocaleReceiver = useLocaleReceiver('ProTable'),
214
+ _useLocaleReceiver2 = _slicedToArray(_useLocaleReceiver, 1),
215
+ contextLocale = _useLocaleReceiver2[0];
212
216
  if (pageHeaderRender === false) {
213
217
  return null;
214
218
  }
@@ -229,7 +233,7 @@ var ProPageHeader = function ProPageHeader(props) {
229
233
  // @ts-ignore
230
234
  backProps.backIcon = _createVNode(Button, null, {
231
235
  default: function _default() {
232
- return [_createTextVNode("\u8FD4\u56DE")];
236
+ return [contextLocale.value.pageContainer.back];
233
237
  }
234
238
  });
235
239
  backProps.onBack = function () {
@@ -19,17 +19,20 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
19
19
  "Button": "setup-maybe-ref",
20
20
  "computed": "setup-const",
21
21
  "_alertProps": "setup-maybe-ref",
22
+ "useLocaleReceiver": "setup-maybe-ref",
23
+ "contextLocale": "setup-maybe-ref",
22
24
  "props": "setup-reactive-const",
23
25
  "emits": "setup-const",
24
26
  "_message": "setup-ref",
25
27
  "onClose": "setup-const"
26
28
  } */
27
29
  import { defineComponent as _defineComponent } from 'vue';
28
- import { renderSlot as _renderSlot, createTextVNode as _createTextVNode, unref as _unref, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
30
+ import { renderSlot as _renderSlot, unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
29
31
  const _hoisted_1 = { class: "jtable-alert" };
30
32
  import { Alert, Button } from 'ant-design-vue';
31
33
  import { computed } from "vue";
32
34
  import { _alertProps } from "./setting";
35
+ import { useLocaleReceiver } from "../LocaleReciver/index";
33
36
  const __sfc_main__ = _defineComponent({
34
37
  ...{
35
38
  name: 'Alert'
@@ -37,10 +40,15 @@ const __sfc_main__ = _defineComponent({
37
40
  props: { ..._alertProps },
38
41
  emits: ['close'],
39
42
  setup(__props, { emit: __emit }) {
43
+ const [contextLocale] = useLocaleReceiver('ProTable');
40
44
  const props = __props;
41
45
  const emits = __emit;
42
46
  const _message = computed(() => {
43
- return '已选择' + (_optionalChain([props, 'access', _2 => _2.rowSelection, 'optionalAccess', _3 => _3.selectedRowKeys, 'optionalAccess', _4 => _4.length]) || 0) + '项';
47
+ let locale = contextLocale.value.alert.selectItem;
48
+ [_optionalChain([props, 'access', _2 => _2.rowSelection, 'optionalAccess', _3 => _3.selectedRowKeys, 'optionalAccess', _4 => _4.length]) || 0].forEach((item, index) => {
49
+ locale = locale.replace(`{${index}}`, item);
50
+ });
51
+ return locale;
44
52
  });
45
53
  const onClose = () => {
46
54
  emits('close');
@@ -58,7 +66,7 @@ const __sfc_main__ = _defineComponent({
58
66
  onClick: onClose
59
67
  }, {
60
68
  default: _withCtx(() => [
61
- _createTextVNode("取消选择")
69
+ _createTextVNode(_toDisplayString(_unref(contextLocale).alert.cancelChoose), 1 /* TEXT */)
62
70
  ]),
63
71
  _: 1 /* STABLE */
64
72
  })
@@ -2,8 +2,10 @@
2
2
  "Pagination": "setup-maybe-ref",
3
3
  "_paginationProps": "setup-maybe-ref",
4
4
  "computed": "setup-const",
5
+ "useLocaleReceiver": "setup-maybe-ref",
5
6
  "props": "setup-reactive-const",
6
7
  "emits": "setup-const",
8
+ "contextLocale": "setup-maybe-ref",
7
9
  "className": "setup-ref",
8
10
  "_showTotal": "setup-const",
9
11
  "onChange": "setup-const"
@@ -14,6 +16,7 @@ const _hoisted_1 = { class: "jtable-pagination" };
14
16
  import { Pagination } from 'ant-design-vue';
15
17
  import { _paginationProps } from "./setting";
16
18
  import { computed } from 'vue';
19
+ import { useLocaleReceiver } from "../LocaleReciver/index";
17
20
  const __sfc_main__ = _defineComponent({
18
21
  ...{
19
22
  name: 'Pagination'
@@ -23,6 +26,7 @@ const __sfc_main__ = _defineComponent({
23
26
  setup(__props, { emit: __emit }) {
24
27
  const props = __props;
25
28
  const emits = __emit;
29
+ const [contextLocale] = useLocaleReceiver('ProTable');
26
30
  const className = computed(() => {
27
31
  return {
28
32
  'show-content': !props.isShowContent,
@@ -31,7 +35,12 @@ const __sfc_main__ = _defineComponent({
31
35
  const _showTotal = (num) => {
32
36
  const minSize = props.pageIndex * props.pageSize + 1;
33
37
  const MaxSize = (props.pageIndex + 1) * props.pageSize;
34
- return `第 ${minSize} - ${MaxSize > num ? num : MaxSize} 条/总共 ${num} 条`;
38
+ // return `第 ${minSize} - ${ MaxSize > num ? num : MaxSize } 条/总共 ${num} 条`
39
+ let locale = contextLocale.value.pagination.total;
40
+ [minSize, MaxSize > num ? num : MaxSize, num].forEach((item, index) => {
41
+ locale = locale.replace(`{${index}}`, item);
42
+ });
43
+ return locale;
35
44
  };
36
45
  const onChange = (page, size) => {
37
46
  emits('change', page, size);
@@ -10,7 +10,7 @@
10
10
  "onClick": "setup-const"
11
11
  } */
12
12
  import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
13
- const _withScopeId = n => (_pushScopeId("data-v-1735098506101"), n = n(), _popScopeId(), n);
13
+ const _withScopeId = n => (_pushScopeId("data-v-1735888079886"), n = n(), _popScopeId(), n);
14
14
  const _hoisted_1 = ["onClick"];
15
15
  const __sfc_main__ = Object.assign({
16
16
  name: 'JRadioButton',
@@ -0,0 +1,61 @@
1
+ .j-scrollbar {
2
+ overflow: hidden;
3
+ position: relative;
4
+ height: 100%;
5
+ }
6
+ .j-scrollbar__wrap {
7
+ overflow: auto;
8
+ height: 100%;
9
+ }
10
+ .j-scrollbar__wrap--hidden-default {
11
+ scrollbar-width: none;
12
+ }
13
+ .j-scrollbar__wrap--hidden-default::-webkit-scrollbar {
14
+ display: none;
15
+ }
16
+ .j-scrollbar__thumb {
17
+ position: relative;
18
+ display: block;
19
+ width: 0;
20
+ height: 0;
21
+ cursor: pointer;
22
+ border-radius: inherit;
23
+ background-color: #909399;
24
+ transition: 0.3s background-color;
25
+ opacity: 0.3;
26
+ }
27
+ .j-scrollbar__thumb:hover {
28
+ background-color: #909399;
29
+ opacity: 0.5;
30
+ }
31
+ .j-scrollbar__bar {
32
+ position: absolute;
33
+ right: 2px;
34
+ bottom: 2px;
35
+ z-index: 1;
36
+ border-radius: 4px;
37
+ }
38
+ .j-scrollbar__bar--vertical {
39
+ width: 6px;
40
+ top: 2px;
41
+ }
42
+ .j-scrollbar__bar--vertical > div {
43
+ width: 100%;
44
+ }
45
+ .j-scrollbar__bar--horizontal {
46
+ height: 6px;
47
+ left: 2px;
48
+ }
49
+ .j-scrollbar__bar--horizontal > div {
50
+ height: 100%;
51
+ }
52
+ .j-scrollbar-fade-enter-active {
53
+ transition: opacity 340ms ease-out;
54
+ }
55
+ .j-scrollbar-fade-leave-active {
56
+ transition: opacity 120ms ease-out;
57
+ }
58
+ .j-scrollbar-fade-enter-from,
59
+ .j-scrollbar-fade-leave-active {
60
+ opacity: 0;
61
+ }
@@ -0,0 +1 @@
1
+ import './index.less';
@@ -0,0 +1,82 @@
1
+ @scrollbar-bg-color: #909399;
2
+ @scrollbar-hover-bg-color: #909399;
3
+ @scrollbar-hover-opacity: 0.5;
4
+ @scrollbar-opacity: 0.3;
5
+ @transition-duration: 0.3s;
6
+
7
+ .j-scrollbar {
8
+ overflow: hidden;
9
+ position: relative;
10
+ height: 100%;
11
+
12
+ &__wrap {
13
+ overflow: auto;
14
+ height: 100%;
15
+
16
+ &--hidden-default {
17
+ scrollbar-width: none;
18
+
19
+ &::-webkit-scrollbar {
20
+ display: none;
21
+ }
22
+ }
23
+ }
24
+
25
+ &__thumb {
26
+ position: relative;
27
+ display: block;
28
+ width: 0;
29
+ height: 0;
30
+ cursor: pointer;
31
+ border-radius: inherit;
32
+ background-color: @scrollbar-bg-color;
33
+ transition: @transition-duration background-color;
34
+ opacity: @scrollbar-opacity;
35
+
36
+ &:hover {
37
+ background-color: @scrollbar-hover-bg-color;
38
+ opacity: @scrollbar-hover-opacity;
39
+ }
40
+ }
41
+
42
+ &__bar {
43
+ position: absolute;
44
+ right: 2px;
45
+ bottom: 2px;
46
+ z-index: 1;
47
+ border-radius: 4px;
48
+
49
+ &--vertical {
50
+ width: 6px;
51
+ top: 2px;
52
+
53
+ > div {
54
+ width: 100%;
55
+ }
56
+ }
57
+
58
+ &--horizontal {
59
+ height: 6px;
60
+ left: 2px;
61
+
62
+ > div {
63
+ height: 100%;
64
+ }
65
+ }
66
+ }
67
+ }
68
+
69
+ .j-scrollbar-fade {
70
+ &-enter-active {
71
+ transition: opacity 340ms ease-out;
72
+ }
73
+
74
+ &-leave-active {
75
+ transition: opacity 120ms ease-out;
76
+ }
77
+
78
+ &-enter-from,
79
+ &-leave-active {
80
+ opacity: 0;
81
+ }
82
+ }
@@ -14,8 +14,10 @@
14
14
  "FormItemRest": "setup-maybe-ref",
15
15
  "Popover": "setup-maybe-ref",
16
16
  "message": "setup-maybe-ref",
17
+ "useLocaleReceiver": "setup-maybe-ref",
17
18
  "emit": "setup-const",
18
19
  "props": "setup-reactive-const",
20
+ "contextLocale": "setup-maybe-ref",
19
21
  "historyList": "setup-ref",
20
22
  "historyVisible": "setup-ref",
21
23
  "showEmpty": "setup-ref",
@@ -26,7 +28,7 @@
26
28
  "deleteHistory": "setup-const"
27
29
  } */
28
30
  import { defineComponent as _defineComponent } from 'vue';
29
- import { createTextVNode as _createTextVNode, unref as _unref, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, withModifiers as _withModifiers } from "vue";
31
+ import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createElementVNode as _createElementVNode, withModifiers as _withModifiers } from "vue";
30
32
  const _hoisted_1 = { class: "search-history-warp" };
31
33
  const _hoisted_2 = {
32
34
  key: 0,
@@ -42,6 +44,7 @@ import { computed, ref } from 'vue';
42
44
  import { isFunction } from 'lodash-es';
43
45
  import { AIcon, Empty, Ellipsis } from '../../../';
44
46
  import { Popconfirm, Button, FormItemRest, Popover, message } from 'ant-design-vue';
47
+ import { useLocaleReceiver } from "../../LocaleReciver";
45
48
  const __sfc_main__ = _defineComponent({
46
49
  props: {
47
50
  target: {
@@ -66,6 +69,7 @@ const __sfc_main__ = _defineComponent({
66
69
  setup(__props, { emit: __emit }) {
67
70
  const emit = __emit;
68
71
  const props = __props;
72
+ const [contextLocale] = useLocaleReceiver('Search');
69
73
  const historyList = ref([]);
70
74
  const historyVisible = ref(false);
71
75
  const showEmpty = computed(() => {
@@ -97,10 +101,10 @@ const __sfc_main__ = _defineComponent({
97
101
  const resp = await props.deleteRequest(props.target, item[props.deleteKey]);
98
102
  historyVisible.value = false;
99
103
  if (resp.success || resp.status === 200 || resp.code === 200) {
100
- message.success('操作成功');
104
+ message.success(contextLocale.value.advanced.saveHistory.success);
101
105
  }
102
106
  else {
103
- message.error('操作失败');
107
+ message.error(contextLocale.value.advanced.saveHistory.fail);
104
108
  }
105
109
  }
106
110
  };
@@ -114,7 +118,7 @@ const __sfc_main__ = _defineComponent({
114
118
  "html-type": "submit"
115
119
  }, {
116
120
  default: _withCtx(() => [
117
- _createTextVNode(" 搜索 ")
121
+ _createTextVNode(_toDisplayString(_unref(contextLocale).advanced.history.search), 1 /* TEXT */)
118
122
  ]),
119
123
  _: 1 /* STABLE */
120
124
  })
@@ -148,7 +152,7 @@ const __sfc_main__ = _defineComponent({
148
152
  }, 1024 /* DYNAMIC_SLOTS */)
149
153
  ], 8 /* PROPS */, _hoisted_3),
150
154
  _createVNode(_unref(Popconfirm), {
151
- title: "确认删除吗?",
155
+ title: _unref(contextLocale).advanced.history.confirmDelete,
152
156
  placement: "top",
153
157
  onConfirm: ($event) => (deleteHistory(item))
154
158
  }, {
@@ -158,7 +162,7 @@ const __sfc_main__ = _defineComponent({
158
162
  ])
159
163
  ]),
160
164
  _: 2 /* DYNAMIC */
161
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onConfirm"])
165
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["title", "onConfirm"])
162
166
  ]));
163
167
  }), 128 /* KEYED_FRAGMENT */))
164
168
  ]))