Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime): 修复小程序可选 DOM API 的相关提示,fix #14664 #14764

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class MutationObserver {
this.core = new MutationObserverImpl(callback)
} else {
if (process.env.NODE_ENV !== 'production') {
console.warn('[Taro Warning] 若要使用 MutationObserver,请在 Taro 编译配置中设置 \'mini.enableMutationObserver: true\'')
console.warn('[Taro Warning] 若要使用 MutationObserver,请在 Taro 编译配置中设置 \'mini.runtime.enableMutationObserver: true\'')
}
this.core = {
observe: noop,
Expand Down
16 changes: 8 additions & 8 deletions packages/taro/types/compile/config/mini.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import type Chain from 'webpack-chain'
import type { IOption, IPostcssOption } from './util'

interface Runtime {
enableInnerHTML: boolean
enableSizeAPIs: boolean
enableAdjacentHTML: boolean
enableTemplateContent: boolean
enableCloneNode: boolean
enableContains: boolean
enableMutationObserver: boolean
enableInnerHTML?: boolean
enableSizeAPIs?: boolean
enableAdjacentHTML?: boolean
enableTemplateContent?: boolean
enableCloneNode?: boolean
enableContains?: boolean
enableMutationObserver?: boolean
}

export interface IMiniAppConfig {
Expand Down Expand Up @@ -45,7 +45,7 @@ export interface IMiniAppConfig {
/**
* 编译前清空输出目录
* @since Taro v3.6.9
* @description
* @description
* - 默认清空输出目录,可设置 clean: false 不清空
* - 可设置 clean: { keep: ['project.config.json'] } 保留指定文件
* - 注意 clean.keep 不支持函数
Expand Down
Loading