From af930887f9972b7dd21c80599e697e44f5e5a579 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 13 十一月 2024 14:05:04 +0800
Subject: [PATCH] 移除视频相关组件
---
miniprogram_npm/tdesign-miniprogram/notice-bar/notice-bar.js | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/miniprogram_npm/tdesign-miniprogram/notice-bar/notice-bar.js b/miniprogram_npm/tdesign-miniprogram/notice-bar/notice-bar.js
index dbd43c7..66a3a0e 100644
--- a/miniprogram_npm/tdesign-miniprogram/notice-bar/notice-bar.js
+++ b/miniprogram_npm/tdesign-miniprogram/notice-bar/notice-bar.js
@@ -27,14 +27,15 @@
`${prefix}-class-suffix-icon`,
];
this.options = {
- styleIsolation: 'apply-shared',
multipleSlots: true,
+ pureDataPattern: /^__/,
};
this.properties = props;
this.data = {
prefix,
classPrefix: name,
loop: -1,
+ __ready: false,
};
this.observers = {
marquee(val) {
@@ -49,6 +50,8 @@
}
},
visible(visible) {
+ if (!this.data.__ready)
+ return;
if (visible) {
this.show();
}
@@ -65,6 +68,8 @@
});
},
content() {
+ if (!this.data.__ready)
+ return;
this.clearNoticeBarAnimation();
this.initAnimation();
},
@@ -81,6 +86,7 @@
},
ready() {
this.show();
+ this.setData({ __ready: true });
},
};
this.methods = {
@@ -88,7 +94,8 @@
const warpID = `.${name}__content-wrap`;
const nodeID = `.${name}__content`;
getAnimationFrame(this, () => {
- Promise.all([getRect(this, nodeID), getRect(this, warpID)]).then(([nodeRect, wrapRect]) => {
+ Promise.all([getRect(this, nodeID), getRect(this, warpID)])
+ .then(([nodeRect, wrapRect]) => {
const { marquee } = this.properties;
if (nodeRect == null || wrapRect == null || !nodeRect.width || !wrapRect.width) {
return;
@@ -108,7 +115,8 @@
});
marquee.loop !== 0 && this.startScrollAnimation(true);
}
- });
+ })
+ .catch(() => { });
});
},
startScrollAnimation(isFirstScroll = false) {
@@ -159,6 +167,10 @@
_prefixIcon: calcIcon(v, THEME_ICON[theme]),
});
},
+ onChange(e) {
+ const { current, source } = e.detail;
+ this.triggerEvent('change', { current, source });
+ },
clickPrefixIcon() {
this.triggerEvent('click', { trigger: 'prefix-icon' });
},
--
Gitblit v1.9.3