@jetlinks-web/components 2.4.12 → 2.4.14
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.
- package/es/AMap/Map.js +6 -2
- package/es/ConfigProvider/context.js +3 -0
- package/es/ConfigProvider/index.js +5 -2
- package/es/DragModal/DragModal.js +7 -3
- package/es/EditTable/FormItem.js +1 -1
- package/es/Empty/Empty.js +23 -13
- package/es/FullPage/FullPage.js +1 -1
- package/es/LocaleProvider/index.js +33 -0
- package/es/LocaleReciver/index.js +12 -0
- package/es/ProLayout/PageContainer/index.js +6 -2
- package/es/ProTable/Alert.js +11 -3
- package/es/ProTable/Pagination.js +10 -1
- package/es/ProTable/ProTable.js +8 -8
- package/es/ProTable/setting.js +2 -1
- package/es/RadioButton/RadioButton.js +1 -1
- package/es/Scrollbar/style/index.css +61 -0
- package/es/Scrollbar/style/index.js +1 -0
- package/es/Scrollbar/style/index.less +82 -0
- package/es/Search/Advanced/History.js +10 -6
- package/es/Search/Advanced/SaveHistory.js +15 -11
- package/es/Search/Advanced/index.js +11 -7
- package/es/Search/Item.js +15 -11
- package/es/Search/Search.js +7 -5
- package/es/Search/setting.js +63 -57
- package/es/Search/util.js +4 -4
- package/es/index.js +1 -0
- package/es/locale/en-US.js +77 -0
- package/es/locale/zh-CN.js +77 -0
- package/es/style/index.css +61 -0
- package/es/style/index.less +11 -10
- package/es/style.js +2 -1
- package/lib/AMap/Map.js +6 -2
- package/lib/ConfigProvider/context.js +3 -0
- package/lib/ConfigProvider/index.js +5 -2
- package/lib/DragModal/DragModal.js +7 -3
- package/lib/EditTable/FormItem.js +1 -1
- package/lib/Empty/Empty.js +23 -13
- package/lib/FullPage/FullPage.js +1 -1
- package/lib/LocaleProvider/index.js +33 -0
- package/lib/LocaleReciver/index.js +19 -0
- package/lib/ProLayout/PageContainer/index.js +6 -1
- package/lib/ProTable/Alert.js +11 -3
- package/lib/ProTable/Pagination.js +10 -1
- package/lib/ProTable/ProTable.js +8 -8
- package/lib/ProTable/setting.js +2 -1
- package/lib/RadioButton/RadioButton.js +1 -1
- package/lib/Scrollbar/style/index.css +61 -0
- package/lib/Scrollbar/style/index.js +3 -0
- package/lib/Scrollbar/style/index.less +82 -0
- package/lib/Search/Advanced/History.js +10 -6
- package/lib/Search/Advanced/SaveHistory.js +15 -11
- package/lib/Search/Advanced/index.js +11 -7
- package/lib/Search/Item.js +15 -11
- package/lib/Search/Search.js +7 -5
- package/lib/Search/setting.js +63 -57
- package/lib/Search/util.js +4 -4
- package/lib/index.js +1 -0
- package/lib/locale/en-US.js +83 -0
- package/lib/locale/zh-CN.js +83 -0
- package/lib/style/components.less +1 -0
- package/lib/style/index.css +61 -0
- package/lib/style/index.less +11 -10
- package/lib/style.js +2 -1
- 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:
|
|
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
|
}
|
|
@@ -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,
|
|
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
|
})
|
package/es/EditTable/FormItem.js
CHANGED
|
@@ -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-
|
|
51
|
+
const _withScopeId = n => (_pushScopeId("data-v-1735798898669"), 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(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
});
|
package/es/FullPage/FullPage.js
CHANGED
|
@@ -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-
|
|
12
|
+
const _withScopeId = n => (_pushScopeId("data-v-1735798899369"), 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,33 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"locale": "props",
|
|
3
|
+
"provide": "setup-const",
|
|
4
|
+
"reactive": "setup-const",
|
|
5
|
+
"defaultLocal": "setup-maybe-ref",
|
|
6
|
+
"props": "setup-reactive-const",
|
|
7
|
+
"state": "setup-reactive-const"
|
|
8
|
+
} */
|
|
9
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
10
|
+
import { renderSlot as _renderSlot } from "vue";
|
|
11
|
+
import { provide, reactive } from "vue";
|
|
12
|
+
import defaultLocal from '../locale/zh-CN';
|
|
13
|
+
const __sfc_main__ = _defineComponent({
|
|
14
|
+
props: {
|
|
15
|
+
locale: {
|
|
16
|
+
type: Object,
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const state = reactive({
|
|
22
|
+
antLocale: {
|
|
23
|
+
...props.locale || defaultLocal || {},
|
|
24
|
+
exist: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
provide('componentLocaleData', state);
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
return _renderSlot(_ctx.$slots, "default");
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
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
|
|
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 [
|
|
236
|
+
return [contextLocale.value.pageContainer.back];
|
|
233
237
|
}
|
|
234
238
|
});
|
|
235
239
|
backProps.onBack = function () {
|
package/es/ProTable/Alert.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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);
|
package/es/ProTable/ProTable.js
CHANGED
|
@@ -149,14 +149,6 @@ const __sfc_main__ = _defineComponent({
|
|
|
149
149
|
}
|
|
150
150
|
};
|
|
151
151
|
const _debounceFn = debounce(handleSearch, 300);
|
|
152
|
-
watch(() => props.params, (newValue) => {
|
|
153
|
-
_debounceFn(newValue || {});
|
|
154
|
-
}, { deep: true, immediate: true });
|
|
155
|
-
watch(() => props.dataSource, (newVal) => {
|
|
156
|
-
if (newVal && !props.request) {
|
|
157
|
-
handleSearch(props.params);
|
|
158
|
-
}
|
|
159
|
-
}, { deep: true, immediate: true });
|
|
160
152
|
const onPageChange = (_page, size) => {
|
|
161
153
|
handleSearch({
|
|
162
154
|
...props.params,
|
|
@@ -218,6 +210,14 @@ const __sfc_main__ = _defineComponent({
|
|
|
218
210
|
}
|
|
219
211
|
}
|
|
220
212
|
};
|
|
213
|
+
watch(() => props.params, (newValue) => {
|
|
214
|
+
_debounceFn(newValue || {});
|
|
215
|
+
}, { deep: true, immediate: true });
|
|
216
|
+
watch(() => props.dataSource, (newVal) => {
|
|
217
|
+
if (newVal && !props.request) {
|
|
218
|
+
handleSearch(props.params);
|
|
219
|
+
}
|
|
220
|
+
}, { deep: true, immediate: true });
|
|
221
221
|
onMounted(() => {
|
|
222
222
|
windowChange(); // 初始化
|
|
223
223
|
window.onresize = () => {
|
package/es/ProTable/setting.js
CHANGED
|
@@ -3,6 +3,7 @@ import { tableProps } from "ant-design-vue/es/table/Table";
|
|
|
3
3
|
import "vue";
|
|
4
4
|
import "ant-design-vue/es/table";
|
|
5
5
|
import { paginationProps } from 'ant-design-vue/es/pagination/Pagination';
|
|
6
|
+
import { omit } from 'lodash-es';
|
|
6
7
|
export var _headerProps = {
|
|
7
8
|
mode: {
|
|
8
9
|
type: [String, undefined],
|
|
@@ -57,7 +58,7 @@ export var _contentProps = _objectSpread(_objectSpread(_objectSpread({}, tablePr
|
|
|
57
58
|
default: 'id'
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
|
-
export var _paginationProps = _objectSpread(_objectSpread({}, paginationProps()), {}, {
|
|
61
|
+
export var _paginationProps = _objectSpread(_objectSpread({}, omit(paginationProps(), ['onChange'])), {}, {
|
|
61
62
|
total: {
|
|
62
63
|
type: Number,
|
|
63
64
|
default: 0
|
|
@@ -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-
|
|
13
|
+
const _withScopeId = n => (_pushScopeId("data-v-1735798900601"), 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
|
+
}
|