Skip to content

Commit

Permalink
feat(mp-toutiao): support virtualHost dcloudio#4699
Browse files Browse the repository at this point in the history
  • Loading branch information
yurj26 committed Jan 27, 2024
1 parent 309483d commit 86f61e8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
17 changes: 16 additions & 1 deletion packages/uni-mp-toutiao/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,21 @@ function initProperties (props, isBehavior = false, file = '', options) {
value: null
};
}
{
if ( options.virtualHost) {
{
options.applyFragment = true;
}
properties.virtualHostStyle = {
type: null,
value: ''
};
properties.virtualHostClass = {
type: null,
value: ''
};
}
}
// scopedSlotsCompiler auto
properties.scopedSlotsCompiler = {
type: String,
Expand Down Expand Up @@ -2622,7 +2637,7 @@ function parseBaseComponent (vueComponentOptions, {
options,
data: initData(vueOptions, Vue.prototype),
behaviors: initBehaviors(vueOptions, initBehavior),
properties: initProperties(vueOptions.props, false, vueOptions.__file),
properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
lifetimes: {
attached () {
const properties = this.properties;
Expand Down
9 changes: 8 additions & 1 deletion src/core/runtime/wrapper/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,15 @@ export function initProperties (props, isBehavior = false, file = '', options) {
value: null
}
}
if (__PLATFORM__ === 'mp-weixin' || __PLATFORM__ === 'mp-alipay') {
if (
__PLATFORM__ === 'mp-weixin' ||
__PLATFORM__ === 'mp-alipay' ||
__PLATFORM__ === 'mp-toutiao'
) {
if (__PLATFORM__ === 'mp-alipay' || options.virtualHost) {
if (__PLATFORM__ === 'mp-toutiao') {
options.applyFragment = true
}
properties.virtualHostStyle = {
type: null,
value: ''
Expand Down

0 comments on commit 86f61e8

Please sign in to comment.