@fonixtree/magic-design 0.1.78 → 0.1.80
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/assets/fonts/Trueno-Light.otf +0 -0
- package/es/assets/fonts/Trueno-Regular.otf +0 -0
- package/es/assets/fonts/TruenoBd.otf +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +31 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +31 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/base64/index.js +36 -2
- package/es/assets/images/layout-icon/walletLayout2.png +0 -0
- package/es/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/es/assets/less/cylon-antd.less +7246 -1686
- package/es/assets/less/font.less +22 -0
- package/es/common/AffiliateProductModal/index.js +582 -0
- package/es/common/AffiliateProductModal/index.less +146 -0
- package/es/common/CardCarousel/index.js +171 -0
- package/es/common/CardCarousel/index.less +28 -0
- package/es/common/GroupList/index.less +3 -0
- package/es/common/ImagePicker/index.js +1 -3
- package/es/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/es/common/LinkModal/FunctionTable/index.js +2 -1
- package/es/common/LinkModal/index.js +14 -2
- package/es/common/MyModal/index.js +417 -0
- package/es/common/MyModal/index.less +74 -0
- package/es/common/ProductModal/index.js +2 -3
- package/es/common/ProductSource/index.js +42 -10
- package/es/common/UrlPicker/index.js +3 -1
- package/es/common/index.js +16 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +4 -1
- package/es/composite-comp/bol/components/ImageText/pc/index.js +2 -2
- package/es/composite-comp/bol/components/Video/index.js +1 -2
- package/es/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/es/composite-comp/bol/components/Wallet/index.js +11 -15
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +89 -13
- package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/es/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/es/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
- package/es/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +177 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/es/composite-comp/common/components/ImageLabel/index.less +9 -3
- package/es/composite-comp/common/components/ProductItem/index.js +25 -17
- package/es/composite-comp/common/components/ProductItem/index.less +17 -8
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +97 -0
- package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +10 -9
- package/es/composite-comp/dito/components/Recommend/pc/index.js +12 -11
- package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +15 -11
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/es/constants/component-types.js +27 -3
- package/es/constants/index.js +26 -1
- package/es/constants/layout.js +48 -1
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/es/core/Designer/ChatRobot/index.js +36 -14
- package/es/core/Designer/ChatRobot/index.less +69 -28
- package/es/core/Designer/ConfigPanel/index.js +8 -3
- package/es/core/Designer/History/index.js +2 -2
- package/es/core/Designer/PageCompList/index.js +8 -5
- package/es/core/Designer/QuickMenuBar/index.js +5 -3
- package/es/core/Designer/QuickMenuBar/index.less +4 -0
- package/es/core/Designer/RenderHtml/index.js +18 -15
- package/es/core/Designer/RenderHtml/index.less +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/es/core/Designer/ToolBarModal/index.js +68 -22
- package/es/core/Designer/ToolBarModal/index.less +3 -2
- package/es/core/Designer/index.js +12 -1
- package/es/core/Renderer/index.js +55 -8
- package/es/decorator/compositeDecorator.js +23 -0
- package/es/locale/en/en.json +6 -1
- package/es/locale/es/es.json +6 -1
- package/es/locale/id/id.json +6 -1
- package/es/meta-comp/components/Image/index.js +31 -25
- package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/es/meta-comp/components/Text/index.js +20 -1
- package/es/meta-comp/components/Text/index.less +8 -0
- package/es/meta-comp/config-panels/ButtonConfig/index.js +5 -5
- package/es/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/es/mobx/Frame.js +17 -2
- package/es/utils/businessUtil.js +17 -6
- package/es/utils/commonUtil.js +54 -4
- package/es/utils/currencyUtil.js +9 -2
- package/lib/assets/fonts/Trueno-Light.otf +0 -0
- package/lib/assets/fonts/Trueno-Regular.otf +0 -0
- package/lib/assets/fonts/TruenoBd.otf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +31 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +31 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/base64/index.js +36 -2
- package/lib/assets/images/layout-icon/walletLayout2.png +0 -0
- package/lib/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/lib/assets/less/cylon-antd.less +7246 -1686
- package/lib/assets/less/font.less +22 -0
- package/lib/common/AffiliateProductModal/index.js +582 -0
- package/lib/common/AffiliateProductModal/index.less +146 -0
- package/lib/common/CardCarousel/index.js +171 -0
- package/lib/common/CardCarousel/index.less +28 -0
- package/lib/common/GroupList/index.less +3 -0
- package/lib/common/ImagePicker/index.js +1 -3
- package/lib/common/LinkModal/FilteredProductModal/index.js +1 -1
- package/lib/common/LinkModal/FunctionTable/index.js +2 -1
- package/lib/common/LinkModal/index.js +14 -2
- package/lib/common/MyModal/index.js +417 -0
- package/lib/common/MyModal/index.less +74 -0
- package/lib/common/ProductModal/index.js +2 -3
- package/lib/common/ProductSource/index.js +42 -10
- package/lib/common/UrlPicker/index.js +3 -1
- package/lib/common/index.js +16 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +4 -1
- package/lib/composite-comp/bol/components/ImageText/pc/index.js +2 -2
- package/lib/composite-comp/bol/components/Video/index.js +1 -2
- package/lib/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/lib/composite-comp/bol/components/Wallet/index.js +11 -15
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +89 -13
- package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/lib/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/lib/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +8 -6
- package/lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +177 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/lib/composite-comp/common/components/ImageLabel/index.less +9 -3
- package/lib/composite-comp/common/components/ProductItem/index.js +25 -17
- package/lib/composite-comp/common/components/ProductItem/index.less +17 -8
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +97 -0
- package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +10 -9
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +12 -11
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -1
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +123 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +15 -11
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/lib/constants/component-types.js +27 -3
- package/lib/constants/index.js +26 -1
- package/lib/constants/layout.js +48 -1
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +110 -0
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/lib/core/Designer/ChatRobot/index.js +36 -14
- package/lib/core/Designer/ChatRobot/index.less +69 -28
- package/lib/core/Designer/ConfigPanel/index.js +8 -3
- package/lib/core/Designer/History/index.js +2 -2
- package/lib/core/Designer/PageCompList/index.js +8 -5
- package/lib/core/Designer/QuickMenuBar/index.js +5 -3
- package/lib/core/Designer/QuickMenuBar/index.less +4 -0
- package/lib/core/Designer/RenderHtml/index.js +18 -15
- package/lib/core/Designer/RenderHtml/index.less +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/lib/core/Designer/ToolBarModal/index.js +68 -22
- package/lib/core/Designer/ToolBarModal/index.less +3 -2
- package/lib/core/Designer/index.js +12 -1
- package/lib/core/Renderer/index.js +55 -8
- package/lib/decorator/compositeDecorator.js +23 -0
- package/lib/locale/en/en.json +6 -1
- package/lib/locale/es/es.json +6 -1
- package/lib/locale/id/id.json +6 -1
- package/lib/meta-comp/components/Image/index.js +31 -25
- package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/lib/meta-comp/components/Text/index.js +20 -1
- package/lib/meta-comp/components/Text/index.less +8 -0
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +5 -5
- package/lib/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/lib/mobx/Frame.js +17 -2
- package/lib/utils/businessUtil.js +17 -6
- package/lib/utils/commonUtil.js +54 -4
- package/lib/utils/currencyUtil.js +9 -2
- package/package.json +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TextAlignStyleAttributor = exports.TextAlignStyle = void 0;
|
|
7
|
+
|
|
8
|
+
var _quill = _interopRequireDefault(require("quill"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
13
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
14
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
15
|
+
__proto__: []
|
|
16
|
+
} instanceof Array && function (d, b) {
|
|
17
|
+
d.__proto__ = b;
|
|
18
|
+
} || function (d, b) {
|
|
19
|
+
for (var p in b) {
|
|
20
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return _extendStatics(d, b);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return function (d, b) {
|
|
28
|
+
_extendStatics(d, b);
|
|
29
|
+
|
|
30
|
+
function __() {
|
|
31
|
+
this.constructor = d;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
35
|
+
};
|
|
36
|
+
}();
|
|
37
|
+
|
|
38
|
+
var Parchment = _quill["default"]["import"]('parchment');
|
|
39
|
+
|
|
40
|
+
var TextAlignStyleAttributor =
|
|
41
|
+
/** @class */
|
|
42
|
+
function (_super) {
|
|
43
|
+
__extends(TextAlignStyleAttributor, _super);
|
|
44
|
+
|
|
45
|
+
function TextAlignStyleAttributor() {
|
|
46
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return TextAlignStyleAttributor;
|
|
50
|
+
}(Parchment.Attributor.Style);
|
|
51
|
+
|
|
52
|
+
exports.TextAlignStyleAttributor = TextAlignStyleAttributor;
|
|
53
|
+
var TextAlignStyle = new TextAlignStyleAttributor('text-align', 'text-align', {
|
|
54
|
+
scope: Parchment.Scope.BLOCK_BLOT
|
|
55
|
+
});
|
|
56
|
+
exports.TextAlignStyle = TextAlignStyle;
|
|
57
|
+
|
|
58
|
+
_quill["default"].register('formats/text-align', TextAlignStyle, true);
|
|
@@ -19,6 +19,8 @@ require("./formats/textDecorationColor");
|
|
|
19
19
|
|
|
20
20
|
require("./formats/fontStyle");
|
|
21
21
|
|
|
22
|
+
require("./formats/textAlign");
|
|
23
|
+
|
|
22
24
|
require("./formats/listStyleTypeStyle");
|
|
23
25
|
|
|
24
26
|
require("./formats/textDecorationStyle");
|
|
@@ -102,6 +104,8 @@ var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
|
102
104
|
|
|
103
105
|
return r;
|
|
104
106
|
};
|
|
107
|
+
/* eslint-disable @typescript-eslint/no-unused-expressions */
|
|
108
|
+
|
|
105
109
|
/* eslint-disable react/no-danger */
|
|
106
110
|
|
|
107
111
|
|
|
@@ -148,6 +152,16 @@ function (_super) {
|
|
|
148
152
|
placeholder: '请输入内容...'
|
|
149
153
|
});
|
|
150
154
|
|
|
155
|
+
var onInputChange = function onInputChange() {
|
|
156
|
+
_this.props.onTextInput(_this.quillRef.root.innerHTML);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
_this.quillRef.on('text-change', onInputChange);
|
|
160
|
+
|
|
161
|
+
_this.destroy = function () {
|
|
162
|
+
_this.quillRef.off('text-change', onInputChange);
|
|
163
|
+
};
|
|
164
|
+
|
|
151
165
|
_mobx.frameStore.setState({
|
|
152
166
|
textModalState: {
|
|
153
167
|
quillRef: null
|
|
@@ -157,7 +171,8 @@ function (_super) {
|
|
|
157
171
|
setTimeout(function () {
|
|
158
172
|
_mobx.frameStore.setState({
|
|
159
173
|
textModalState: {
|
|
160
|
-
quillRef: _this.quillRef
|
|
174
|
+
quillRef: _this.quillRef,
|
|
175
|
+
close: _this.onEditorClose
|
|
161
176
|
}
|
|
162
177
|
});
|
|
163
178
|
}, 100);
|
|
@@ -209,6 +224,10 @@ function (_super) {
|
|
|
209
224
|
return true;
|
|
210
225
|
};
|
|
211
226
|
|
|
227
|
+
Text.prototype.componentWillUnmount = function () {
|
|
228
|
+
this.destroy && this.destroy();
|
|
229
|
+
};
|
|
230
|
+
|
|
212
231
|
Text.prototype.render = function () {
|
|
213
232
|
var _a = this.props,
|
|
214
233
|
data = _a.data,
|
|
@@ -11,7 +11,7 @@ var _antd = require("antd");
|
|
|
11
11
|
|
|
12
12
|
require("./index.less");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
15
15
|
|
|
16
16
|
var _locale = require("../../../locale");
|
|
17
17
|
|
|
@@ -106,11 +106,11 @@ function (_super) {
|
|
|
106
106
|
|
|
107
107
|
_this.updateAttr(data, 'hover', {
|
|
108
108
|
open: true,
|
|
109
|
-
buttonBorder: (0,
|
|
110
|
-
buttonIcon: (0,
|
|
111
|
-
buttonText: (0,
|
|
109
|
+
buttonBorder: (0, _cloneDeep["default"])(data.buttonBorder),
|
|
110
|
+
buttonIcon: (0, _cloneDeep["default"])(data.buttonIcon),
|
|
111
|
+
buttonText: (0, _cloneDeep["default"])(data.buttonText),
|
|
112
112
|
content: {
|
|
113
|
-
backgroundColor: (0,
|
|
113
|
+
backgroundColor: (0, _cloneDeep["default"])(data.content.backgroundColor)
|
|
114
114
|
}
|
|
115
115
|
}); // console.log('--ffd, button hover first click', data);
|
|
116
116
|
|
|
@@ -202,7 +202,7 @@ function (_super) {
|
|
|
202
202
|
function ImageConfig() {
|
|
203
203
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
204
204
|
|
|
205
|
-
_this.onClick = function (
|
|
205
|
+
_this.onClick = function () {// console.log(event);
|
|
206
206
|
};
|
|
207
207
|
|
|
208
208
|
_this.getImg = function (v, way) {
|
|
@@ -320,7 +320,8 @@ function (_super) {
|
|
|
320
320
|
needHover = _a.needHover,
|
|
321
321
|
needClickArea = _a.needClickArea,
|
|
322
322
|
needURL = _a.needURL,
|
|
323
|
-
recommendImgSize = _a.recommendImgSize
|
|
323
|
+
recommendImgSize = _a.recommendImgSize,
|
|
324
|
+
onlySpecificCode = _a.onlySpecificCode;
|
|
324
325
|
var selectImg = this.getSelectedImg(data);
|
|
325
326
|
|
|
326
327
|
var ContentSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
|
|
@@ -348,51 +349,10 @@ function (_super) {
|
|
|
348
349
|
|
|
349
350
|
_this.selfRender();
|
|
350
351
|
},
|
|
352
|
+
onlySpecificCode: onlySpecificCode,
|
|
351
353
|
value: data.content.clickUrl
|
|
352
354
|
})));
|
|
353
355
|
|
|
354
|
-
var HoverSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
355
|
-
split: data.hover.backgroundType === 'new',
|
|
356
|
-
title: (0, _locale.i18n)('IMAGE')
|
|
357
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
358
|
-
className: "hoverSelect",
|
|
359
|
-
onChange: function onChange(v) {
|
|
360
|
-
data.hover.backgroundType = v;
|
|
361
|
-
|
|
362
|
-
_this.selfRender();
|
|
363
|
-
},
|
|
364
|
-
size: "large",
|
|
365
|
-
value: data.hover.backgroundType
|
|
366
|
-
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
367
|
-
value: "enlarge"
|
|
368
|
-
}, (0, _locale.i18n)('ENLARGE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
369
|
-
value: "new"
|
|
370
|
-
}, (0, _locale.i18n)('NEW_IMAGE')))), data.hover.backgroundType === 'enlarge' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
371
|
-
title: (0, _locale.i18n)('MAGNIFICATION')
|
|
372
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
373
|
-
inputType: "float",
|
|
374
|
-
maxVal: 3,
|
|
375
|
-
minVal: 1,
|
|
376
|
-
onChange: function onChange(v) {
|
|
377
|
-
data.hover.magnification = v.count;
|
|
378
|
-
|
|
379
|
-
_this.selfRender();
|
|
380
|
-
},
|
|
381
|
-
step: 0.25,
|
|
382
|
-
value: {
|
|
383
|
-
count: data.hover.magnification
|
|
384
|
-
}
|
|
385
|
-
})), data.hover.backgroundType === 'new' && /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
|
|
386
|
-
imageSelectedWay: data.hover.imageSelectedWay || {
|
|
387
|
-
pc: '',
|
|
388
|
-
mobile: ''
|
|
389
|
-
},
|
|
390
|
-
onChange: function onChange(v, way) {
|
|
391
|
-
return _this.getImgHoverUrl(v, way);
|
|
392
|
-
},
|
|
393
|
-
value: (0, _coreUtil.isPc)() ? data.hover.pcImgHoverUrl : data.hover.h5ImgHoverUrl
|
|
394
|
-
}));
|
|
395
|
-
|
|
396
356
|
var imageSource = [{
|
|
397
357
|
key: '1',
|
|
398
358
|
name: (0, _locale.i18n)('CONTENT'),
|
|
@@ -400,6 +360,50 @@ function (_super) {
|
|
|
400
360
|
}];
|
|
401
361
|
|
|
402
362
|
if (needHover) {
|
|
363
|
+
console.log('needHover', needHover);
|
|
364
|
+
|
|
365
|
+
var HoverSetting = /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
366
|
+
split: data.hover.backgroundType === 'new',
|
|
367
|
+
title: (0, _locale.i18n)('IMAGE')
|
|
368
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select, {
|
|
369
|
+
className: "hoverSelect",
|
|
370
|
+
onChange: function onChange(v) {
|
|
371
|
+
data.hover.backgroundType = v;
|
|
372
|
+
|
|
373
|
+
_this.selfRender();
|
|
374
|
+
},
|
|
375
|
+
size: "large",
|
|
376
|
+
value: data.hover.backgroundType
|
|
377
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
378
|
+
value: "enlarge"
|
|
379
|
+
}, (0, _locale.i18n)('ENLARGE')), /*#__PURE__*/_react["default"].createElement(_antd.Select.Option, {
|
|
380
|
+
value: "new"
|
|
381
|
+
}, (0, _locale.i18n)('NEW_IMAGE')))), data.hover.backgroundType === 'enlarge' && /*#__PURE__*/_react["default"].createElement(_common.Field, {
|
|
382
|
+
title: (0, _locale.i18n)('MAGNIFICATION')
|
|
383
|
+
}, /*#__PURE__*/_react["default"].createElement(_common.Slider, {
|
|
384
|
+
inputType: "float",
|
|
385
|
+
maxVal: 3,
|
|
386
|
+
minVal: 1,
|
|
387
|
+
onChange: function onChange(v) {
|
|
388
|
+
data.hover.magnification = v.count;
|
|
389
|
+
|
|
390
|
+
_this.selfRender();
|
|
391
|
+
},
|
|
392
|
+
step: 0.25,
|
|
393
|
+
value: {
|
|
394
|
+
count: data.hover.magnification
|
|
395
|
+
}
|
|
396
|
+
})), data.hover.backgroundType === 'new' && /*#__PURE__*/_react["default"].createElement(_common.ImagePicker, {
|
|
397
|
+
imageSelectedWay: data.hover.imageSelectedWay || {
|
|
398
|
+
pc: '',
|
|
399
|
+
mobile: ''
|
|
400
|
+
},
|
|
401
|
+
onChange: function onChange(v, way) {
|
|
402
|
+
return _this.getImgHoverUrl(v, way);
|
|
403
|
+
},
|
|
404
|
+
value: (0, _coreUtil.isPc)() ? data.hover.pcImgHoverUrl : data.hover.h5ImgHoverUrl
|
|
405
|
+
}));
|
|
406
|
+
|
|
403
407
|
imageSource.push({
|
|
404
408
|
key: '5',
|
|
405
409
|
name: (0, _locale.i18n)('HOVER'),
|
package/lib/mobx/Frame.js
CHANGED
|
@@ -42,13 +42,28 @@ function () {
|
|
|
42
42
|
onOk: function onOk() {},
|
|
43
43
|
onCancel: function onCancel() {}
|
|
44
44
|
};
|
|
45
|
+
/* 移动端 Modal弹窗 */
|
|
46
|
+
|
|
47
|
+
this.modalState = {
|
|
48
|
+
visible: false,
|
|
49
|
+
hideCancel: true,
|
|
50
|
+
title: '',
|
|
51
|
+
message: '',
|
|
52
|
+
messageImg: '',
|
|
53
|
+
confirmText: 'YES',
|
|
54
|
+
cancelText: 'NO',
|
|
55
|
+
onConfirm: function onConfirm() {},
|
|
56
|
+
onCancel: function onCancel() {}
|
|
57
|
+
};
|
|
45
58
|
this.textModalState = {
|
|
46
59
|
visible: false,
|
|
47
|
-
onOk: function onOk() {}
|
|
60
|
+
onOk: function onOk() {},
|
|
61
|
+
close: function close() {}
|
|
48
62
|
};
|
|
49
63
|
(0, _mobx.makeObservable)(this, {
|
|
50
64
|
confirmState: _mobx.observable,
|
|
51
|
-
textModalState: _mobx.observable
|
|
65
|
+
textModalState: _mobx.observable,
|
|
66
|
+
modalState: _mobx.observable
|
|
52
67
|
});
|
|
53
68
|
}
|
|
54
69
|
/** 修改状态 */
|
|
@@ -7,7 +7,7 @@ exports.renderPreview = exports.parseUrl = exports.newParseUrl = exports.listToT
|
|
|
7
7
|
|
|
8
8
|
var _qs = _interopRequireDefault(require("qs"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _pickBy = _interopRequireDefault(require("lodash/pickBy"));
|
|
11
11
|
|
|
12
12
|
var _commonUtil = require("./commonUtil");
|
|
13
13
|
|
|
@@ -33,7 +33,12 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
33
33
|
switch (type) {
|
|
34
34
|
// 商品详情
|
|
35
35
|
case _constants.urlTypeMap.PRODUCT_DETAIL_PAGE:
|
|
36
|
-
|
|
36
|
+
if (offerId) {
|
|
37
|
+
link = "/product/detail/" + offerId + "?productId=" + (productId !== null && productId !== void 0 ? productId : '');
|
|
38
|
+
} else {
|
|
39
|
+
link = "/product/detail/" + productId;
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
params = {
|
|
38
43
|
action: 'jump',
|
|
39
44
|
params: {
|
|
@@ -87,7 +92,7 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
87
92
|
action: 'jump',
|
|
88
93
|
params: {
|
|
89
94
|
type: 'PRODUCT_LIST',
|
|
90
|
-
params: (0,
|
|
95
|
+
params: (0, _pickBy["default"])(_qs["default"].parse(value), function (value) {
|
|
91
96
|
return value;
|
|
92
97
|
})
|
|
93
98
|
}
|
|
@@ -214,7 +219,12 @@ var parseUrl = function parseUrl(url) {
|
|
|
214
219
|
switch (type) {
|
|
215
220
|
// 商品详情
|
|
216
221
|
case _constants.urlType.PRODUCT_DETAIL:
|
|
217
|
-
|
|
222
|
+
if (arg1 && arg1 !== 'undefined') {
|
|
223
|
+
link = "/product/detail/" + arg1 + "?productId=" + (arg2 !== null && arg2 !== void 0 ? arg2 : '');
|
|
224
|
+
} else {
|
|
225
|
+
link = "/product/detail/" + arg2;
|
|
226
|
+
}
|
|
227
|
+
|
|
218
228
|
params = {
|
|
219
229
|
action: 'jump',
|
|
220
230
|
params: {
|
|
@@ -256,7 +266,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
256
266
|
action: 'jump',
|
|
257
267
|
params: {
|
|
258
268
|
type: 'PRODUCT_LIST',
|
|
259
|
-
params: (0,
|
|
269
|
+
params: (0, _pickBy["default"])(_qs["default"].parse(arg1), function (value) {
|
|
260
270
|
return value;
|
|
261
271
|
})
|
|
262
272
|
}
|
|
@@ -315,7 +325,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
315
325
|
'/social-commerce/my-cashback': 'CASHBACK',
|
|
316
326
|
'/account/wallet': 'WEBVIEW',
|
|
317
327
|
'/product/GroupBuy': 'GROUP',
|
|
318
|
-
'/search-page': 'SEARCH_PAGE'
|
|
328
|
+
'/search-page': 'SEARCH_PAGE',
|
|
329
|
+
'/main/my-commission': 'WALLET'
|
|
319
330
|
};
|
|
320
331
|
link = url;
|
|
321
332
|
params = {
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -16,7 +16,7 @@ exports.dragSource = exports.downloadBase64Image = void 0;
|
|
|
16
16
|
exports.ensure = ensure;
|
|
17
17
|
exports.getGAData = exports.getColorRgba = void 0;
|
|
18
18
|
exports.getPageDataMap = getPageDataMap;
|
|
19
|
-
exports.nextTick = exports.navigateTo = exports.importAsync = exports.getUrlParams = void 0;
|
|
19
|
+
exports.onListenTouch = exports.nextTick = exports.navigateTo = exports.importAsync = exports.getUrlParams = void 0;
|
|
20
20
|
exports.pushGA = pushGA;
|
|
21
21
|
exports.pxToRem = void 0;
|
|
22
22
|
exports.shareFacebook = shareFacebook;
|
|
@@ -27,7 +27,7 @@ exports.styleStringify = void 0;
|
|
|
27
27
|
|
|
28
28
|
var _axios = _interopRequireDefault(require("axios"));
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
31
31
|
|
|
32
32
|
var _uuid = require("uuid");
|
|
33
33
|
|
|
@@ -640,7 +640,7 @@ function pushGA(data, eventName) {
|
|
|
640
640
|
|
|
641
641
|
|
|
642
642
|
function covertKey(data, func) {
|
|
643
|
-
var newData = (0,
|
|
643
|
+
var newData = (0, _cloneDeep["default"])(data);
|
|
644
644
|
func(newData);
|
|
645
645
|
return JSON.stringify(newData);
|
|
646
646
|
}
|
|
@@ -898,4 +898,54 @@ var convertCount = function convertCount(value) {
|
|
|
898
898
|
return newValue;
|
|
899
899
|
};
|
|
900
900
|
|
|
901
|
-
exports.convertCount = convertCount;
|
|
901
|
+
exports.convertCount = convertCount;
|
|
902
|
+
|
|
903
|
+
var onListenTouch = function onListenTouch(cls, leftFunc, rightFunc) {
|
|
904
|
+
var box = document.querySelector(cls); // 监听对象
|
|
905
|
+
|
|
906
|
+
var startTime = ''; // 触摸开始时间
|
|
907
|
+
|
|
908
|
+
var startDistanceX = ''; // 触摸开始X轴位置
|
|
909
|
+
|
|
910
|
+
var startDistanceY = ''; // 触摸开始Y轴位置
|
|
911
|
+
|
|
912
|
+
var endTime = ''; // 触摸结束时间
|
|
913
|
+
|
|
914
|
+
var endDistanceX = ''; // 触摸结束X轴位置
|
|
915
|
+
|
|
916
|
+
var endDistanceY = ''; // 触摸结束Y轴位置
|
|
917
|
+
|
|
918
|
+
var moveTime = ''; // 触摸时间
|
|
919
|
+
|
|
920
|
+
var moveDistanceX = ''; // 触摸移动X轴距离
|
|
921
|
+
|
|
922
|
+
var moveDistanceY = ''; // 触摸移动Y轴距离
|
|
923
|
+
|
|
924
|
+
box.addEventListener('touchstart', function (e) {
|
|
925
|
+
startTime = new Date().getTime();
|
|
926
|
+
startDistanceX = e.touches[0].screenX;
|
|
927
|
+
startDistanceY = e.touches[0].screenY;
|
|
928
|
+
});
|
|
929
|
+
box.addEventListener('touchend', function (e) {
|
|
930
|
+
endTime = new Date().getTime();
|
|
931
|
+
endDistanceX = e.changedTouches[0].screenX;
|
|
932
|
+
endDistanceY = e.changedTouches[0].screenY;
|
|
933
|
+
moveTime = endTime - startTime;
|
|
934
|
+
moveDistanceX = startDistanceX - endDistanceX;
|
|
935
|
+
moveDistanceY = startDistanceY - endDistanceY; // 判断滑动距离超过40 且 时间小于500毫秒
|
|
936
|
+
|
|
937
|
+
if ((Math.abs(moveDistanceX) > 40 || Math.abs(moveDistanceY) > 40) && moveTime < 500) {
|
|
938
|
+
// 判断X轴移动的距离是否大于Y轴移动的距离
|
|
939
|
+
if (Math.abs(moveDistanceX) > Math.abs(moveDistanceY)) {
|
|
940
|
+
// 左右
|
|
941
|
+
if (moveDistanceX > 0) leftFunc();else rightFunc();
|
|
942
|
+
} else {
|
|
943
|
+
// 上下
|
|
944
|
+
return moveDistanceY > 0 ? 'top' : 'bottom';
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
return null;
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
exports.onListenTouch = onListenTouch;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
6
|
+
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbolNotSpace = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
7
7
|
|
|
8
8
|
var _divide = _interopRequireDefault(require("lodash/divide"));
|
|
9
9
|
|
|
@@ -105,6 +105,13 @@ var formatCurrencyWithSymbol = function formatCurrencyWithSymbol(num) {
|
|
|
105
105
|
var ret = formatCurrency(num);
|
|
106
106
|
return getPricePrefix() + " " + ret;
|
|
107
107
|
};
|
|
108
|
+
|
|
109
|
+
exports.formatCurrencyWithSymbol = formatCurrencyWithSymbol;
|
|
110
|
+
|
|
111
|
+
var formatCurrencyWithSymbolNotSpace = function formatCurrencyWithSymbolNotSpace(num) {
|
|
112
|
+
var ret = formatCurrency(num);
|
|
113
|
+
return "" + getPricePrefix() + ret;
|
|
114
|
+
};
|
|
108
115
|
/**
|
|
109
116
|
* TODO 未兼容科学计数法(小数点后7位)
|
|
110
117
|
* 计算浮点位数
|
|
@@ -113,7 +120,7 @@ var formatCurrencyWithSymbol = function formatCurrencyWithSymbol(num) {
|
|
|
113
120
|
*/
|
|
114
121
|
|
|
115
122
|
|
|
116
|
-
exports.
|
|
123
|
+
exports.formatCurrencyWithSymbolNotSpace = formatCurrencyWithSymbolNotSpace;
|
|
117
124
|
|
|
118
125
|
var calcFloatCount = function calcFloatCount(number) {
|
|
119
126
|
var numbString = String(number);
|