@jetlinks-web/components 2.0.2 → 2.0.3
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 +124 -0
- package/es/AMap/index.js +2 -0
- package/es/AMap/util.js +56 -0
- package/es/BadgeStatus/Badge.js +54 -0
- package/es/BadgeStatus/color.js +21 -0
- package/es/BadgeStatus/index.js +3 -0
- package/es/CardSelect/CardSelect.js +123 -0
- package/es/CardSelect/index.js +2 -0
- package/es/CheckButton/CheckButton.js +121 -0
- package/es/CheckButton/index.js +2 -0
- package/es/ConfigProvider/context.js +12 -0
- package/es/ConfigProvider/index.js +31 -0
- package/es/Echarts/Echarts.js +47 -0
- package/es/Echarts/index.js +2 -0
- package/es/Ellipsis/Ellipsis.js +189 -0
- package/es/Ellipsis/index.js +2 -0
- package/es/Empty/Empty.js +56 -0
- package/es/Empty/image.js +2 -0
- package/es/Empty/index.js +2 -0
- package/es/FullPage/FullPage.js +31 -0
- package/es/FullPage/index.js +2 -0
- package/es/Icon/icon.js +42 -0
- package/{src/Icon/index.ts → es/Icon/index.js} +2 -3
- package/es/MonacoEditor/Monaco.js +238 -0
- package/es/MonacoEditor/index.js +2 -0
- package/es/PermissionButton/index.js +117 -0
- package/es/ProLayout/Basic/BasicLayout.js +259 -0
- package/es/ProLayout/Basic/Header.js +97 -0
- package/es/ProLayout/PageContainer/index.js +324 -0
- package/es/ProLayout/PageContainer/typings.js +1 -0
- package/es/ProLayout/RouteContext.js +22 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +285 -0
- package/es/ProLayout/SiderMenu/SiderMenu.js +278 -0
- package/es/ProLayout/SiderMenu/index.js +2 -0
- package/es/ProLayout/SiderMenu/typings.js +1 -0
- package/es/ProLayout/TopHeader/index.js +163 -0
- package/es/ProLayout/defaultSettings.js +66 -0
- package/{src/ProLayout/index.ts → es/ProLayout/index.js} +4 -6
- package/{src → es}/ProLayout/style/default.less +4 -4
- package/es/ProLayout/style/index.js +1 -0
- package/es/ProLayout/typings.js +1 -0
- package/es/ProLayout/util.js +61 -0
- package/es/ProTable/index.js +411 -0
- package/es/ProTable/proTableTypes.js +11 -0
- package/es/ProTable/style/index.css +65 -0
- package/es/ProTable/style/index.js +1 -0
- package/es/Scrollbar/Bar.js +114 -0
- package/es/Scrollbar/Scrollbar.js +212 -0
- package/es/Scrollbar/Thumb.js +189 -0
- package/es/Scrollbar/constants.js +1 -0
- package/es/Scrollbar/index.js +2 -0
- package/es/Scrollbar/scrollbarProps.js +100 -0
- package/es/Scrollbar/thumbProps.js +10 -0
- package/es/Scrollbar/util.js +30 -0
- package/es/Search/Advanced/History.js +183 -0
- package/es/Search/Advanced/SaveHistory.js +153 -0
- package/es/Search/Advanced/index.js +520 -0
- package/es/Search/Item.js +497 -0
- package/es/Search/Search.js +249 -0
- package/es/Search/hooks/index.js +1 -0
- package/es/Search/hooks/useSearchItems.js +40 -0
- package/es/Search/index.js +4 -0
- package/es/Search/setting.js +91 -0
- package/es/Search/style/Item.less +33 -0
- package/es/Search/style/Search.less +179 -0
- package/es/Search/style/index.js +2 -0
- package/es/Search/typing.js +1 -0
- package/es/Search/util.js +234 -0
- package/es/ValueItem/ValueItem.js +233 -0
- package/es/ValueItem/index.js +2 -0
- package/es/ValueItem/util.js +16 -0
- package/es/index.js +24 -0
- package/es/style/index.js +3 -0
- package/es/style/variable.css +0 -0
- package/{src → es}/style/variable.less +0 -2
- package/es/style.js +3 -0
- package/lib/AMap/Map.js +124 -0
- package/lib/AMap/index.js +9 -0
- package/lib/AMap/util.js +62 -0
- package/lib/BadgeStatus/Badge.js +54 -0
- package/lib/BadgeStatus/color.js +27 -0
- package/lib/BadgeStatus/index.js +22 -0
- package/lib/CardSelect/CardSelect.js +123 -0
- package/lib/CardSelect/index.js +9 -0
- package/lib/CheckButton/CheckButton.js +121 -0
- package/lib/CheckButton/index.js +9 -0
- package/lib/ConfigProvider/context.js +19 -0
- package/lib/ConfigProvider/index.js +37 -0
- package/lib/Echarts/Echarts.js +47 -0
- package/lib/Echarts/index.js +9 -0
- package/lib/Ellipsis/Ellipsis.js +189 -0
- package/lib/Ellipsis/index.js +9 -0
- package/lib/Empty/Empty.js +56 -0
- package/lib/Empty/image.js +8 -0
- package/lib/Empty/index.js +9 -0
- package/lib/FullPage/FullPage.js +31 -0
- package/lib/FullPage/index.js +9 -0
- package/lib/Icon/icon.js +52 -0
- package/lib/Icon/index.js +9 -0
- package/lib/MonacoEditor/Monaco.js +238 -0
- package/lib/MonacoEditor/index.js +9 -0
- package/lib/PermissionButton/index.js +124 -0
- package/lib/ProLayout/Basic/BasicLayout.js +268 -0
- package/lib/ProLayout/Basic/BasicLayout.less +66 -0
- package/lib/ProLayout/Basic/Header.js +103 -0
- package/lib/ProLayout/Basic/Header.less +8 -0
- package/lib/ProLayout/PageContainer/index.js +327 -0
- package/lib/ProLayout/PageContainer/index.less +103 -0
- package/lib/ProLayout/PageContainer/typings.js +5 -0
- package/lib/ProLayout/RouteContext.js +28 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +290 -0
- package/lib/ProLayout/SiderMenu/SiderMenu.js +287 -0
- package/lib/ProLayout/SiderMenu/index.js +20 -0
- package/lib/ProLayout/SiderMenu/index.less +212 -0
- package/lib/ProLayout/SiderMenu/typings.js +5 -0
- package/lib/ProLayout/TopHeader/index.js +168 -0
- package/lib/ProLayout/TopHeader/index.less +174 -0
- package/lib/ProLayout/defaultSettings.js +72 -0
- package/lib/ProLayout/index.js +16 -0
- package/lib/ProLayout/style/default.less +4 -0
- package/lib/ProLayout/style/index.js +3 -0
- package/lib/ProLayout/style/style.less +7 -0
- package/lib/ProLayout/typings.js +5 -0
- package/lib/ProLayout/util.js +72 -0
- package/lib/ProTable/index.js +417 -0
- package/lib/ProTable/proTableTypes.js +17 -0
- package/lib/ProTable/style/index.css +65 -0
- package/lib/ProTable/style/index.js +3 -0
- package/lib/ProTable/style/index.less +92 -0
- package/lib/Scrollbar/Bar.js +114 -0
- package/lib/Scrollbar/Scrollbar.js +212 -0
- package/lib/Scrollbar/Thumb.js +189 -0
- package/lib/Scrollbar/constants.js +7 -0
- package/lib/Scrollbar/index.js +9 -0
- package/{src/Scrollbar/scrollbar.ts → lib/Scrollbar/scrollbarProps.js} +106 -108
- package/lib/Scrollbar/thumbProps.js +16 -0
- package/lib/Scrollbar/util.js +37 -0
- package/lib/Search/Advanced/History.js +183 -0
- package/lib/Search/Advanced/SaveHistory.js +153 -0
- package/lib/Search/Advanced/index.js +520 -0
- package/lib/Search/Item.js +497 -0
- package/lib/Search/Search.js +249 -0
- package/lib/Search/hooks/index.js +16 -0
- package/lib/Search/hooks/useSearchItems.js +47 -0
- package/lib/Search/index.js +16 -0
- package/lib/Search/setting.js +97 -0
- package/lib/Search/style/Item.less +33 -0
- package/lib/Search/style/Search.less +179 -0
- package/lib/Search/style/index.js +4 -0
- package/lib/Search/typing.js +5 -0
- package/lib/Search/util.js +241 -0
- package/lib/ValueItem/ValueItem.js +233 -0
- package/lib/ValueItem/index.js +9 -0
- package/lib/ValueItem/util.js +22 -0
- package/lib/index.js +158 -0
- package/lib/style/components.less +1 -0
- package/lib/style/index.js +4 -0
- package/lib/style/variable.css +0 -0
- package/lib/style/variable.less +2 -0
- package/lib/style.js +5 -0
- package/package.json +122 -13
- package/index.ts +0 -64
- package/src/AMap/Map.vue +0 -110
- package/src/AMap/index.ts +0 -1
- package/src/AMap/util.ts +0 -56
- package/src/BadgeStatus/Badge.vue +0 -41
- package/src/BadgeStatus/color.ts +0 -25
- package/src/BadgeStatus/index.ts +0 -4
- package/src/CardSelect/CardSelect.vue +0 -136
- package/src/CardSelect/index.ts +0 -3
- package/src/CheckButton/CheckButton.vue +0 -146
- package/src/CheckButton/index.md +0 -27
- package/src/CheckButton/index.ts +0 -3
- package/src/ConfigProvider/context.ts +0 -17
- package/src/ConfigProvider/index.tsx +0 -42
- package/src/Echarts/Echarts.vue +0 -43
- package/src/Echarts/index.ts +0 -3
- package/src/Ellipsis/Ellipsis.vue +0 -182
- package/src/Ellipsis/index.ts +0 -3
- package/src/Empty/Empty.vue +0 -43
- package/src/Empty/image.ts +0 -3
- package/src/Empty/index.ts +0 -2
- package/src/FullPage/FullPage.vue +0 -30
- package/src/FullPage/index.ts +0 -3
- package/src/Icon/icon.tsx +0 -40
- package/src/MonacoEditor/Monaco.vue +0 -242
- package/src/MonacoEditor/index.md +0 -26
- package/src/MonacoEditor/index.ts +0 -2
- package/src/PermissionButton/index.tsx +0 -110
- package/src/ProLayout/Basic/BasicLayout.tsx +0 -392
- package/src/ProLayout/Basic/Header.tsx +0 -115
- package/src/ProLayout/PageContainer/index.tsx +0 -441
- package/src/ProLayout/PageContainer/typings.ts +0 -56
- package/src/ProLayout/RouteContext.ts +0 -87
- package/src/ProLayout/SiderMenu/BaseMenu.tsx +0 -296
- package/src/ProLayout/SiderMenu/SiderMenu.tsx +0 -320
- package/src/ProLayout/SiderMenu/index.ts +0 -2
- package/src/ProLayout/SiderMenu/typings.ts +0 -49
- package/src/ProLayout/TopHeader/index.tsx +0 -210
- package/src/ProLayout/defaultSettings.ts +0 -106
- package/src/ProLayout/style/index.ts +0 -1
- package/src/ProLayout/typings.ts +0 -87
- package/src/ProLayout/util.ts +0 -64
- package/src/ProTable/index.md +0 -53
- package/src/ProTable/index.tsx +0 -551
- package/src/ProTable/proTableTypes.ts +0 -70
- package/src/ProTable/style/index.ts +0 -1
- package/src/Scrollbar/Bar.vue +0 -75
- package/src/Scrollbar/Scrollbar.vue +0 -260
- package/src/Scrollbar/Thumb.vue +0 -163
- package/src/Scrollbar/constants.ts +0 -10
- package/src/Scrollbar/index.ts +0 -4
- package/src/Scrollbar/thumb.ts +0 -16
- package/src/Scrollbar/util.ts +0 -38
- package/src/Search/Advanced/History.vue +0 -140
- package/src/Search/Advanced/SaveHistory.vue +0 -108
- package/src/Search/Advanced/index.vue +0 -435
- package/src/Search/Item.vue +0 -525
- package/src/Search/Search.vue +0 -398
- package/src/Search/hooks/index.ts +0 -1
- package/src/Search/hooks/useSearchItems.ts +0 -68
- package/src/Search/index.md +0 -57
- package/src/Search/index.ts +0 -5
- package/src/Search/setting.ts +0 -55
- package/src/Search/typing.ts +0 -76
- package/src/Search/util.ts +0 -263
- package/src/ValueItem/ValueItem.vue +0 -192
- package/src/ValueItem/index.ts +0 -3
- package/src/ValueItem/util.ts +0 -16
- package/src/style/index.ts +0 -3
- /package/{src → es}/ProLayout/Basic/BasicLayout.less +0 -0
- /package/{src → es}/ProLayout/Basic/Header.less +0 -0
- /package/{src → es}/ProLayout/PageContainer/index.less +0 -0
- /package/{src → es}/ProLayout/SiderMenu/index.less +0 -0
- /package/{src → es}/ProLayout/TopHeader/index.less +0 -0
- /package/{src → es}/ProLayout/style/style.less +0 -0
- /package/{src → es}/ProTable/style/index.less +0 -0
package/lib/AMap/util.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MapProps = void 0;
|
|
7
|
+
var MapProps = exports.MapProps = function MapProps() {
|
|
8
|
+
return {
|
|
9
|
+
// 响应式
|
|
10
|
+
center: Array,
|
|
11
|
+
labelzIndex: Number,
|
|
12
|
+
lang: String,
|
|
13
|
+
mapStyle: String,
|
|
14
|
+
// 静态属性
|
|
15
|
+
vid: String,
|
|
16
|
+
amapManager: Object,
|
|
17
|
+
defaultCursor: String,
|
|
18
|
+
animateEnable: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true
|
|
21
|
+
},
|
|
22
|
+
isHotspot: Boolean,
|
|
23
|
+
rotateEnable: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
resizeEnable: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
},
|
|
31
|
+
showIndoorMap: Boolean,
|
|
32
|
+
expandZoomRange: Boolean,
|
|
33
|
+
dragEnable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
},
|
|
37
|
+
zoomEnable: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: true
|
|
40
|
+
},
|
|
41
|
+
doubleClickZoom: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: true
|
|
44
|
+
},
|
|
45
|
+
keyboardEnable: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
},
|
|
49
|
+
jogEnable: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
scrollWheel: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true
|
|
56
|
+
},
|
|
57
|
+
touchZoom: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: true
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"text": "props",
|
|
3
|
+
"status": "props",
|
|
4
|
+
"statusNames": "props",
|
|
5
|
+
"computed": "setup-const",
|
|
6
|
+
"getHexColor": "setup-maybe-ref",
|
|
7
|
+
"props": "setup-reactive-const",
|
|
8
|
+
"_color": "setup-ref"
|
|
9
|
+
} */
|
|
10
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
11
|
+
import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
12
|
+
import { computed } from 'vue';
|
|
13
|
+
import { getHexColor } from './color';
|
|
14
|
+
const __sfc_main__ = _defineComponent({
|
|
15
|
+
props: {
|
|
16
|
+
text: {
|
|
17
|
+
type: String,
|
|
18
|
+
},
|
|
19
|
+
status: {
|
|
20
|
+
type: [String, Number],
|
|
21
|
+
default: 'default',
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* 自定义status值颜色
|
|
25
|
+
* @example {
|
|
26
|
+
* 1: 'success',
|
|
27
|
+
* 0: 'error'
|
|
28
|
+
* }
|
|
29
|
+
*/
|
|
30
|
+
statusNames: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({
|
|
33
|
+
'success': 'success',
|
|
34
|
+
'warning': 'warning',
|
|
35
|
+
'error': 'error',
|
|
36
|
+
'default': 'default',
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
setup(__props) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const _color = computed(() => {
|
|
43
|
+
return getHexColor(props.status, props.statusNames, 1);
|
|
44
|
+
});
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
const _component_a_badge = _resolveComponent("a-badge");
|
|
47
|
+
return (_openBlock(), _createBlock(_component_a_badge, {
|
|
48
|
+
color: _color.value,
|
|
49
|
+
text: __props.text
|
|
50
|
+
}, null, 8 /* PROPS */, ["color", "text"]));
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getHexColor = exports.default = void 0;
|
|
7
|
+
var colorMap = {
|
|
8
|
+
'success': '36, 178, 118',
|
|
9
|
+
'warning': '255, 144, 0',
|
|
10
|
+
'error': '229, 0, 18',
|
|
11
|
+
'processing': '9, 46, 231',
|
|
12
|
+
'default': '102, 102, 102'
|
|
13
|
+
};
|
|
14
|
+
var getHexColor = exports.getHexColor = function getHexColor(code, statusNames) {
|
|
15
|
+
var pe = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.1;
|
|
16
|
+
if (!code) {
|
|
17
|
+
return "rgba(102, 102, 102, ".concat(pe, ")");
|
|
18
|
+
}
|
|
19
|
+
if (colorMap[code]) {
|
|
20
|
+
return "rgba(".concat(colorMap[code], ", ").concat(pe, ")");
|
|
21
|
+
}
|
|
22
|
+
if (Object.keys(statusNames).length) {
|
|
23
|
+
return statusNames[code];
|
|
24
|
+
}
|
|
25
|
+
return;
|
|
26
|
+
};
|
|
27
|
+
var _default = exports.default = colorMap;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
var _exportNames = {};
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _Badge = _interopRequireDefault(require("./Badge.js"));
|
|
10
|
+
var _color = require("./color");
|
|
11
|
+
Object.keys(_color).forEach(function (key) {
|
|
12
|
+
if (key === "default" || key === "__esModule") return;
|
|
13
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
|
+
if (key in exports && exports[key] === _color[key]) return;
|
|
15
|
+
Object.defineProperty(exports, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function get() {
|
|
18
|
+
return _color[key];
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
var _default = exports.default = _Badge.default;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"layout": "props",
|
|
3
|
+
"options": "props",
|
|
4
|
+
"disabled": "props",
|
|
5
|
+
"multiple": "props",
|
|
6
|
+
"column": "props",
|
|
7
|
+
"value": "props",
|
|
8
|
+
"itemLayout": "props",
|
|
9
|
+
"has": "setup-maybe-ref",
|
|
10
|
+
"props": "setup-reactive-const",
|
|
11
|
+
"emit": "setup-const",
|
|
12
|
+
"selectKeys": "setup-maybe-ref",
|
|
13
|
+
"CardSelectStyle": "setup-maybe-ref",
|
|
14
|
+
"isMultiple": "setup-maybe-ref",
|
|
15
|
+
"handleSelect": "setup-const"
|
|
16
|
+
} */
|
|
17
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
|
|
18
|
+
const _hoisted_1 = ["onClick"];
|
|
19
|
+
const _hoisted_2 = { class: "j-card-select-item-content" };
|
|
20
|
+
const _hoisted_3 = { class: "j-card-select-title" };
|
|
21
|
+
const _hoisted_4 = { class: "j-card-select-describe" };
|
|
22
|
+
import { has } from 'lodash-es';
|
|
23
|
+
const __sfc_main__ = {
|
|
24
|
+
props: {
|
|
25
|
+
layout: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'horizontal'
|
|
28
|
+
},
|
|
29
|
+
options: {
|
|
30
|
+
type: Array,
|
|
31
|
+
default: () => [],
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
multiple: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
column: {
|
|
42
|
+
type: Number,
|
|
43
|
+
default: 3,
|
|
44
|
+
},
|
|
45
|
+
value: {
|
|
46
|
+
type: [String, Array],
|
|
47
|
+
default: undefined,
|
|
48
|
+
},
|
|
49
|
+
itemLayout: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'horizontal'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
emits: ['select', 'change', 'update:value'],
|
|
55
|
+
setup(__props, { emit: __emit }) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const emit = __emit;
|
|
58
|
+
const selectKeys = ref([]);
|
|
59
|
+
const CardSelectStyle = computed(() => {
|
|
60
|
+
const _column = props.column > 0 && props.layout === 'horizontal' ? props.column : 1;
|
|
61
|
+
return {
|
|
62
|
+
'grid-template-columns': `repeat(${_column}, 1fr)`
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const isMultiple = computed(() => {
|
|
66
|
+
return has(props, 'multiple') && props.multiple !== false;
|
|
67
|
+
});
|
|
68
|
+
const handleSelect = (key, node) => {
|
|
69
|
+
if (props.disabled || node.disabled) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const selectKeysSet = new Set(selectKeys.value);
|
|
73
|
+
const isActive = selectKeysSet.has(key);
|
|
74
|
+
if (isMultiple.value) {
|
|
75
|
+
if (isActive) {
|
|
76
|
+
selectKeysSet.delete(key);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
selectKeysSet.add(key);
|
|
80
|
+
}
|
|
81
|
+
selectKeys.value = [...selectKeysSet.values()];
|
|
82
|
+
const nodes = props.options.filter(item => selectKeys.value.includes(item.value));
|
|
83
|
+
emit('select', selectKeys.value, nodes);
|
|
84
|
+
emit('change', selectKeys.value, nodes);
|
|
85
|
+
emit('update:value', selectKeys.value);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
selectKeys.value = [key];
|
|
89
|
+
emit('select', key, node);
|
|
90
|
+
emit('change', key, node);
|
|
91
|
+
emit('update:value', key);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
watch(() => props.value, () => {
|
|
95
|
+
selectKeys.value = isMultiple.value ? props.value : [props.value];
|
|
96
|
+
}, { immediate: true });
|
|
97
|
+
return (_ctx, _cache) => {
|
|
98
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
99
|
+
class: "j-card-select",
|
|
100
|
+
style: _normalizeStyle(_unref(CardSelectStyle))
|
|
101
|
+
}, [
|
|
102
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, (item) => {
|
|
103
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
104
|
+
class: _normalizeClass({
|
|
105
|
+
'j-card-select-item': true,
|
|
106
|
+
'disabled': __props.disabled || item.disabled,
|
|
107
|
+
'active': _unref(selectKeys).includes(item.value)
|
|
108
|
+
}),
|
|
109
|
+
onClick: () => handleSelect(item.value, item)
|
|
110
|
+
}, [
|
|
111
|
+
_renderSlot(_ctx.$slots, "itemRender", { node: item }, () => [
|
|
112
|
+
_createElementVNode("div", _hoisted_2, [
|
|
113
|
+
_createElementVNode("div", _hoisted_3, _toDisplayString(item.label), 1 /* TEXT */),
|
|
114
|
+
_createElementVNode("div", _hoisted_4, _toDisplayString(item.describe), 1 /* TEXT */)
|
|
115
|
+
])
|
|
116
|
+
])
|
|
117
|
+
], 10 /* CLASS, PROPS */, _hoisted_1));
|
|
118
|
+
}), 256 /* UNKEYED_FRAGMENT */))
|
|
119
|
+
], 4 /* STYLE */));
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _CardSelect = _interopRequireDefault(require("./CardSelect.js"));
|
|
9
|
+
var _default = exports.default = _CardSelect.default;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"value": "props",
|
|
3
|
+
"options": "props",
|
|
4
|
+
"multiple": "props",
|
|
5
|
+
"disabled": "props",
|
|
6
|
+
"class": "props",
|
|
7
|
+
"style": "props",
|
|
8
|
+
"computed": "setup-const",
|
|
9
|
+
"CSSProperties": "setup-const",
|
|
10
|
+
"PropType": "setup-const",
|
|
11
|
+
"ref": "setup-const",
|
|
12
|
+
"watch": "setup-const",
|
|
13
|
+
"isArray": "setup-maybe-ref",
|
|
14
|
+
"props": "setup-reactive-const",
|
|
15
|
+
"emit": "setup-const",
|
|
16
|
+
"myValue": "setup-ref",
|
|
17
|
+
"optionsMap": "setup-ref",
|
|
18
|
+
"_options": "setup-ref",
|
|
19
|
+
"selected": "setup-const"
|
|
20
|
+
} */
|
|
21
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
22
|
+
import { 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";
|
|
23
|
+
const _withScopeId = n => (_pushScopeId("data-v-1712546546207"), n = n(), _popScopeId(), n);
|
|
24
|
+
const _hoisted_1 = ["onClick"];
|
|
25
|
+
import { computed, ref, watch } from 'vue';
|
|
26
|
+
import { isArray } from '@jetlinks-web/utils';
|
|
27
|
+
const __sfc_main__ = _defineComponent({
|
|
28
|
+
props: {
|
|
29
|
+
value: {
|
|
30
|
+
type: [String, Array],
|
|
31
|
+
default: undefined,
|
|
32
|
+
},
|
|
33
|
+
options: {
|
|
34
|
+
type: Array,
|
|
35
|
+
default: () => [],
|
|
36
|
+
},
|
|
37
|
+
multiple: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
class: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: undefined,
|
|
48
|
+
},
|
|
49
|
+
style: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: () => ({}),
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
emits: ['update:value', 'change', 'select'],
|
|
55
|
+
setup(__props, { emit: __emit }) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const emit = __emit;
|
|
58
|
+
const myValue = ref();
|
|
59
|
+
const optionsMap = ref(new Map());
|
|
60
|
+
const _options = computed(() => {
|
|
61
|
+
props.options.forEach((item) => {
|
|
62
|
+
if (props.disabled) {
|
|
63
|
+
item.display = props.disabled;
|
|
64
|
+
}
|
|
65
|
+
optionsMap.value.set(item.value, item);
|
|
66
|
+
});
|
|
67
|
+
return props.options;
|
|
68
|
+
});
|
|
69
|
+
watch(() => props.value, () => {
|
|
70
|
+
if (props.value) {
|
|
71
|
+
myValue.value = isArray(props.value) ? props.value : [props.value];
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
myValue.value = [];
|
|
75
|
+
}
|
|
76
|
+
}, { immediate: true, deep: true });
|
|
77
|
+
const selected = (key, disabled) => {
|
|
78
|
+
if (disabled)
|
|
79
|
+
return;
|
|
80
|
+
const values = new Set(myValue.value);
|
|
81
|
+
if (values.has(key)) {
|
|
82
|
+
values.delete(key);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
if (!props.multiple) {
|
|
86
|
+
values.clear();
|
|
87
|
+
}
|
|
88
|
+
values.add(key);
|
|
89
|
+
}
|
|
90
|
+
myValue.value = [...values.values()];
|
|
91
|
+
const optionsItems = myValue.value.map((_key) => {
|
|
92
|
+
return optionsMap.value.get(_key);
|
|
93
|
+
});
|
|
94
|
+
const _value = props.multiple ? myValue.value : myValue.value[0];
|
|
95
|
+
emit('update:value', _value);
|
|
96
|
+
emit('change', _value, props.multiple ? optionsItems : optionsItems[0]);
|
|
97
|
+
emit('select', _value, props.multiple ? optionsItems : optionsItems[0]);
|
|
98
|
+
};
|
|
99
|
+
return (_ctx, _cache) => {
|
|
100
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
101
|
+
class: _normalizeClass(['j-check-button', props.class]),
|
|
102
|
+
style: _normalizeStyle(__props.style)
|
|
103
|
+
}, [
|
|
104
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_options.value, (item) => {
|
|
105
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
106
|
+
key: item.value,
|
|
107
|
+
class: _normalizeClass([
|
|
108
|
+
'j-check-button-item',
|
|
109
|
+
myValue.value.includes(item.value) ? 'selected' : '',
|
|
110
|
+
item.disabled ? 'disabled' : '',
|
|
111
|
+
]),
|
|
112
|
+
onClick: () => {
|
|
113
|
+
selected(item.value, item.disabled);
|
|
114
|
+
}
|
|
115
|
+
}, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1));
|
|
116
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
117
|
+
], 6 /* CLASS, STYLE */));
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _CheckButton = _interopRequireDefault(require("./CheckButton.js"));
|
|
9
|
+
var _default = exports.default = _CheckButton.default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.configProps = void 0;
|
|
8
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
+
var _context = require("ant-design-vue/es/config-provider/context");
|
|
10
|
+
var configProps = exports.configProps = function configProps() {
|
|
11
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _context.configProviderProps)()), {}, {
|
|
12
|
+
IconConfig: {
|
|
13
|
+
type: Object
|
|
14
|
+
},
|
|
15
|
+
MapConfig: {
|
|
16
|
+
type: Object
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _vue = require("vue");
|
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _context = require("./context");
|
|
11
|
+
var _constants = require("@jetlinks-web/constants");
|
|
12
|
+
var _antDesignVue = require("ant-design-vue");
|
|
13
|
+
var _lodashEs = require("lodash");
|
|
14
|
+
var _Empty = _interopRequireDefault(require("../Empty"));
|
|
15
|
+
var JConfigProvider = (0, _vue.defineComponent)({
|
|
16
|
+
name: 'JConfigProvider',
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
props: (0, _objectSpread2.default)({}, (0, _context.configProps)()),
|
|
19
|
+
setup: function setup(props, _ref) {
|
|
20
|
+
var slots = _ref.slots;
|
|
21
|
+
var _iconConfig = (0, _vue.reactive)(props.IconConfig || {});
|
|
22
|
+
var _mapConfig = (0, _vue.reactive)(props.MapConfig || {});
|
|
23
|
+
(0, _vue.provide)(_constants.ComponentsEnum.Icon, _iconConfig); // 全局Icon 配置
|
|
24
|
+
(0, _vue.provide)(_constants.MAPConfig, _mapConfig); // 全局地图配置
|
|
25
|
+
return function () {
|
|
26
|
+
return (0, _vue.h)(_antDesignVue.ConfigProvider, (0, _objectSpread2.default)({}, (0, _lodashEs.omit)(props, ['IconConfig', 'MapConfig'])), {
|
|
27
|
+
default: slots.default,
|
|
28
|
+
renderEmpty: function renderEmpty() {
|
|
29
|
+
var _slots$renderEmpty;
|
|
30
|
+
return ((_slots$renderEmpty = slots.renderEmpty) === null || _slots$renderEmpty === void 0 ? void 0 : _slots$renderEmpty.call(slots)) || (0, _vue.createVNode)(_Empty.default, null, null);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
JConfigProvider.config = _antDesignVue.ConfigProvider.config;
|
|
37
|
+
var _default = exports.default = JConfigProvider;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"options": "props",
|
|
3
|
+
"style": "props",
|
|
4
|
+
"CSSProperties": "setup-const",
|
|
5
|
+
"nextTick": "setup-const",
|
|
6
|
+
"ref": "setup-const",
|
|
7
|
+
"watch": "setup-const",
|
|
8
|
+
"Ref": "setup-const",
|
|
9
|
+
"useECharts": "setup-maybe-ref",
|
|
10
|
+
"props": "setup-reactive-const",
|
|
11
|
+
"echartsDom": "setup-ref",
|
|
12
|
+
"setOptions": "setup-maybe-ref"
|
|
13
|
+
} */
|
|
14
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
15
|
+
import { normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
16
|
+
import { nextTick, ref, watch, } from 'vue';
|
|
17
|
+
import { useECharts } from '@jetlinks-web/hooks';
|
|
18
|
+
const __sfc_main__ = _defineComponent({
|
|
19
|
+
props: {
|
|
20
|
+
options: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: undefined,
|
|
23
|
+
},
|
|
24
|
+
style: Object,
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const echartsDom = ref();
|
|
29
|
+
const { setOptions } = useECharts(echartsDom.value);
|
|
30
|
+
watch(() => JSON.stringify(props.options), () => {
|
|
31
|
+
if (props.options) {
|
|
32
|
+
nextTick(() => {
|
|
33
|
+
setOptions(props.options);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}, { immediate: true });
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
39
|
+
ref_key: "echartsDom",
|
|
40
|
+
ref: echartsDom,
|
|
41
|
+
class: "echarts-warp",
|
|
42
|
+
style: _normalizeStyle(__props.style)
|
|
43
|
+
}, null, 4 /* STYLE */));
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _Echarts = _interopRequireDefault(require("./Echarts.js"));
|
|
9
|
+
var _default = exports.default = _Echarts.default;
|