mirror of
https://git.beihong.wang/wangbeihong/iot-bedroom-environment-controller.git
synced 2026-04-24 06:13:04 +08:00
增加补充相关资料和小程序源码
This commit is contained in:
27
微信小程序源码/iot-home/node_modules/@vant/weapp/lib/mixins/link.js
generated
vendored
Normal file
27
微信小程序源码/iot-home/node_modules/@vant/weapp/lib/mixins/link.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.link = void 0;
|
||||
exports.link = Behavior({
|
||||
properties: {
|
||||
url: String,
|
||||
linkType: {
|
||||
type: String,
|
||||
value: 'navigateTo',
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jumpLink: function (urlKey) {
|
||||
if (urlKey === void 0) { urlKey = 'url'; }
|
||||
var url = this.data[urlKey];
|
||||
if (url) {
|
||||
if (this.data.linkType === 'navigateTo' &&
|
||||
getCurrentPages().length > 9) {
|
||||
wx.redirectTo({ url: url });
|
||||
}
|
||||
else {
|
||||
wx[this.data.linkType]({ url: url });
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user