@dckj-npm/dc-material 0.1.6 → 0.1.8
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/build/index.js +12 -19
- package/build/lowcode/assets-daily.json +67 -0
- package/build/lowcode/assets-dev.json +67 -0
- package/build/lowcode/assets-prod.json +67 -0
- package/build/lowcode/designer.html +302 -0
- package/build/lowcode/index.html +304 -0
- package/build/lowcode/index.js +1 -0
- package/build/lowcode/meta.js +1 -0
- package/build/lowcode/preview.css +1 -0
- package/build/lowcode/preview.html +33 -0
- package/build/lowcode/preview.js +308 -0
- package/build/lowcode/render/default/view.css +1 -0
- package/build/lowcode/render/default/view.js +295 -0
- package/build/lowcode/view.css +1 -0
- package/build/lowcode/view.js +295 -0
- package/dist/BizComps.css +1 -1
- package/dist/BizComps.js +5 -5
- package/dist/BizComps.js.map +1 -1
- package/es/components/bottom-navigation/bottom-navigation.d.ts +13 -13
- package/es/components/bottom-navigation/index.d.ts +3 -3
- package/es/components/colorful-button/colorful-button.d.ts +12 -12
- package/es/components/colorful-button/index.d.ts +3 -3
- package/es/components/colorful-input/colorful-input.d.ts +8 -8
- package/es/components/colorful-input/index.d.ts +3 -3
- package/es/components/dc-slider/index.d.ts +3 -3
- package/es/components/dc-slider/slider.d.ts +32 -32
- package/es/components/menu-list/index.d.ts +6 -0
- package/es/components/menu-list/index.js +6 -0
- package/es/components/menu-list/index.scss +16 -0
- package/es/components/menu-list/menu-list-item.d.ts +5 -0
- package/es/components/menu-list/menu-list-item.js +32 -0
- package/es/components/menu-list/menu-list-item.scss +49 -0
- package/es/components/menu-list/menu-list.d.ts +5 -0
- package/es/components/menu-list/menu-list.js +25 -0
- package/es/components/menu-list/types.d.ts +23 -0
- package/es/components/menu-list/types.js +1 -0
- package/es/components/teletext-list/index.d.ts +6 -6
- package/es/components/teletext-list/index.js +2 -2
- package/es/components/teletext-list/index.scss +16 -16
- package/es/components/teletext-list/teletext-list-item.d.ts +42 -42
- package/es/components/teletext-list/teletext-list-item.js +2 -2
- package/es/components/teletext-list/teletext-list-item.scss +74 -74
- package/es/components/teletext-list/teletext-list.d.ts +53 -53
- package/es/components/teletext-list/teletext-list.js +2 -2
- package/es/components/title/index.d.ts +8 -8
- package/es/components/title/index.js +2 -2
- package/es/components/title/title-1.d.ts +10 -10
- package/es/components/title/title-1.scss +26 -26
- package/es/components/title/title-2.d.ts +18 -18
- package/es/components/title/title-2.scss +22 -22
- package/es/index.d.ts +14 -12
- package/es/index.js +1 -0
- package/es/index.scss +3 -3
- package/es/variables.d.ts +2 -2
- package/lib/components/bottom-navigation/bottom-navigation.d.ts +13 -13
- package/lib/components/bottom-navigation/index.d.ts +3 -3
- package/lib/components/colorful-button/colorful-button.d.ts +12 -12
- package/lib/components/colorful-button/index.d.ts +3 -3
- package/lib/components/colorful-input/colorful-input.d.ts +8 -8
- package/lib/components/colorful-input/index.d.ts +3 -3
- package/lib/components/dc-slider/index.d.ts +3 -3
- package/lib/components/dc-slider/slider.d.ts +32 -32
- package/lib/components/menu-list/index.d.ts +6 -0
- package/lib/components/{position → menu-list}/index.js +5 -2
- package/lib/components/menu-list/index.scss +16 -0
- package/lib/components/menu-list/menu-list-item.d.ts +5 -0
- package/lib/components/menu-list/menu-list-item.js +37 -0
- package/lib/components/menu-list/menu-list-item.scss +49 -0
- package/lib/components/menu-list/menu-list.d.ts +5 -0
- package/lib/components/menu-list/menu-list.js +30 -0
- package/lib/components/menu-list/types.d.ts +23 -0
- package/lib/components/menu-list/types.js +3 -0
- package/lib/components/teletext-list/index.d.ts +6 -6
- package/lib/components/teletext-list/index.js +2 -2
- package/lib/components/teletext-list/index.scss +16 -16
- package/lib/components/teletext-list/teletext-list-item.d.ts +42 -42
- package/lib/components/teletext-list/teletext-list-item.js +2 -2
- package/lib/components/teletext-list/teletext-list-item.scss +74 -74
- package/lib/components/teletext-list/teletext-list.d.ts +53 -53
- package/lib/components/teletext-list/teletext-list.js +2 -2
- package/lib/components/title/index.d.ts +8 -8
- package/lib/components/title/title-1.d.ts +10 -10
- package/lib/components/title/title-1.scss +26 -26
- package/lib/components/title/title-2.d.ts +18 -18
- package/lib/components/title/title-2.scss +22 -22
- package/lib/index.d.ts +14 -12
- package/lib/index.js +3 -1
- package/lib/index.scss +3 -3
- package/lib/variables.d.ts +2 -2
- package/lowcode/d-c-slider/meta.ts +1 -1
- package/lowcode/d-c-slider/snippets.ts +42 -42
- package/lowcode/menu-list/meta.ts +147 -0
- package/lowcode/navigation/meta.ts +1 -1
- package/lowcode/teletext-list/meta.ts +300 -300
- package/lowcode/title1/meta.ts +59 -59
- package/lowcode/title2/meta.ts +93 -93
- package/lowcode_es/d-c-slider/meta.d.ts +140 -140
- package/lowcode_es/d-c-slider/meta.js +1 -1
- package/lowcode_es/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_es/menu-list/meta.d.ts +22 -0
- package/lowcode_es/menu-list/meta.js +128 -0
- package/lowcode_es/meta.js +8 -7
- package/lowcode_es/navigation/meta.d.ts +22 -22
- package/lowcode_es/navigation/meta.js +1 -1
- package/lowcode_es/teletext-list/meta.d.ts +22 -22
- package/lowcode_es/teletext-list/meta.js +8 -3
- package/lowcode_es/title1/meta.d.ts +22 -22
- package/lowcode_es/title1/meta.js +2 -1
- package/lowcode_es/title2/meta.d.ts +22 -22
- package/lowcode_es/title2/meta.js +2 -1
- package/lowcode_es/view.js +3 -3
- package/lowcode_lib/d-c-slider/meta.d.ts +140 -140
- package/lowcode_lib/d-c-slider/meta.js +1 -1
- package/lowcode_lib/d-c-slider/snippets.d.ts +36 -36
- package/lowcode_lib/menu-list/meta.d.ts +22 -0
- package/lowcode_lib/menu-list/meta.js +133 -0
- package/lowcode_lib/meta.js +8 -7
- package/lowcode_lib/navigation/meta.d.ts +22 -22
- package/lowcode_lib/navigation/meta.js +1 -1
- package/lowcode_lib/teletext-list/meta.d.ts +22 -22
- package/lowcode_lib/teletext-list/meta.js +8 -3
- package/lowcode_lib/title1/meta.d.ts +22 -22
- package/lowcode_lib/title1/meta.js +2 -1
- package/lowcode_lib/title2/meta.d.ts +22 -22
- package/lowcode_lib/title2/meta.js +2 -1
- package/lowcode_lib/view.js +2 -2
- package/package.json +4 -4
- package/es/components/position/index.d.ts +0 -3
- package/es/components/position/index.js +0 -2
- package/es/components/position/index.scss +0 -16
- package/es/components/position/position.d.ts +0 -13
- package/es/components/position/position.js +0 -39
- package/lib/components/position/index.d.ts +0 -3
- package/lib/components/position/index.scss +0 -16
- package/lib/components/position/position.d.ts +0 -13
- package/lib/components/position/position.js +0 -46
|
@@ -5,6 +5,7 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var TeletextListMeta = {
|
|
8
|
+
"group": "低代码组件",
|
|
8
9
|
"componentName": "TeletextList",
|
|
9
10
|
"title": "图文列表",
|
|
10
11
|
"docUrl": "",
|
|
@@ -12,7 +13,7 @@ var TeletextListMeta = {
|
|
|
12
13
|
"devMode": "proCode",
|
|
13
14
|
"npm": {
|
|
14
15
|
"package": "@dckj-npm/dc-material",
|
|
15
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.8",
|
|
16
17
|
"exportName": "TeletextList",
|
|
17
18
|
"main": "src/index.tsx",
|
|
18
19
|
"destructuring": true,
|
|
@@ -79,7 +80,7 @@ var TeletextListMeta = {
|
|
|
79
80
|
"name": "image",
|
|
80
81
|
"description": "图片地址",
|
|
81
82
|
"setter": {
|
|
82
|
-
"componentName": "
|
|
83
|
+
"componentName": "CustomImageSetter",
|
|
83
84
|
"isRequired": false,
|
|
84
85
|
"initialValue": ""
|
|
85
86
|
}
|
|
@@ -241,7 +242,11 @@ var TeletextListMeta = {
|
|
|
241
242
|
}
|
|
242
243
|
}],
|
|
243
244
|
"supports": {
|
|
244
|
-
"style": true
|
|
245
|
+
"style": true,
|
|
246
|
+
"events": [{
|
|
247
|
+
"name": "onClick",
|
|
248
|
+
"template": "onClick(key,${extParams}){\n// 点击项目的事件\nconsole.log('onClick', key);}"
|
|
249
|
+
}]
|
|
245
250
|
},
|
|
246
251
|
"component": {}
|
|
247
252
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
snippets: IPublicTypeSnippet[];
|
|
4
|
-
componentName: string;
|
|
5
|
-
uri?: string;
|
|
6
|
-
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
-
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
-
tags?: string[];
|
|
9
|
-
description?: string;
|
|
10
|
-
docUrl?: string;
|
|
11
|
-
screenshot?: string;
|
|
12
|
-
devMode?: "proCode" | "lowCode";
|
|
13
|
-
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
-
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
-
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
-
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
-
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
-
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
-
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
-
priority?: number;
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
1
|
+
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
snippets: IPublicTypeSnippet[];
|
|
4
|
+
componentName: string;
|
|
5
|
+
uri?: string;
|
|
6
|
+
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
+
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
docUrl?: string;
|
|
11
|
+
screenshot?: string;
|
|
12
|
+
devMode?: "proCode" | "lowCode";
|
|
13
|
+
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
+
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
+
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
+
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
+
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
+
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
+
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
+
priority?: number;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -5,6 +5,7 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var Title1Meta = {
|
|
8
|
+
"group": "低代码组件",
|
|
8
9
|
"componentName": "Title1",
|
|
9
10
|
"title": "个性化标题1",
|
|
10
11
|
"docUrl": "",
|
|
@@ -12,7 +13,7 @@ var Title1Meta = {
|
|
|
12
13
|
"devMode": "proCode",
|
|
13
14
|
"npm": {
|
|
14
15
|
"package": "@dckj-npm/dc-material",
|
|
15
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.8",
|
|
16
17
|
"exportName": "Title1",
|
|
17
18
|
"main": "src/index.tsx",
|
|
18
19
|
"destructuring": true,
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
snippets: IPublicTypeSnippet[];
|
|
4
|
-
componentName: string;
|
|
5
|
-
uri?: string;
|
|
6
|
-
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
-
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
-
tags?: string[];
|
|
9
|
-
description?: string;
|
|
10
|
-
docUrl?: string;
|
|
11
|
-
screenshot?: string;
|
|
12
|
-
devMode?: "proCode" | "lowCode";
|
|
13
|
-
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
-
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
-
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
-
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
-
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
-
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
-
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
-
priority?: number;
|
|
21
|
-
};
|
|
22
|
-
export default _default;
|
|
1
|
+
import { IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
snippets: IPublicTypeSnippet[];
|
|
4
|
+
componentName: string;
|
|
5
|
+
uri?: string;
|
|
6
|
+
title?: import("@alilc/lowcode-types").IPublicTypeTitleContent;
|
|
7
|
+
icon?: import("@alilc/lowcode-types").IPublicTypeIconType;
|
|
8
|
+
tags?: string[];
|
|
9
|
+
description?: string;
|
|
10
|
+
docUrl?: string;
|
|
11
|
+
screenshot?: string;
|
|
12
|
+
devMode?: "proCode" | "lowCode";
|
|
13
|
+
npm?: import("@alilc/lowcode-types").IPublicTypeNpmInfo;
|
|
14
|
+
props?: import("@alilc/lowcode-types").IPublicTypePropConfig[];
|
|
15
|
+
configure?: import("@alilc/lowcode-types").IPublicTypeFieldConfig[] | import("@alilc/lowcode-types").IPublicTypeConfigure;
|
|
16
|
+
experimental?: import("@alilc/lowcode-types").IPublicTypeAdvanced;
|
|
17
|
+
schema?: import("@alilc/lowcode-types").IPublicTypeComponentSchema;
|
|
18
|
+
group?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
19
|
+
category?: string | import("@alilc/lowcode-types").IPublicTypeI18nData;
|
|
20
|
+
priority?: number;
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -5,6 +5,7 @@ exports.__esModule = true;
|
|
|
5
5
|
exports["default"] = void 0;
|
|
6
6
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
7
|
var Title2Meta = {
|
|
8
|
+
"group": "低代码组件",
|
|
8
9
|
"componentName": "Title2",
|
|
9
10
|
"title": "个性化标题2",
|
|
10
11
|
"docUrl": "",
|
|
@@ -12,7 +13,7 @@ var Title2Meta = {
|
|
|
12
13
|
"devMode": "proCode",
|
|
13
14
|
"npm": {
|
|
14
15
|
"package": "@dckj-npm/dc-material",
|
|
15
|
-
"version": "0.1.
|
|
16
|
+
"version": "0.1.8",
|
|
16
17
|
"exportName": "Title2",
|
|
17
18
|
"main": "src/index.tsx",
|
|
18
19
|
"destructuring": true,
|
package/lowcode_lib/view.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
var _exportNames = {};
|
|
5
5
|
exports["default"] = void 0;
|
|
6
|
-
var componentInstances = _interopRequireWildcard(require("
|
|
6
|
+
var componentInstances = _interopRequireWildcard(require("../lib/index"));
|
|
7
7
|
Object.keys(componentInstances).forEach(function (key) {
|
|
8
8
|
if (key === "default" || key === "__esModule") return;
|
|
9
9
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
10
10
|
if (key in exports && exports[key] === componentInstances[key]) return;
|
|
11
11
|
exports[key] = componentInstances[key];
|
|
12
12
|
});
|
|
13
|
-
require("
|
|
13
|
+
require("../lib/index.scss");
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
16
16
|
var entryDefault = exports["default"] = componentInstances["default"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dckj-npm/dc-material",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "dc低代码物料",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -101,10 +101,10 @@
|
|
|
101
101
|
},
|
|
102
102
|
"componentConfig": {
|
|
103
103
|
"isComponentLibrary": true,
|
|
104
|
-
"materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.
|
|
104
|
+
"materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/lowcode/assets-prod.json"
|
|
105
105
|
},
|
|
106
106
|
"lcMeta": {
|
|
107
107
|
"type": "component"
|
|
108
108
|
},
|
|
109
|
-
"homepage": "https://unpkg.com/@dckj-npm/dc-material@0.1.
|
|
110
|
-
}
|
|
109
|
+
"homepage": "https://unpkg.com/@dckj-npm/dc-material@0.1.8/build/index.html"
|
|
110
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.navigation {
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
padding: 9px 50px 6px 50px;
|
|
7
|
-
position: fixed;
|
|
8
|
-
bottom: 0;
|
|
9
|
-
&-item {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
interface Navigation {
|
|
4
|
-
text: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
selectedIcon: string;
|
|
7
|
-
}
|
|
8
|
-
export interface NavigationProps {
|
|
9
|
-
itemArray: Navigation[];
|
|
10
|
-
selectedColor: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Navigation: React.FC<NavigationProps>;
|
|
13
|
-
export default Navigation;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["itemArray", "selectedColor"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { Image } from '@alilc/lowcode-materials';
|
|
6
|
-
import "./index.scss";
|
|
7
|
-
var Navigation = function bottomNavigation(_ref) {
|
|
8
|
-
var itemArray = _ref.itemArray,
|
|
9
|
-
selectedColor = _ref.selectedColor,
|
|
10
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
11
|
-
var _React$useState = React.useState(0),
|
|
12
|
-
activeNum = _React$useState[0],
|
|
13
|
-
setActiveNum = _React$useState[1];
|
|
14
|
-
var clickHandle = function clickHandle(index) {
|
|
15
|
-
// 更新激活tab
|
|
16
|
-
setActiveNum(index);
|
|
17
|
-
};
|
|
18
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
19
|
-
className: "navigation"
|
|
20
|
-
}, otherProps), itemArray.map(function (item, index) {
|
|
21
|
-
var _item$selectedIcon;
|
|
22
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
className: "navigation-item",
|
|
24
|
-
onClick: function onClick() {
|
|
25
|
-
return clickHandle(index);
|
|
26
|
-
},
|
|
27
|
-
style: {
|
|
28
|
-
color: activeNum === index ? selectedColor !== null && selectedColor !== void 0 ? selectedColor : '#4598FF' : ''
|
|
29
|
-
}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
31
|
-
src: activeNum === index ? (_item$selectedIcon = item.selectedIcon) !== null && _item$selectedIcon !== void 0 ? _item$selectedIcon : item.icon : item.icon,
|
|
32
|
-
style: {
|
|
33
|
-
width: '24.5px',
|
|
34
|
-
height: '24.5px'
|
|
35
|
-
}
|
|
36
|
-
}), /*#__PURE__*/React.createElement("span", null, item.text));
|
|
37
|
-
}));
|
|
38
|
-
};
|
|
39
|
-
export default Navigation;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.navigation {
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: space-between;
|
|
5
|
-
align-items: center;
|
|
6
|
-
padding: 9px 50px 6px 50px;
|
|
7
|
-
position: fixed;
|
|
8
|
-
bottom: 0;
|
|
9
|
-
&-item {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import './index.scss';
|
|
3
|
-
interface Navigation {
|
|
4
|
-
text: string;
|
|
5
|
-
icon: string;
|
|
6
|
-
selectedIcon: string;
|
|
7
|
-
}
|
|
8
|
-
export interface NavigationProps {
|
|
9
|
-
itemArray: Navigation[];
|
|
10
|
-
selectedColor: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Navigation: React.FC<NavigationProps>;
|
|
13
|
-
export default Navigation;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports["default"] = void 0;
|
|
6
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _lowcodeMaterials = require("@alilc/lowcode-materials");
|
|
10
|
-
require("./index.scss");
|
|
11
|
-
var _excluded = ["itemArray", "selectedColor"];
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
|
-
var Navigation = function bottomNavigation(_ref) {
|
|
15
|
-
var itemArray = _ref.itemArray,
|
|
16
|
-
selectedColor = _ref.selectedColor,
|
|
17
|
-
otherProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
18
|
-
var _React$useState = React.useState(0),
|
|
19
|
-
activeNum = _React$useState[0],
|
|
20
|
-
setActiveNum = _React$useState[1];
|
|
21
|
-
var clickHandle = function clickHandle(index) {
|
|
22
|
-
// 更新激活tab
|
|
23
|
-
setActiveNum(index);
|
|
24
|
-
};
|
|
25
|
-
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
26
|
-
className: "navigation"
|
|
27
|
-
}, otherProps), itemArray.map(function (item, index) {
|
|
28
|
-
var _item$selectedIcon;
|
|
29
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: "navigation-item",
|
|
31
|
-
onClick: function onClick() {
|
|
32
|
-
return clickHandle(index);
|
|
33
|
-
},
|
|
34
|
-
style: {
|
|
35
|
-
color: activeNum === index ? selectedColor !== null && selectedColor !== void 0 ? selectedColor : '#4598FF' : ''
|
|
36
|
-
}
|
|
37
|
-
}, /*#__PURE__*/React.createElement(_lowcodeMaterials.Image, {
|
|
38
|
-
src: activeNum === index ? (_item$selectedIcon = item.selectedIcon) !== null && _item$selectedIcon !== void 0 ? _item$selectedIcon : item.icon : item.icon,
|
|
39
|
-
style: {
|
|
40
|
-
width: '24.5px',
|
|
41
|
-
height: '24.5px'
|
|
42
|
-
}
|
|
43
|
-
}), /*#__PURE__*/React.createElement("span", null, item.text));
|
|
44
|
-
}));
|
|
45
|
-
};
|
|
46
|
-
var _default = exports["default"] = Navigation;
|