@bnqkl/web-component
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -5,2 +5,2 @@ /*! | ||
*/ | ||
import{p as e,b as t}from"./p-1ebf1375.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-11b86b04",[[1,"bn-collect-button",{color:[513],disabled:[516],icononly:[516],checkLabel:[1,"check-label"],unCheckLabel:[1,"un-check-label"],checked:[1540],direction:[1]}]]],["p-3264d206",[[1,"bn-dislike-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-bb091f5b",[[1,"bn-like-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-d86d7217",[[1,"bn-top-tabs-menu",{forSlider:[1,"for-slider"],bindSliderElement:[64]}]]],["p-3e153494",[[1,"bn-sub-tabs-menu",{forSlider:[1,"for-slider"],enableMask:[32],enableStartMask:[32],enableEndMask:[32],bindSliderElement:[64]}]]],["p-506bb6a6",[[1,"bn-blur-ground-image",{blurRatio:[514,"blur-ratio"],getActiveImageElement:[64],toBlob:[64],toObjectURL:[64],toDataURL:[64]}]]],["p-f2cece54",[[1,"bn-config-util",{assetPath:[1537,"asset-path"],setAssetPath:[64],getAssetPath:[64]}]]],["p-6c05da4d",[[1,"bn-has-more-text",{clampLine:[514,"clamp-line"],text:[1],open:[1540],lineHeight:[1026,"line-height"],_has_more:[32],_has_more_btn_height:[32],toggleOpen:[64]}]]],["p-f2a49e57",[[1,"bn-icon",{name:[513],thin:[516],label:[513],direction:[513],paths:[32]}]]],["p-341391e4",[[1,"bn-image",{pixelRatio:[514,"pixel-ratio"],width:[514],height:[514],loading:[513],alt:[513],src:[513],crossOrigin:[513,"cross-origin"],currentSrc:[1025,"current-src"],status:[32],refresh:[64]}]]],["p-24edc840",[[1,"bn-image-custom-adapter",{pixelRatio:[2,"pixel-ratio"],getTransfrom:[64]}]]],["p-b1647c30",[[1,"bn-image-imaginary-adapter",{origin:[513],redirection:[513],pixelRatio:[2,"pixel-ratio"],_redirection:[32],getTransfrom:[64]}]]],["p-ce90a705",[[1,"bn-image-provider",{transform:[64],transformFromElement:[64]}]]],["p-036bf754",[[1,"bn-lazy",{lazyState:[1537,"lazy-state"],autoSleep:[516,"auto-sleep"],debounce:[2],weakup:[64],sleep:[64]}]]],["p-3141ae86",[[1,"bn-picture-model-viewer",{src:[513],alt:[513],gltfSrc:[1,"gltf-src"],skyboxImage:[513,"skybox-image"],environmentImage:[513,"environment-image"],withCredentials:[516,"with-credentials"],cameraOrbitRadius:[513,"camera-orbit-radius"],fieldOfView:[513,"field-of-view"],autoRotate:[516,"auto-rotate"],interactionPrompt:[1540,"interaction-prompt"],_model_src:[32],_cameraOrbitRadius:[32],_fieldOfView:[32]}]]],["p-73d8e31a",[[1,"bn-reply-comment-button",{commentInfo:[8,"comment-info"]}]]],["p-9b02c0bd",[[1,"bn-slider",{defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],getLayoutInfo:[64],getScrollProgress:[64],getActivedIndex:[64],slideTo:[64],update:[64],getReason:[64]}]]],["p-7347c499",[[1,"bn-stacking-util",{text:[1]}]]],["p-82633239",[[1,"bn-template",{count:[1538],inc:[64]}]]],["p-6ca9fb85",[[1,"bn-user-comment-card",{replyContent:[1,"reply-content"],userAvator:[1,"user-avator"],userName:[1,"user-name"],userFlag:[1,"user-flag"],time:[1],text:[1],lineClamp:[2,"line-clamp"],isAuthor:[4,"is-author"],canFlod:[32],isFlod:[32]}]]],["p-ce3a057c",[[1,"bn-slider-scrollbar",{forSlider:[1,"for-slider"],forLayout:[1,"for-layout"],duration:[2],bindSliderElement:[64],bindLayoutElement:[64],update:[64]}]]],["p-97e142c3",[[1,"bn-lottie-web",{defaultActivedColor:[1025,"default-actived-color"],actived:[4],renderer:[1],loop:[4],autoplay:[4],name:[1],direction:[1538],src:[1],data:[16],getInstance:[64],play:[64],pause:[64],togglePause:[64],goToAndPlay:[64],goToAndStop:[64],getDuration:[64],getPrimaryColor:[64]}]]],["p-c276dcc0",[[1,"bn-lottie-web-toggle-button",{disabled:[516],icononly:[516],label:[1],labelColor:[1537,"label-color"],name:[513],direction:[513],animationData:[16],checked:[1540]}]]],["p-2b3c9654",[[1,"bn-slider-tabs",{forSlider:[1,"for-slider"],forTabs:[1,"for-tabs"],defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],bindSliderElement:[64],getLayoutInfo:[64],slideTo:[64],getScrollProgress:[64],getActivedIndex:[64],getReason:[64]}]]],["p-7ccadcef",[[1,"bn-image-toggle-button",{src:[1],frames:[2],duration:[1],color:[513],disabled:[516],icononly:[516],label:[1],checkedColor:[1537,"checked-color"],direction:[513],checked:[1540]}],[1,"bn-animation-icon",{src:[1],frames:[2],duration:[1],width:[1],height:[1],ratio:[2],direction:[1],actived:[1028],play:[64],pause:[64],finish:[64],reset:[64]}]]]],e))); | ||
import{p as e,b as t}from"./p-1ebf1375.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-8b5b10e0",[[1,"bn-collect-button",{color:[513],disabled:[516],icononly:[516],checkLabel:[1,"check-label"],unCheckLabel:[1,"un-check-label"],checked:[1540],direction:[1]}]]],["p-158fd680",[[1,"bn-dislike-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-f84a7a27",[[1,"bn-like-button",{color:[513],disabled:[516],icononly:[516],count:[1026],checked:[1540],direction:[1],count_uncheck:[32],count_checked:[32]}]]],["p-d86d7217",[[1,"bn-top-tabs-menu",{forSlider:[1,"for-slider"],bindSliderElement:[64]}]]],["p-3e153494",[[1,"bn-sub-tabs-menu",{forSlider:[1,"for-slider"],enableMask:[32],enableStartMask:[32],enableEndMask:[32],bindSliderElement:[64]}]]],["p-506bb6a6",[[1,"bn-blur-ground-image",{blurRatio:[514,"blur-ratio"],getActiveImageElement:[64],toBlob:[64],toObjectURL:[64],toDataURL:[64]}]]],["p-f2cece54",[[1,"bn-config-util",{assetPath:[1537,"asset-path"],setAssetPath:[64],getAssetPath:[64]}]]],["p-6c05da4d",[[1,"bn-has-more-text",{clampLine:[514,"clamp-line"],text:[1],open:[1540],lineHeight:[1026,"line-height"],_has_more:[32],_has_more_btn_height:[32],toggleOpen:[64]}]]],["p-f2a49e57",[[1,"bn-icon",{name:[513],thin:[516],label:[513],direction:[513],paths:[32]}]]],["p-5cf5ac55",[[1,"bn-image",{pixelRatio:[514,"pixel-ratio"],width:[514],height:[514],loading:[513],alt:[513],src:[513],crossOrigin:[513,"cross-origin"],disableRollback:[516,"disable-rollback"],currentSrc:[1025,"current-src"],status:[32],refresh:[64]}]]],["p-24edc840",[[1,"bn-image-custom-adapter",{pixelRatio:[2,"pixel-ratio"],getTransfrom:[64]}]]],["p-b1647c30",[[1,"bn-image-imaginary-adapter",{origin:[513],redirection:[513],pixelRatio:[2,"pixel-ratio"],_redirection:[32],getTransfrom:[64]}]]],["p-ce90a705",[[1,"bn-image-provider",{transform:[64],transformFromElement:[64]}]]],["p-036bf754",[[1,"bn-lazy",{lazyState:[1537,"lazy-state"],autoSleep:[516,"auto-sleep"],debounce:[2],weakup:[64],sleep:[64]}]]],["p-3141ae86",[[1,"bn-picture-model-viewer",{src:[513],alt:[513],gltfSrc:[1,"gltf-src"],skyboxImage:[513,"skybox-image"],environmentImage:[513,"environment-image"],withCredentials:[516,"with-credentials"],cameraOrbitRadius:[513,"camera-orbit-radius"],fieldOfView:[513,"field-of-view"],autoRotate:[516,"auto-rotate"],interactionPrompt:[1540,"interaction-prompt"],_model_src:[32],_cameraOrbitRadius:[32],_fieldOfView:[32]}]]],["p-73d8e31a",[[1,"bn-reply-comment-button",{commentInfo:[8,"comment-info"]}]]],["p-9b02c0bd",[[1,"bn-slider",{defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],getLayoutInfo:[64],getScrollProgress:[64],getActivedIndex:[64],slideTo:[64],update:[64],getReason:[64]}]]],["p-7347c499",[[1,"bn-stacking-util",{text:[1]}]]],["p-82633239",[[1,"bn-template",{count:[1538],inc:[64]}]]],["p-6ca9fb85",[[1,"bn-user-comment-card",{replyContent:[1,"reply-content"],userAvator:[1,"user-avator"],userName:[1,"user-name"],userFlag:[1,"user-flag"],time:[1],text:[1],lineClamp:[2,"line-clamp"],isAuthor:[4,"is-author"],canFlod:[32],isFlod:[32]}]]],["p-ce3a057c",[[1,"bn-slider-scrollbar",{forSlider:[1,"for-slider"],forLayout:[1,"for-layout"],duration:[2],bindSliderElement:[64],bindLayoutElement:[64],update:[64]}]]],["p-97e142c3",[[1,"bn-lottie-web",{defaultActivedColor:[1025,"default-actived-color"],actived:[4],renderer:[1],loop:[4],autoplay:[4],name:[1],direction:[1538],src:[1],data:[16],getInstance:[64],play:[64],pause:[64],togglePause:[64],goToAndPlay:[64],goToAndStop:[64],getDuration:[64],getPrimaryColor:[64]}]]],["p-c276dcc0",[[1,"bn-lottie-web-toggle-button",{disabled:[516],icononly:[516],label:[1],labelColor:[1537,"label-color"],name:[513],direction:[513],animationData:[16],checked:[1540]}]]],["p-2b3c9654",[[1,"bn-slider-tabs",{forSlider:[1,"for-slider"],forTabs:[1,"for-tabs"],defaultActivedIndex:[2,"default-actived-index"],activedIndex:[2,"actived-index"],bindSliderElement:[64],getLayoutInfo:[64],slideTo:[64],getScrollProgress:[64],getActivedIndex:[64],getReason:[64]}]]],["p-7ccadcef",[[1,"bn-image-toggle-button",{src:[1],frames:[2],duration:[1],color:[513],disabled:[516],icononly:[516],label:[1],checkedColor:[1537,"checked-color"],direction:[513],checked:[1540]}],[1,"bn-animation-icon",{src:[1],frames:[2],duration:[1],width:[1],height:[1],ratio:[2],direction:[1],actived:[1028],play:[64],pause:[64],finish:[64],reset:[64]}]]]],e))); |
@@ -12,3 +12,3 @@ /*! | ||
const utils = require('./utils-d2f65416.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-ead22186.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-f372ebda.js'); | ||
@@ -44,8 +44,3 @@ const bnCollectButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}.ani-count{font-size:var(--label-font-size, 1em)}.ani-count .count.top{transform:scale(0) translateY(50%)}.ani-count .count.bottom{transform:scale(1.45) translateY(-50%)}.ani-count .count.checked{transform:scale(1) translateY(0)}"; | ||
render() { | ||
return bnImageToggleButton_const.imageToggleButtonRender({ | ||
src: assets.assets.get("./collect.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#f7bd25`, | ||
}, this, () => (index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.checkLabel || "已收藏")), index.h("span", { class: { count: true, bottom: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
return (index.h(bnImageToggleButton_const.ImageToggleButtonRender, { src: assets.assets.get("./collect.webp"), frames: 48, duration: "1.6s", checkedColor: "#f7bd25", button: this }, index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.checkLabel || "已收藏")), index.h("span", { class: { count: true, bottom: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
} | ||
@@ -52,0 +47,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -12,3 +12,3 @@ /*! | ||
const utils = require('./utils-d2f65416.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-ead22186.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-f372ebda.js'); | ||
@@ -61,8 +61,3 @@ const bnDislikeButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}"; | ||
render() { | ||
return bnImageToggleButton_const.imageToggleButtonRender({ | ||
src: assets.assets.get("./dislike.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.count_checked)), index.h("span", { class: { count: true, bottom: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
return (index.h(bnImageToggleButton_const.ImageToggleButtonRender, { src: assets.assets.get("./dislike.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.count_checked)), index.h("span", { class: { count: true, bottom: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
} | ||
@@ -69,0 +64,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -55,5 +55,15 @@ /*! | ||
this.status = "loading"; | ||
/**是否失效使用回滚url */ | ||
this._rollback_src = false; | ||
this._onError = () => { | ||
this.console.warn("fail to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.warn(`fail to ${load_method} image:`, this.currentSrc); | ||
this.status = "error"; | ||
if (this._rollback_src === false && !this.disableRollback) { | ||
const { src } = this; | ||
if (src && this.currentSrc !== src) { | ||
this._rollback_src = true; | ||
this.currentSrc = src; | ||
} | ||
} | ||
/// 网络发生变更的时候,触发重新绑定 | ||
@@ -63,3 +73,4 @@ this._onOnlineHellper.bind(); | ||
this._onLoad = () => { | ||
this.console.info("success to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.info(`success to ${load_method} image:`, this.currentSrc); | ||
this.status = "success"; | ||
@@ -95,10 +106,11 @@ /// 加载成功,结果已经渲染,不需要绑定网络变更 | ||
} | ||
this.currentSrc = current_src; | ||
for (const ele of utils.manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
/** 这个状态始终要跟着内部的img的属性走 */ | ||
if (this.currentSrc !== current_src) { | ||
this.status = "loading"; | ||
this._rollback_src = false; | ||
this.currentSrc = current_src; | ||
} | ||
for (const ele of utils.manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
return true; | ||
@@ -105,0 +117,0 @@ } |
@@ -12,3 +12,3 @@ /*! | ||
const utils = require('./utils-d2f65416.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-ead22186.js'); | ||
const bnImageToggleButton_const = require('./bn-image-toggle-button.const-f372ebda.js'); | ||
@@ -61,8 +61,3 @@ const bnLikeButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}"; | ||
render() { | ||
return bnImageToggleButton_const.imageToggleButtonRender({ | ||
src: assets.assets.get("./like.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.count_uncheck)), index.h("span", { class: { count: true, bottom: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.count_checked))))); | ||
return (index.h(bnImageToggleButton_const.ImageToggleButtonRender, { src: assets.assets.get("./like.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, index.h("div", { slot: "label", class: `ani-count ${this.direction}` }, index.h("span", { class: { count: true, top: true, checked: !this.checked } }, index.h("slot", { name: "uncheck" }, this.count_uncheck)), index.h("span", { class: { count: true, bottom: true, checked: this.checked } }, index.h("slot", { name: "checked" }, this.count_checked))))); | ||
} | ||
@@ -69,0 +64,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -22,3 +22,3 @@ /*! | ||
patchBrowser().then(options => { | ||
return index.bootstrapLazy([["bn-collect-button.cjs",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button.cjs",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button.cjs",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu.cjs",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu.cjs",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image.cjs",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util.cjs",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text.cjs",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon.cjs",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image.cjs",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter.cjs",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter.cjs",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider.cjs",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy.cjs",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer.cjs",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button.cjs",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider.cjs",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util.cjs",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template.cjs",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card.cjs",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar.cjs",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web.cjs",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button.cjs",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs.cjs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2.cjs",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
return index.bootstrapLazy([["bn-collect-button.cjs",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button.cjs",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button.cjs",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu.cjs",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu.cjs",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image.cjs",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util.cjs",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text.cjs",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon.cjs",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image.cjs",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"disableRollback":[516,"disable-rollback"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter.cjs",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter.cjs",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider.cjs",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy.cjs",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer.cjs",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button.cjs",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider.cjs",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util.cjs",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template.cjs",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card.cjs",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar.cjs",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web.cjs",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button.cjs",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs.cjs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2.cjs",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
}); |
@@ -21,3 +21,3 @@ /*! | ||
return patchEsm().then(() => { | ||
return index.bootstrapLazy([["bn-collect-button.cjs",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button.cjs",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button.cjs",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu.cjs",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu.cjs",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image.cjs",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util.cjs",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text.cjs",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon.cjs",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image.cjs",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter.cjs",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter.cjs",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider.cjs",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy.cjs",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer.cjs",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button.cjs",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider.cjs",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util.cjs",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template.cjs",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card.cjs",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar.cjs",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web.cjs",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button.cjs",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs.cjs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2.cjs",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
return index.bootstrapLazy([["bn-collect-button.cjs",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button.cjs",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button.cjs",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu.cjs",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu.cjs",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image.cjs",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util.cjs",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text.cjs",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon.cjs",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image.cjs",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"disableRollback":[516,"disable-rollback"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter.cjs",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter.cjs",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider.cjs",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy.cjs",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer.cjs",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button.cjs",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider.cjs",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util.cjs",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template.cjs",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card.cjs",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar.cjs",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web.cjs",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button.cjs",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs.cjs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2.cjs",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
}); | ||
@@ -24,0 +24,0 @@ }; |
@@ -14,3 +14,3 @@ /*! | ||
import { bindThis } from "../../utils/utils"; | ||
import { imageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
import { ImageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
export class BnButtonCollect { | ||
@@ -31,12 +31,8 @@ constructor() { | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./collect.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#f7bd25`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.checkLabel || "已收藏")), | ||
h("span", { class: { count: true, bottom: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./collect.webp"), frames: 48, duration: "1.6s", checkedColor: "#f7bd25", button: this }, | ||
h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.checkLabel || "已收藏")), | ||
h("span", { class: { count: true, bottom: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
} | ||
@@ -43,0 +39,0 @@ static get is() { return "bn-collect-button"; } |
@@ -14,3 +14,3 @@ /*! | ||
import { bindThis } from "../../utils/utils"; | ||
import { imageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
import { ImageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
export class BnButtonDislike { | ||
@@ -48,12 +48,8 @@ constructor() { | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./dislike.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.count_checked)), | ||
h("span", { class: { count: true, bottom: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./dislike.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, | ||
h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.count_checked)), | ||
h("span", { class: { count: true, bottom: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
} | ||
@@ -60,0 +56,0 @@ static get is() { return "bn-dislike-button"; } |
@@ -14,3 +14,3 @@ /*! | ||
import { bindThis } from "../../utils/utils"; | ||
import { imageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
import { ImageToggleButtonRender } from "../util/bn-image-toggle-button.const"; | ||
export class BnButtonLike { | ||
@@ -48,12 +48,8 @@ constructor() { | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./like.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.count_uncheck)), | ||
h("span", { class: { count: true, bottom: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.count_checked))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./like.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, | ||
h("div", { slot: "label", class: `ani-count ${this.direction}` }, | ||
h("span", { class: { count: true, top: true, checked: !this.checked } }, | ||
h("slot", { name: "uncheck" }, this.count_uncheck)), | ||
h("span", { class: { count: true, bottom: true, checked: this.checked } }, | ||
h("slot", { name: "checked" }, this.count_checked))))); | ||
} | ||
@@ -60,0 +56,0 @@ static get is() { return "bn-like-button"; } |
@@ -24,5 +24,15 @@ /*! | ||
this.status = "loading"; | ||
/**是否失效使用回滚url */ | ||
this._rollback_src = false; | ||
this._onError = () => { | ||
this.console.warn("fail to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.warn(`fail to ${load_method} image:`, this.currentSrc); | ||
this.status = "error"; | ||
if (this._rollback_src === false && !this.disableRollback) { | ||
const { src } = this; | ||
if (src && this.currentSrc !== src) { | ||
this._rollback_src = true; | ||
this.currentSrc = src; | ||
} | ||
} | ||
/// 网络发生变更的时候,触发重新绑定 | ||
@@ -32,3 +42,4 @@ this._onOnlineHellper.bind(); | ||
this._onLoad = () => { | ||
this.console.info("success to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.info(`success to ${load_method} image:`, this.currentSrc); | ||
this.status = "success"; | ||
@@ -64,10 +75,11 @@ /// 加载成功,结果已经渲染,不需要绑定网络变更 | ||
} | ||
this.currentSrc = current_src; | ||
for (const ele of manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
/** 这个状态始终要跟着内部的img的属性走 */ | ||
if (this.currentSrc !== current_src) { | ||
this.status = "loading"; | ||
this._rollback_src = false; | ||
this.currentSrc = current_src; | ||
} | ||
for (const ele of manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
return true; | ||
@@ -248,2 +260,19 @@ } | ||
}, | ||
"disableRollback": { | ||
"type": "boolean", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "boolean", | ||
"resolved": "boolean | undefined", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "disable-rollback", | ||
"reflect": true | ||
}, | ||
"currentSrc": { | ||
@@ -250,0 +279,0 @@ "type": "string", |
@@ -6,4 +6,5 @@ /*! | ||
import { h } from "@stencil/core"; | ||
export const imageToggleButtonRender = (aniConfig, button, slotRender) => { | ||
return (h("bn-image-toggle-button", { class: "icon", src: aniConfig.src, frames: aniConfig.frames, duration: aniConfig.duration, checkedColor: aniConfig.checkedColor, direction: button.direction, color: button.color, disabled: button.disabled, icononly: button.icononly, checked: button.checked, onCheckedChange: button.onChange }, slotRender())); | ||
export const ImageToggleButtonRender = (props, children) => { | ||
const { button } = props; | ||
return (h("bn-image-toggle-button", { class: "icon", src: props.src, frames: props.frames, duration: props.duration, checkedColor: props.checkedColor, direction: button.direction, color: button.color, disabled: button.disabled, icononly: button.icononly, checked: button.checked, onCheckedChange: button.onChange }, children)); | ||
}; |
@@ -8,3 +8,3 @@ /*! | ||
import { b as bindThis } from './utils-d48488d6.js'; | ||
import { i as imageToggleButtonRender } from './bn-image-toggle-button.const-e127088b.js'; | ||
import { I as ImageToggleButtonRender } from './bn-image-toggle-button.const-24be2067.js'; | ||
@@ -40,8 +40,3 @@ const bnCollectButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}.ani-count{font-size:var(--label-font-size, 1em)}.ani-count .count.top{transform:scale(0) translateY(50%)}.ani-count .count.bottom{transform:scale(1.45) translateY(-50%)}.ani-count .count.checked{transform:scale(1) translateY(0)}"; | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./collect.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#f7bd25`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: this.checked } }, h("slot", { name: "checked" }, this.checkLabel || "已收藏")), h("span", { class: { count: true, bottom: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./collect.webp"), frames: 48, duration: "1.6s", checkedColor: "#f7bd25", button: this }, h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: this.checked } }, h("slot", { name: "checked" }, this.checkLabel || "已收藏")), h("span", { class: { count: true, bottom: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.unCheckLabel || "收藏"))))); | ||
} | ||
@@ -48,0 +43,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -8,3 +8,3 @@ /*! | ||
import { b as bindThis } from './utils-d48488d6.js'; | ||
import { i as imageToggleButtonRender } from './bn-image-toggle-button.const-e127088b.js'; | ||
import { I as ImageToggleButtonRender } from './bn-image-toggle-button.const-24be2067.js'; | ||
@@ -57,8 +57,3 @@ const bnDislikeButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}"; | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./dislike.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: this.checked } }, h("slot", { name: "checked" }, this.count_checked)), h("span", { class: { count: true, bottom: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./dislike.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: this.checked } }, h("slot", { name: "checked" }, this.count_checked)), h("span", { class: { count: true, bottom: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.count_uncheck))))); | ||
} | ||
@@ -65,0 +60,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -51,5 +51,15 @@ /*! | ||
this.status = "loading"; | ||
/**是否失效使用回滚url */ | ||
this._rollback_src = false; | ||
this._onError = () => { | ||
this.console.warn("fail to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.warn(`fail to ${load_method} image:`, this.currentSrc); | ||
this.status = "error"; | ||
if (this._rollback_src === false && !this.disableRollback) { | ||
const { src } = this; | ||
if (src && this.currentSrc !== src) { | ||
this._rollback_src = true; | ||
this.currentSrc = src; | ||
} | ||
} | ||
/// 网络发生变更的时候,触发重新绑定 | ||
@@ -59,3 +69,4 @@ this._onOnlineHellper.bind(); | ||
this._onLoad = () => { | ||
this.console.info("success to load image:", this.currentSrc); | ||
const load_method = this._rollback_src ? "rollback" : "load"; | ||
this.console.info(`success to ${load_method} image:`, this.currentSrc); | ||
this.status = "success"; | ||
@@ -91,10 +102,11 @@ /// 加载成功,结果已经渲染,不需要绑定网络变更 | ||
} | ||
this.currentSrc = current_src; | ||
for (const ele of manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
/** 这个状态始终要跟着内部的img的属性走 */ | ||
if (this.currentSrc !== current_src) { | ||
this.status = "loading"; | ||
this._rollback_src = false; | ||
this.currentSrc = current_src; | ||
} | ||
for (const ele of manyQuerySelectorAll(this._slotEles, "img")) { | ||
ele.src = current_src; | ||
} | ||
return true; | ||
@@ -101,0 +113,0 @@ } |
@@ -8,3 +8,3 @@ /*! | ||
import { b as bindThis } from './utils-d48488d6.js'; | ||
import { i as imageToggleButtonRender } from './bn-image-toggle-button.const-e127088b.js'; | ||
import { I as ImageToggleButtonRender } from './bn-image-toggle-button.const-24be2067.js'; | ||
@@ -57,8 +57,3 @@ const bnLikeButtonCss = ":host{display:inline-block}.ani-count{display:grid;grid:1fr/1fr;grid-template-areas:\"count\"}.ani-count.lr{justify-items:start}.ani-count.lr .count{transform-origin:left}.ani-count.tb{line-height:var(--column-line-height);justify-items:center}.ani-count.tb .count{left:-0.25em}.ani-count .count{grid-area:count;transition:inherit}.ani-count .count.top{transform:translateY(-100%);opacity:0;pointer-events:none}.ani-count .count.bottom{transform:translateY(100%);opacity:0;pointer-events:none}.ani-count .count.checked{transform:translateY(0);opacity:1}"; | ||
render() { | ||
return imageToggleButtonRender({ | ||
src: assets.get("./like.webp"), | ||
frames: 48, | ||
duration: "1.6s", | ||
checkedColor: `#549deb`, | ||
}, this, () => (h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.count_uncheck)), h("span", { class: { count: true, bottom: true, checked: this.checked } }, h("slot", { name: "checked" }, this.count_checked))))); | ||
return (h(ImageToggleButtonRender, { src: assets.get("./like.webp"), frames: 48, duration: "1.6s", checkedColor: "#549deb", button: this }, h("div", { slot: "label", class: `ani-count ${this.direction}` }, h("span", { class: { count: true, top: true, checked: !this.checked } }, h("slot", { name: "uncheck" }, this.count_uncheck)), h("span", { class: { count: true, bottom: true, checked: this.checked } }, h("slot", { name: "checked" }, this.count_checked))))); | ||
} | ||
@@ -65,0 +60,0 @@ static get assetsDirs() { return ["./assets"]; } |
@@ -20,3 +20,3 @@ /*! | ||
patchBrowser().then(options => { | ||
return bootstrapLazy([["bn-collect-button",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
return bootstrapLazy([["bn-collect-button",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"disableRollback":[516,"disable-rollback"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
}); |
@@ -17,3 +17,3 @@ /*! | ||
return patchEsm().then(() => { | ||
return bootstrapLazy([["bn-collect-button",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
return bootstrapLazy([["bn-collect-button",[[1,"bn-collect-button",{"color":[513],"disabled":[516],"icononly":[516],"checkLabel":[1,"check-label"],"unCheckLabel":[1,"un-check-label"],"checked":[1540],"direction":[1]}]]],["bn-dislike-button",[[1,"bn-dislike-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-like-button",[[1,"bn-like-button",{"color":[513],"disabled":[516],"icononly":[516],"count":[1026],"checked":[1540],"direction":[1],"count_uncheck":[32],"count_checked":[32]}]]],["bn-top-tabs-menu",[[1,"bn-top-tabs-menu",{"forSlider":[1,"for-slider"],"bindSliderElement":[64]}]]],["bn-sub-tabs-menu",[[1,"bn-sub-tabs-menu",{"forSlider":[1,"for-slider"],"enableMask":[32],"enableStartMask":[32],"enableEndMask":[32],"bindSliderElement":[64]}]]],["bn-blur-ground-image",[[1,"bn-blur-ground-image",{"blurRatio":[514,"blur-ratio"],"getActiveImageElement":[64],"toBlob":[64],"toObjectURL":[64],"toDataURL":[64]}]]],["bn-config-util",[[1,"bn-config-util",{"assetPath":[1537,"asset-path"],"setAssetPath":[64],"getAssetPath":[64]}]]],["bn-has-more-text",[[1,"bn-has-more-text",{"clampLine":[514,"clamp-line"],"text":[1],"open":[1540],"lineHeight":[1026,"line-height"],"_has_more":[32],"_has_more_btn_height":[32],"toggleOpen":[64]}]]],["bn-icon",[[1,"bn-icon",{"name":[513],"thin":[516],"label":[513],"direction":[513],"paths":[32]}]]],["bn-image",[[1,"bn-image",{"pixelRatio":[514,"pixel-ratio"],"width":[514],"height":[514],"loading":[513],"alt":[513],"src":[513],"crossOrigin":[513,"cross-origin"],"disableRollback":[516,"disable-rollback"],"currentSrc":[1025,"current-src"],"status":[32],"refresh":[64]}]]],["bn-image-custom-adapter",[[1,"bn-image-custom-adapter",{"pixelRatio":[2,"pixel-ratio"],"getTransfrom":[64]}]]],["bn-image-imaginary-adapter",[[1,"bn-image-imaginary-adapter",{"origin":[513],"redirection":[513],"pixelRatio":[2,"pixel-ratio"],"_redirection":[32],"getTransfrom":[64]}]]],["bn-image-provider",[[1,"bn-image-provider",{"transform":[64],"transformFromElement":[64]}]]],["bn-lazy",[[1,"bn-lazy",{"lazyState":[1537,"lazy-state"],"autoSleep":[516,"auto-sleep"],"debounce":[2],"weakup":[64],"sleep":[64]}]]],["bn-picture-model-viewer",[[1,"bn-picture-model-viewer",{"src":[513],"alt":[513],"gltfSrc":[1,"gltf-src"],"skyboxImage":[513,"skybox-image"],"environmentImage":[513,"environment-image"],"withCredentials":[516,"with-credentials"],"cameraOrbitRadius":[513,"camera-orbit-radius"],"fieldOfView":[513,"field-of-view"],"autoRotate":[516,"auto-rotate"],"interactionPrompt":[1540,"interaction-prompt"],"_model_src":[32],"_cameraOrbitRadius":[32],"_fieldOfView":[32]}]]],["bn-reply-comment-button",[[1,"bn-reply-comment-button",{"commentInfo":[8,"comment-info"]}]]],["bn-slider",[[1,"bn-slider",{"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"getLayoutInfo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"slideTo":[64],"update":[64],"getReason":[64]}]]],["bn-stacking-util",[[1,"bn-stacking-util",{"text":[1]}]]],["bn-template",[[1,"bn-template",{"count":[1538],"inc":[64]}]]],["bn-user-comment-card",[[1,"bn-user-comment-card",{"replyContent":[1,"reply-content"],"userAvator":[1,"user-avator"],"userName":[1,"user-name"],"userFlag":[1,"user-flag"],"time":[1],"text":[1],"lineClamp":[2,"line-clamp"],"isAuthor":[4,"is-author"],"canFlod":[32],"isFlod":[32]}]]],["bn-slider-scrollbar",[[1,"bn-slider-scrollbar",{"forSlider":[1,"for-slider"],"forLayout":[1,"for-layout"],"duration":[2],"bindSliderElement":[64],"bindLayoutElement":[64],"update":[64]}]]],["bn-lottie-web",[[1,"bn-lottie-web",{"defaultActivedColor":[1025,"default-actived-color"],"actived":[4],"renderer":[1],"loop":[4],"autoplay":[4],"name":[1],"direction":[1538],"src":[1],"data":[16],"getInstance":[64],"play":[64],"pause":[64],"togglePause":[64],"goToAndPlay":[64],"goToAndStop":[64],"getDuration":[64],"getPrimaryColor":[64]}]]],["bn-lottie-web-toggle-button",[[1,"bn-lottie-web-toggle-button",{"disabled":[516],"icononly":[516],"label":[1],"labelColor":[1537,"label-color"],"name":[513],"direction":[513],"animationData":[16],"checked":[1540]}]]],["bn-slider-tabs",[[1,"bn-slider-tabs",{"forSlider":[1,"for-slider"],"forTabs":[1,"for-tabs"],"defaultActivedIndex":[2,"default-actived-index"],"activedIndex":[2,"actived-index"],"bindSliderElement":[64],"getLayoutInfo":[64],"slideTo":[64],"getScrollProgress":[64],"getActivedIndex":[64],"getReason":[64]}]]],["bn-animation-icon_2",[[1,"bn-image-toggle-button",{"src":[1],"frames":[2],"duration":[1],"color":[513],"disabled":[516],"icononly":[516],"label":[1],"checkedColor":[1537,"checked-color"],"direction":[513],"checked":[1540]}],[1,"bn-animation-icon",{"src":[1],"frames":[2],"duration":[1],"width":[1],"height":[1],"ratio":[2],"direction":[1],"actived":[1028],"play":[64],"pause":[64],"finish":[64],"reset":[64]}]]]], options); | ||
}); | ||
@@ -20,0 +20,0 @@ }; |
@@ -111,2 +111,3 @@ /* eslint-disable */ | ||
"currentSrc": string; | ||
"disableRollback"?: boolean; | ||
"height"?: number; | ||
@@ -692,2 +693,3 @@ "loading"?: "lazy" | "auto" | "eager"; | ||
"currentSrc"?: string; | ||
"disableRollback"?: boolean; | ||
"height"?: number; | ||
@@ -694,0 +696,0 @@ "loading"?: "lazy" | "auto" | "eager"; |
@@ -13,2 +13,3 @@ import { ComponentInterface } from "../../stencil-public-runtime"; | ||
crossOrigin?: "anonymous" | "use-credentials"; | ||
disableRollback?: boolean; | ||
/**当前显示图片的url,随着data属性的变更与provider的变更,currentSrc会发生变化 */ | ||
@@ -20,2 +21,4 @@ currentSrc: string; | ||
private status; | ||
/**是否失效使用回滚url */ | ||
private _rollback_src; | ||
private _onError; | ||
@@ -22,0 +25,0 @@ private _onLoad; |
@@ -0,1 +1,2 @@ | ||
import { FunctionalComponent } from "../../stencil-public-runtime"; | ||
export interface $ImageToggleButton { | ||
@@ -13,3 +14,3 @@ checked: boolean; | ||
} | ||
export declare const imageToggleButtonRender: (aniConfig: { | ||
export declare const ImageToggleButtonRender: FunctionalComponent<{ | ||
src: string; | ||
@@ -19,2 +20,3 @@ frames: number; | ||
checkedColor: string; | ||
}, button: $ImageToggleButton, slotRender: () => unknown) => any; | ||
button: $ImageToggleButton; | ||
}>; |
{ | ||
"name": "@bnqkl/web-component", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "Bnqkl Web Component", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.cjs.js", | ||
"@storybook/builder-webpack4": "^6.5.9", | ||
"@storybook/html": "^6.5.9", | ||
"@storybook/html": "^6.5.12", | ||
"@storybook/manager-webpack4": "^6.5.9", | ||
@@ -40,0 +40,0 @@ "@storybook/testing-library": "^0.0.13", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6684256
72029