提交 37f46a07 编写于 作者: DCloud_iOS_XHY's avatar DCloud_iOS_XHY

修改条件判断

上级 38b7844e
...@@ -70,13 +70,13 @@ export default { ...@@ -70,13 +70,13 @@ export default {
}, },
methods: { methods: {
validateGeneralAttributes() { validateGeneralAttributes() {
const generalTarget = this.$refs['general-target'] as Element const generalTarget = this.$refs['general-target'] as UniElement
const generalId = generalTarget.getAttribute('id') const generalId = generalTarget.getAttribute('id')
if (generalId != this.generalId) { if (generalId != this.generalId) {
this.validateGeneralAttrText = '基础属性 id 验证失败' this.validateGeneralAttrText = '基础属性 id 验证失败'
return return
} }
// #ifdef APP-ANDROID // #ifdef APP
if (!generalTarget.classList.includes('general-class')) { if (!generalTarget.classList.includes('general-class')) {
// #endif // #endif
// #ifdef WEB // #ifdef WEB
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</template> </template>
</uni-collapse> </uni-collapse>
<!-- #ifdef UNI-APP-X && APP --> <!-- #ifdef UNI-APP-X && APP-ANDROID -->
<uni-upgrade-center-app ref="upgradePopup" @show="upgradePopupShow" @close="upgradePopupClose" /> <uni-upgrade-center-app ref="upgradePopup" @show="upgradePopupShow" @close="upgradePopupClose" />
<!-- #endif --> <!-- #endif -->
</view> </view>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</template> </template>
<script lang="uts"> <script lang="uts">
// #ifdef UNI-APP-X && APP // #ifdef UNI-APP-X && APP-ANDROID
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update' import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
// #endif // #endif
...@@ -290,7 +290,7 @@ ...@@ -290,7 +290,7 @@
url, url,
}) })
} }
// #ifdef UNI-APP-X && APP // #ifdef UNI-APP-X && APP-ANDROID
, upgradePopupShow() { , upgradePopupShow() {
console.log('upgradePopup show'); console.log('upgradePopup show');
if (!this.pageHiden) { if (!this.pageHiden) {
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
// #endif // #endif
}, },
onReady() { onReady() {
// #ifdef UNI-APP-X && APP // #ifdef UNI-APP-X && APP-ANDROID
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance) checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
// #endif // #endif
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册