@pisell/materials 1.0.445 → 1.0.447
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/components/collapse/index.d.ts +6 -0
- package/es/components/collapse/index.js +66 -0
- package/es/components/collapse/index.less +1 -0
- package/es/components/pisellAnchor/index.d.ts +15 -0
- package/es/components/pisellAnchor/index.js +114 -0
- package/es/components/pisellAnchor/index.less +98 -0
- package/es/components/pisellQrcode/index.d.ts +4 -0
- package/es/components/pisellQrcode/index.js +75 -0
- package/es/components/pisellQrcode/index.less +41 -0
- package/es/components/pisellStatistic/index.d.ts +10 -0
- package/es/components/pisellStatistic/index.js +26 -0
- package/es/components/pisellStatistic/index.less +14 -0
- package/es/components/pisellUpload/index.d.ts +11 -0
- package/es/components/pisellUpload/index.js +34 -0
- package/es/components/pisellUpload/index.less +15 -0
- package/es/components/pisellUploadCrop/index.d.ts +3 -0
- package/es/components/pisellUploadCrop/index.js +73 -0
- package/es/components/pisellUploadCrop/index.less +15 -0
- package/es/components/pisellWalletCard/img/drak.png +0 -0
- package/es/components/pisellWalletCard/img/light.png +0 -0
- package/es/components/pisellWalletCard/index.d.ts +4 -0
- package/es/components/pisellWalletCard/index.js +122 -0
- package/es/components/pisellWalletCard/index.less +96 -0
- package/es/components/productCard/components/Actions/index.d.ts +4 -0
- package/es/components/productCard/components/Actions/index.js +20 -0
- package/es/components/productCard/components/Actions/index.less +14 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/components/AmountFooter/index.js +32 -0
- package/es/components/productCard/components/AmountFooter/index.less +30 -0
- package/es/components/productCard/components/Divider/index.d.ts +4 -0
- package/es/components/productCard/components/Divider/index.js +11 -0
- package/es/components/productCard/components/Divider/index.less +13 -0
- package/es/components/productCard/components/Header/index.d.ts +4 -0
- package/es/components/productCard/components/Header/index.js +69 -0
- package/es/components/productCard/components/Header/index.less +59 -0
- package/es/components/productCard/components/Holder/index.d.ts +4 -0
- package/es/components/productCard/components/Holder/index.js +11 -0
- package/es/components/productCard/components/Holder/index.less +11 -0
- package/es/components/productCard/components/Note/index.d.ts +4 -0
- package/es/components/productCard/components/Note/index.js +17 -0
- package/es/components/productCard/components/Note/index.less +20 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.js +96 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +31 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/components/options/index.js +23 -0
- package/es/components/productCard/components/Packages/components/options/index.less +28 -0
- package/es/components/productCard/components/Packages/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/index.js +22 -0
- package/es/components/productCard/components/Packages/index.less +17 -0
- package/es/components/productCard/components/Packages/utils.d.ts +20 -0
- package/es/components/productCard/components/Packages/utils.js +40 -0
- package/es/components/productCard/components/Sales/index.d.ts +4 -0
- package/es/components/productCard/components/Sales/index.js +22 -0
- package/es/components/productCard/components/Sales/index.less +18 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/components/Like/index.js +26 -0
- package/es/components/productCard/components/Time/components/Like/index.less +6 -0
- package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/es/components/productCard/components/Time/index.d.ts +4 -0
- package/es/components/productCard/components/Time/index.js +30 -0
- package/es/components/productCard/components/Time/index.less +25 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/index.js +80 -0
- package/es/components/productCard/index.less +48 -0
- package/es/components/productCard/types.d.ts +10 -0
- package/es/components/productCard/types.js +1 -0
- package/es/components/productCard/utils.d.ts +162 -0
- package/es/components/productCard/utils.js +683 -0
- package/es/components/record-view/index.js +3 -0
- package/es/components/section-footers/index.d.ts +6 -1
- package/es/components/section-footers/index.js +14 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +31 -6
- package/es/index.d.ts +9 -1
- package/es/index.js +13 -2
- package/lib/components/collapse/index.d.ts +6 -0
- package/lib/components/collapse/index.js +88 -0
- package/lib/components/collapse/index.less +1 -0
- package/lib/components/pisellAnchor/index.d.ts +15 -0
- package/lib/components/pisellAnchor/index.js +107 -0
- package/lib/components/pisellAnchor/index.less +98 -0
- package/lib/components/pisellQrcode/index.d.ts +4 -0
- package/lib/components/pisellQrcode/index.js +79 -0
- package/lib/components/pisellQrcode/index.less +41 -0
- package/lib/components/pisellStatistic/index.d.ts +10 -0
- package/lib/components/pisellStatistic/index.js +51 -0
- package/lib/components/pisellStatistic/index.less +14 -0
- package/lib/components/pisellUpload/index.d.ts +11 -0
- package/lib/components/pisellUpload/index.js +53 -0
- package/lib/components/pisellUpload/index.less +15 -0
- package/lib/components/pisellUploadCrop/index.d.ts +3 -0
- package/lib/components/pisellUploadCrop/index.js +75 -0
- package/lib/components/pisellUploadCrop/index.less +15 -0
- package/lib/components/pisellWalletCard/img/drak.png +0 -0
- package/lib/components/pisellWalletCard/img/light.png +0 -0
- package/lib/components/pisellWalletCard/index.d.ts +4 -0
- package/lib/components/pisellWalletCard/index.js +184 -0
- package/lib/components/pisellWalletCard/index.less +96 -0
- package/lib/components/productCard/components/Actions/index.d.ts +4 -0
- package/lib/components/productCard/components/Actions/index.js +54 -0
- package/lib/components/productCard/components/Actions/index.less +14 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/components/AmountFooter/index.js +61 -0
- package/lib/components/productCard/components/AmountFooter/index.less +30 -0
- package/lib/components/productCard/components/Divider/index.d.ts +4 -0
- package/lib/components/productCard/components/Divider/index.js +50 -0
- package/lib/components/productCard/components/Divider/index.less +13 -0
- package/lib/components/productCard/components/Header/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/index.js +81 -0
- package/lib/components/productCard/components/Header/index.less +59 -0
- package/lib/components/productCard/components/Holder/index.d.ts +4 -0
- package/lib/components/productCard/components/Holder/index.js +42 -0
- package/lib/components/productCard/components/Holder/index.less +11 -0
- package/lib/components/productCard/components/Note/index.d.ts +4 -0
- package/lib/components/productCard/components/Note/index.js +43 -0
- package/lib/components/productCard/components/Note/index.less +20 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +93 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +48 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/components/options/index.js +73 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +28 -0
- package/lib/components/productCard/components/Packages/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/index.js +51 -0
- package/lib/components/productCard/components/Packages/index.less +17 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
- package/lib/components/productCard/components/Packages/utils.js +44 -0
- package/lib/components/productCard/components/Sales/index.d.ts +4 -0
- package/lib/components/productCard/components/Sales/index.js +51 -0
- package/lib/components/productCard/components/Sales/index.less +18 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/components/Like/index.js +64 -0
- package/lib/components/productCard/components/Time/components/Like/index.less +6 -0
- package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
- package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
- package/lib/components/productCard/components/Time/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/index.js +57 -0
- package/lib/components/productCard/components/Time/index.less +25 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/index.js +101 -0
- package/lib/components/productCard/index.less +48 -0
- package/lib/components/productCard/types.d.ts +10 -0
- package/lib/components/productCard/types.js +17 -0
- package/lib/components/productCard/utils.d.ts +162 -0
- package/lib/components/productCard/utils.js +598 -0
- package/lib/components/record-view/index.js +15 -0
- package/lib/components/section-footers/index.d.ts +6 -1
- package/lib/components/section-footers/index.js +13 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +34 -5
- package/lib/index.d.ts +9 -1
- package/lib/index.js +56 -32
- package/lowcode/badge/meta.ts +8 -8
- package/lowcode/collapse/meta.ts +85 -1
- package/lowcode/pisell-anchor/meta.ts +127 -0
- package/lowcode/pisell-anchor/snippets.ts +20 -0
- package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-qrcode/meta.ts +46 -0
- package/lowcode/pisell-qrcode/snippets.ts +12 -0
- package/lowcode/pisell-statistic/meta.ts +83 -0
- package/lowcode/pisell-statistic/snippets.ts +13 -0
- package/lowcode/pisell-tooltip/meta.ts +1 -1
- package/lowcode/pisell-upload/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-upload/meta.ts +508 -0
- package/lowcode/pisell-upload/snippets.ts +20 -0
- package/lowcode/pisell-upload-crop/meta.ts +77 -0
- package/lowcode/pisell-upload-crop/snippe.ts +12 -0
- package/lowcode/pisell-wallet-card/meta.ts +141 -0
- package/lowcode/pisell-wallet-card/snippets.ts +26 -0
- package/lowcode/product-card/meta.ts +92 -0
- package/lowcode/product-card/snippets.ts +15 -0
- package/lowcode/record-view/meta.ts +12 -0
- package/lowcode/section-footers/meta.ts +47 -3
- package/lowcode/section-footers/snippe.ts +14 -1
- package/lowcode/statistic/meta.ts +1 -1
- package/lowcode/tabs/meta.ts +51 -51
- package/lowcode/tabs/snippets.ts +36 -36
- package/lowcode/tag/meta.ts +6 -0
- package/lowcode/timeline/meta.ts +12 -3
- package/lowcode/timeline/snippets.ts +2 -0
- package/lowcode/timeline.item/meta.ts +1 -1
- package/package.json +31 -26
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _templateObject;
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
10
|
+
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
12
|
+
import { Collapse as OriginalCollapse } from 'antd';
|
|
13
|
+
import styled from 'styled-components';
|
|
14
|
+
import "./index.less";
|
|
15
|
+
var Collapse = function Collapse(props) {
|
|
16
|
+
var other = Object.assign({}, (_objectDestructuringEmpty(props), props));
|
|
17
|
+
|
|
18
|
+
// 自定义样式
|
|
19
|
+
var CustomCollapse = styled(OriginalCollapse)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .pisell-lowcode-collapse-header {\n display: flex !important;\n align-items: center !important;\n }\n\n .pisell-lowcode-collapse-content {\n background-color: ", ";\n border-top: ", ";\n }\n "])), other !== null && other !== void 0 && other.panelBackground ? 'transparent' : '#ffffff', other !== null && other !== void 0 && other.panelBackground ? '0' : '1px solid #D0D5DD');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title: 自定义面板样式
|
|
23
|
+
* @description:
|
|
24
|
+
* @return {*}
|
|
25
|
+
* @Author: WangHan
|
|
26
|
+
* @Date: 2024-11-25 20:23
|
|
27
|
+
*/
|
|
28
|
+
var panelStyle = {
|
|
29
|
+
marginBottom: other === null || other === void 0 ? void 0 : other.panelMarginBottom,
|
|
30
|
+
background: other === null || other === void 0 ? void 0 : other.panelBackground,
|
|
31
|
+
borderRadius: other === null || other === void 0 ? void 0 : other.panelBorderRadius
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @title: 面板内容
|
|
36
|
+
* @description:
|
|
37
|
+
* @param {*} CollapseProps
|
|
38
|
+
* @return {*}
|
|
39
|
+
* @Author: WangHan
|
|
40
|
+
* @Date: 2024-11-25 20:28
|
|
41
|
+
*/
|
|
42
|
+
var items = useMemo(function () {
|
|
43
|
+
var _other$children;
|
|
44
|
+
return other === null || other === void 0 ? void 0 : (_other$children = other.children) === null || _other$children === void 0 ? void 0 : _other$children.map(function (item) {
|
|
45
|
+
var _item$props, _item$props2;
|
|
46
|
+
return _objectSpread(_objectSpread({}, item === null || item === void 0 ? void 0 : item.props), {}, {
|
|
47
|
+
label: other !== null && other !== void 0 && other.showHeader ? /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
style: {
|
|
49
|
+
color: other === null || other === void 0 ? void 0 : other.headerColor,
|
|
50
|
+
fontSize: other === null || other === void 0 ? void 0 : other.headerFontSize
|
|
51
|
+
}
|
|
52
|
+
}, item === null || item === void 0 ? void 0 : (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.header) : null,
|
|
53
|
+
key: item === null || item === void 0 ? void 0 : item.key,
|
|
54
|
+
children: item === null || item === void 0 ? void 0 : (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.children,
|
|
55
|
+
style: panelStyle
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}, [other]);
|
|
59
|
+
return /*#__PURE__*/React.createElement(CustomCollapse, _extends({}, other, {
|
|
60
|
+
expandIcon: other !== null && other !== void 0 && other.expandIcon ? function () {
|
|
61
|
+
return other === null || other === void 0 ? void 0 : other.expandIcon;
|
|
62
|
+
} : undefined,
|
|
63
|
+
items: items
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
export default Collapse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnchorProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellAnchorProps extends AnchorProps {
|
|
5
|
+
items: any[];
|
|
6
|
+
direction: 'horizontal' | 'vertical';
|
|
7
|
+
scrollNumber: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* PisellAnchor锚点组件
|
|
11
|
+
* @param props
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
declare const PisellAnchor: (props: PisellAnchorProps) => React.JSX.Element;
|
|
15
|
+
export default PisellAnchor;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { Anchor, Flex, Button } from 'antd';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { useDebounceFn } from 'ahooks';
|
|
12
|
+
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
|
13
|
+
import "./index.less";
|
|
14
|
+
/**
|
|
15
|
+
* PisellAnchor锚点组件
|
|
16
|
+
* @param props
|
|
17
|
+
* @constructor
|
|
18
|
+
*/
|
|
19
|
+
var PisellAnchor = function PisellAnchor(props) {
|
|
20
|
+
console.log('%c [ props ]-21', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
21
|
+
var _useState = useState(true),
|
|
22
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
+
leftDisabled = _useState2[0],
|
|
24
|
+
setLeftDisabled = _useState2[1];
|
|
25
|
+
var _useState3 = useState(false),
|
|
26
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
27
|
+
rightDisabled = _useState4[0],
|
|
28
|
+
setRightDisabled = _useState4[1];
|
|
29
|
+
var _props$items = props.items,
|
|
30
|
+
items = _props$items === void 0 ? [] : _props$items,
|
|
31
|
+
direction = props.direction,
|
|
32
|
+
_props$scrollNumber = props.scrollNumber,
|
|
33
|
+
scrollNumber = _props$scrollNumber === void 0 ? 1 : _props$scrollNumber;
|
|
34
|
+
var InnerProps = {
|
|
35
|
+
onChange: function onChange(key) {
|
|
36
|
+
console.log(key);
|
|
37
|
+
},
|
|
38
|
+
getCurrentAnchor: function getCurrentAnchor() {
|
|
39
|
+
if (items.length > 0) {
|
|
40
|
+
return items[0].href;
|
|
41
|
+
}
|
|
42
|
+
return '';
|
|
43
|
+
},
|
|
44
|
+
items: items
|
|
45
|
+
};
|
|
46
|
+
var itemsWidth = 0;
|
|
47
|
+
var containerWidth = 0;
|
|
48
|
+
// useEffect(() => {
|
|
49
|
+
// document.body.id = 'body';
|
|
50
|
+
// const itemsContainer = document.querySelector('.pisell-lowcode-anchor');
|
|
51
|
+
// if (itemsContainer) {
|
|
52
|
+
// itemsWidth = itemsContainer.offsetWidth;
|
|
53
|
+
// }
|
|
54
|
+
// if (srcollContainer) {
|
|
55
|
+
// containerWidth = srcollContainer.offsetWidth;
|
|
56
|
+
// setRightDisabled(containerWidth > itemsWidth);
|
|
57
|
+
// srcollContainer.addEventListener('scroll', debouncedScroll.run);
|
|
58
|
+
// return () => {
|
|
59
|
+
// srcollContainer.removeEventListener('scroll', debouncedScroll.run);
|
|
60
|
+
// };
|
|
61
|
+
// }
|
|
62
|
+
// }, []);
|
|
63
|
+
|
|
64
|
+
var handleScroll = function handleScroll(e) {
|
|
65
|
+
var left = e.target.scrollLeft;
|
|
66
|
+
console.log('滚动位置:', left);
|
|
67
|
+
setLeftDisabled(left === 0);
|
|
68
|
+
// setRightDisabled(containerWidth + left >= itemsWidth);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var debouncedScroll = useDebounceFn(handleScroll, {
|
|
72
|
+
wait: 1000
|
|
73
|
+
});
|
|
74
|
+
var scrollToAnchor = function scrollToAnchor(_ref) {
|
|
75
|
+
var direction = _ref.direction;
|
|
76
|
+
};
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: classNames('pisell-anchor-wapper')
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Anchor, _extends({
|
|
80
|
+
direction: "horizontal"
|
|
81
|
+
}, InnerProps)), /*#__PURE__*/React.createElement(Flex, {
|
|
82
|
+
className: 'pisell-anchor-control'
|
|
83
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
84
|
+
icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
|
|
85
|
+
shape: "circle",
|
|
86
|
+
disabled: leftDisabled,
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
return scrollToAnchor({
|
|
89
|
+
direction: 'left'
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
93
|
+
icon: /*#__PURE__*/React.createElement(RightOutlined, null),
|
|
94
|
+
shape: "circle",
|
|
95
|
+
disabled: rightDisabled,
|
|
96
|
+
onClick: function onClick() {
|
|
97
|
+
return scrollToAnchor({
|
|
98
|
+
direction: 'right'
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
})), items.map(function (item) {
|
|
102
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
id: "".concat(item.key),
|
|
104
|
+
className: classNames('pisell-anchor-content'),
|
|
105
|
+
style: {
|
|
106
|
+
width: '100vw',
|
|
107
|
+
height: '100vh',
|
|
108
|
+
textAlign: 'center',
|
|
109
|
+
background: 'rgba(0,255,0,0.02)'
|
|
110
|
+
}
|
|
111
|
+
}, "\u8FD9\u662F", item.title, "\u7684\u5185\u5BB9");
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
114
|
+
export default PisellAnchor;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// .pisell-anchor-wapper {
|
|
2
|
+
// width: 100%;
|
|
3
|
+
// overflow: hidden;
|
|
4
|
+
// .pisell-anchor-control {
|
|
5
|
+
// display: flex;
|
|
6
|
+
// position: absolute;
|
|
7
|
+
// top: 0;
|
|
8
|
+
// right: 0;
|
|
9
|
+
// z-index: 10;
|
|
10
|
+
// }
|
|
11
|
+
|
|
12
|
+
// .pisell-lowcode-anchor-wrapper {
|
|
13
|
+
// position: relative;
|
|
14
|
+
// height: 48px;
|
|
15
|
+
// width: 500px;
|
|
16
|
+
// margin: 0 auto;
|
|
17
|
+
// overflow-x: auto;
|
|
18
|
+
// scroll-snap-type: x mandatory;
|
|
19
|
+
// scroll-behavior: smooth;
|
|
20
|
+
// overflow-y: hidden;
|
|
21
|
+
|
|
22
|
+
// &::-webkit-scrollbar {
|
|
23
|
+
// display: none;
|
|
24
|
+
// }
|
|
25
|
+
// &::after {
|
|
26
|
+
// position: absolute;
|
|
27
|
+
// right: 0;
|
|
28
|
+
// top: 0;
|
|
29
|
+
// content: '';
|
|
30
|
+
// display: inline-block;
|
|
31
|
+
// width: 64px;
|
|
32
|
+
// height: 44px;
|
|
33
|
+
|
|
34
|
+
// background: linear-gradient(to right, #0000, #fff);
|
|
35
|
+
// }
|
|
36
|
+
// .pisell-lowcode-anchor {
|
|
37
|
+
// height: 44px;
|
|
38
|
+
// background-color: #fff;
|
|
39
|
+
// width: max-content;
|
|
40
|
+
// display: inline-block;
|
|
41
|
+
// .pisell-lowcode-anchor-ink-visible {
|
|
42
|
+
// display: none;
|
|
43
|
+
// }
|
|
44
|
+
// .pisell-lowcode-anchor-link {
|
|
45
|
+
// scroll-snap-align: start;
|
|
46
|
+
// max-width: 200px;
|
|
47
|
+
// // overflow: hidden;
|
|
48
|
+
// text-overflow: ellipsis;
|
|
49
|
+
// display: inline-block;
|
|
50
|
+
|
|
51
|
+
// padding: 12px 16px;
|
|
52
|
+
// height: 44px;
|
|
53
|
+
// box-sizing: border-box;
|
|
54
|
+
// align-items: center;
|
|
55
|
+
// background-color: #fff;
|
|
56
|
+
|
|
57
|
+
// .pisell-lowcode-anchor-link-title {
|
|
58
|
+
// color: var(--Gray-900, #101828);
|
|
59
|
+
|
|
60
|
+
// /* Text md/Semibold */
|
|
61
|
+
// font-family: Inter;
|
|
62
|
+
// font-size: 16px;
|
|
63
|
+
// font-style: normal;
|
|
64
|
+
// font-weight: 600;
|
|
65
|
+
// line-height: 24px; /* 150% */
|
|
66
|
+
// &:active,
|
|
67
|
+
// &:hover,
|
|
68
|
+
// &:visited,
|
|
69
|
+
// &:link {
|
|
70
|
+
// text-decoration: none;
|
|
71
|
+
// }
|
|
72
|
+
// }
|
|
73
|
+
|
|
74
|
+
// &.pisell-lowcode-anchor-link-active {
|
|
75
|
+
// border-radius: 100px;
|
|
76
|
+
// background: var(--Primary-600, #7f56d9);
|
|
77
|
+
// .pisell-lowcode-anchor-link-title {
|
|
78
|
+
// color: var(--White, #fff);
|
|
79
|
+
// }
|
|
80
|
+
// }
|
|
81
|
+
// // &:hover {
|
|
82
|
+
// // border-radius: 88px;
|
|
83
|
+
// // background: var(--Gray-100, #f2f4f7);
|
|
84
|
+
// // }
|
|
85
|
+
// }
|
|
86
|
+
// .pisell-lowcode-anchor-link + .pisell-lowcode-anchor-link {
|
|
87
|
+
// margin-left: 12px;
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
90
|
+
// }
|
|
91
|
+
// .pisell-anchor-content {
|
|
92
|
+
// width: 100%;
|
|
93
|
+
// height: 300px;
|
|
94
|
+
// line-height: 300px;
|
|
95
|
+
// font-size: 30px;
|
|
96
|
+
// text-align: center;
|
|
97
|
+
// }
|
|
98
|
+
// }
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
8
|
+
import { QRCode, Button, Divider } from 'antd';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import PisellModal from "./../pisellModal";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
var qrcodeValue = 'https://www.baidu.com';
|
|
13
|
+
var PisellQrcode = function PisellQrcode(props) {
|
|
14
|
+
var size = props.size,
|
|
15
|
+
platform = props.platform; // 裁剪形状
|
|
16
|
+
var _useState = useState(false),
|
|
17
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
18
|
+
open = _useState2[0],
|
|
19
|
+
setOpen = _useState2[1];
|
|
20
|
+
var _React$useState = React.useState(0),
|
|
21
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
22
|
+
height = _React$useState2[0],
|
|
23
|
+
setHeight = _React$useState2[1];
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
document.body.id = 'body';
|
|
26
|
+
|
|
27
|
+
// if (modalRef.current) {
|
|
28
|
+
// const elementHeight = modalRef.current?.clientHeight;
|
|
29
|
+
// setHeight(elementHeight);
|
|
30
|
+
// console.log('元素真实高度:', elementHeight);
|
|
31
|
+
// }
|
|
32
|
+
}, []);
|
|
33
|
+
var modalRef = useRef(null);
|
|
34
|
+
useEffect(function () {
|
|
35
|
+
if (open) {
|
|
36
|
+
console.log('%c [ modalRef ]-22', 'font-size:13px; background:pink; color:#bf2c9f;', modalRef);
|
|
37
|
+
}
|
|
38
|
+
}, [open]);
|
|
39
|
+
var modalProps = {
|
|
40
|
+
title: 'QR code',
|
|
41
|
+
platform: platform,
|
|
42
|
+
onCancel: function onCancel() {
|
|
43
|
+
return setOpen(false);
|
|
44
|
+
},
|
|
45
|
+
open: open,
|
|
46
|
+
footer: null,
|
|
47
|
+
mobileModalHeight: 'auto',
|
|
48
|
+
className: classNames('pisell-qrcode-modal'),
|
|
49
|
+
bodyStyle: {
|
|
50
|
+
padding: 0
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: classNames('pisell-qrcode-wrapper')
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
onClick: function onClick() {
|
|
57
|
+
return setOpen(true);
|
|
58
|
+
}
|
|
59
|
+
}, /*#__PURE__*/React.createElement(QRCode, {
|
|
60
|
+
size: size,
|
|
61
|
+
value: qrcodeValue,
|
|
62
|
+
bordered: false
|
|
63
|
+
})), /*#__PURE__*/React.createElement(PisellModal, modalProps, /*#__PURE__*/React.createElement(QRCode, {
|
|
64
|
+
size: size,
|
|
65
|
+
value: qrcodeValue
|
|
66
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
67
|
+
className: classNames('pisell-qrcode-modal-value')
|
|
68
|
+
}, qrcodeValue), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Button, {
|
|
69
|
+
onClick: function onClick() {
|
|
70
|
+
return setOpen(false);
|
|
71
|
+
},
|
|
72
|
+
className: classNames('pisell-qrcode-modal-button')
|
|
73
|
+
}, "Done")));
|
|
74
|
+
};
|
|
75
|
+
export default PisellQrcode;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.pisell-qrcode-wrapper {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.pisell-qrcode-modal {
|
|
5
|
+
.pisell-lowcode-modal-content {
|
|
6
|
+
padding: 0;
|
|
7
|
+
.pisell-lowcode-modal-body {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
.pisell-qrcode-modal-value {
|
|
13
|
+
color: var(--Gray-500, #667085);
|
|
14
|
+
font-family: Inter;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 20px;
|
|
19
|
+
margin: 20px 0 24px;
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode-divider {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
.pisell-qrcode-modal-button {
|
|
25
|
+
margin: 24px;
|
|
26
|
+
|
|
27
|
+
color: var(--Base-White, #fff);
|
|
28
|
+
|
|
29
|
+
font-family: Inter;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
|
|
35
|
+
width: calc(100% - 48px);
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
background-color: var(--theme-color, #7f56d9);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellStatisticProps {
|
|
4
|
+
title?: string;
|
|
5
|
+
number?: number;
|
|
6
|
+
hint?: React.ReactNode;
|
|
7
|
+
tags?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const pisellStatistic: (props: PisellStatisticProps) => import("react").JSX.Element;
|
|
10
|
+
export default pisellStatistic;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { Statistic } from 'antd';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var pisellStatistic = function pisellStatistic(props) {
|
|
6
|
+
console.log('%c [ props ]-6', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
7
|
+
useEffect(function () {
|
|
8
|
+
document.body.id = 'body';
|
|
9
|
+
}, []);
|
|
10
|
+
var _props$title = props.title,
|
|
11
|
+
title = _props$title === void 0 ? '123123' : _props$title,
|
|
12
|
+
number = props.number,
|
|
13
|
+
hint = props.hint,
|
|
14
|
+
tags = props.tags;
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: classNames('pisell-statistic-wrap')
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: classNames('pisell-statistic-hint')
|
|
19
|
+
}, hint), /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: classNames('pisell-statistic-tags')
|
|
21
|
+
}, tags), /*#__PURE__*/React.createElement(Statistic, {
|
|
22
|
+
title: title,
|
|
23
|
+
value: number
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export default pisellStatistic;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { UploadProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface pisellUploadProps extends UploadProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
text1?: string;
|
|
7
|
+
text2?: string;
|
|
8
|
+
uploadType?: 'button' | 'drop';
|
|
9
|
+
}
|
|
10
|
+
declare const PisellUpload: (props: pisellUploadProps) => React.JSX.Element;
|
|
11
|
+
export default PisellUpload;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import { Upload, Button } from 'antd';
|
|
4
|
+
import { InboxOutlined, UploadOutlined } from '@ant-design/icons';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
var Dragger = Upload.Dragger;
|
|
7
|
+
import "./index.less";
|
|
8
|
+
var PisellUpload = function PisellUpload(props) {
|
|
9
|
+
var name = props.name,
|
|
10
|
+
multiple = props.multiple,
|
|
11
|
+
onDrop = props.onDrop,
|
|
12
|
+
title = props.title,
|
|
13
|
+
text1 = props.text1,
|
|
14
|
+
text2 = props.text2,
|
|
15
|
+
uploadType = props.uploadType;
|
|
16
|
+
console.log('%c [ props ]-13', 'font-size:13px; background:pink; color:#bf2c9f;', props);
|
|
17
|
+
useEffect(function () {
|
|
18
|
+
document.body.id = 'body';
|
|
19
|
+
}, []);
|
|
20
|
+
return /*#__PURE__*/React.createElement("div", null, uploadType === 'button' ? /*#__PURE__*/React.createElement(Upload, props, /*#__PURE__*/React.createElement(Button, {
|
|
21
|
+
icon: /*#__PURE__*/React.createElement(UploadOutlined, null)
|
|
22
|
+
}, "Upload")) : /*#__PURE__*/React.createElement(Dragger, _extends({}, props, {
|
|
23
|
+
className: classNames('pisell-upload-wapper')
|
|
24
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
25
|
+
className: "ant-upload-drag-icon"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(InboxOutlined, null)), /*#__PURE__*/React.createElement("p", {
|
|
27
|
+
className: "ant-upload-title"
|
|
28
|
+
}, title), /*#__PURE__*/React.createElement("p", {
|
|
29
|
+
className: "ant-upload-text1"
|
|
30
|
+
}, text1), /*#__PURE__*/React.createElement("p", {
|
|
31
|
+
className: "ant-upload-text2"
|
|
32
|
+
}, text2)));
|
|
33
|
+
};
|
|
34
|
+
export default PisellUpload;
|