Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add runtimeDomOverrides for fix webpack @vue/runtime-dom warns#1094

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
vallemar wants to merge1 commit intonativescript-vue:main
base:main
Choose a base branch
Loading
fromvallemar:fix-TransitionGroup
Open
Show file tree
Hide file tree
Changes fromall 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
2 changes: 1 addition & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@
"devDependencies": {
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@nativescript/core": "~8.8.6",
"@nativescript/core": "~8.9.1",
"@nativescript/webpack": "~5.0.22",
"esbuild": "^0.25.0",
"lint-staged": "^15.4.3",
Expand Down
9 changes: 5 additions & 4 deletionssrc/components/ActionBar.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
import {
Page as NSCPage,
ActionBar as NSCActionBar,
NavigationButton as NSCNavigationButton,
ActionItem as NSCActionItem,
NavigationButton as NSCNavigationButton,
Page as NSCPage,
} from '@nativescript/core';
import { defineComponent, h, warn } from '@vue/runtime-core';
import { defineComponent, h } from '@vue/runtime-core';
import { NSVElement, NSVViewFlags } from '../dom';
import { registerElement } from '../registry';
import { logger } from '../util/logger';

registerElement('NSCActionBar', () => NSCActionBar, {
viewFlags: NSVViewFlags.SKIP_ADD_TO_DOM,
Expand DownExpand Up@@ -65,7 +66,7 @@ export const ActionBar = /*#__PURE__*/ defineComponent({
parent.nativeView.actionBar = actionBar;
} else {
if (__DEV__) {
warn(
logger.warn(
`<ActionBar> must be a direct child of a <Page> element - ` +
`got <${parent.nativeView.constructor.name}> instead.`,
);
Expand Down
10 changes: 5 additions & 5 deletionssrc/components/ListView.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
import {
Comment,
defineComponent,
getCurrentInstance,
h,
ref,
VNode,
warn,
watch,
ref,
Comment,
} from '@vue/runtime-core';

import {
Expand All@@ -18,6 +17,7 @@ import {
import { NSVElement, NSVViewFlags } from '../dom';
import { registerElement } from '../registry';
import { ELEMENT_REF } from '../runtimeHelpers';
import { logger } from '../util/logger';

registerElement('NSCListView', () => NSCListView, {
viewFlags: NSVViewFlags.NO_CHILDREN,
Expand DownExpand Up@@ -136,9 +136,9 @@ export const ListView = /*#__PURE__*/ defineComponent({
);

if (nonCommentVnodes.length === 0) {
warn(`ListView template must contain at least one element.`);
logger.warn(`ListView template must contain at least one element.`);
} else if (nonCommentVnodes.length > 1) {
warn(
logger.warn(
`ListView template must contain a single root element. Found: ${vnodes.length}. Only the first one will be used.`,
);
}
Expand Down
13 changes: 7 additions & 6 deletionssrc/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,16 +32,17 @@ declare module '@vue/runtime-core' {

init();

export * from './components';
export * from './dom';
export * from './registry';
export * from './renderer';
export * from './components';
export { ELEMENT_REF, createNativeView } from './runtimeHelpers';
export { createNativeView, ELEMENT_REF } from './runtimeHelpers';

export * from '@vue/runtime-core';
export { vShow } from './directives/vShow';
export { $showModal, $closeModal } from './plugins/modals';
export { $navigateTo, $navigateBack } from './plugins/navigation';
export { $closeModal, $showModal } from './plugins/modals';
export { $navigateBack, $navigateTo } from './plugins/navigation';
export * from './renderer/runtimeDomOverrides';

// creates a special root container that calls resetRoot whenever it's children change
function createAppRoot() {
Expand DownExpand Up@@ -97,10 +98,10 @@ export const createApp = ((...args) => {
app.use(modalsPlugin);
app.use(navigationPlugin);

app.config.errorHandler =(err, instance, info) => {
app.config.errorHandler = (err, instance, info) => {
console.error((info ? `Error during execution of ${info}: ` : ``) + err);

if(__DEV__) {
if(__DEV__) {
throw err;
}
};
Expand Down
5 changes: 2 additions & 3 deletionssrc/nativescript/elements.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,10 +5,9 @@ import {
TabViewItem as NSCTabViewItem,
} from '@nativescript/core';

import { warn } from '@vue/runtime-core';

import { NSVElement, NSVViewFlags } from '../dom';
import { registerElement } from '../registry';
import { logger } from '../util/logger';

export function registerCoreElements() {
// layouts
Expand DownExpand Up@@ -91,7 +90,7 @@ export function registerCoreElements() {
});
} else {
if (__DEV__) {
warn(
logger.warn(
`<Frame> must only contain <Page> elements - ` +
`got <${child.nativeView.constructor.name}> instead.`,
);
Expand Down
8 changes: 8 additions & 0 deletionssrc/renderer/runtimeDomOverrides.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
import { logger } from '../util/logger';

export const TransitionGroup = {
new() {
logger.warn('TransitionGroup is not supported');
return { $props: {} };
},
};
9 changes: 9 additions & 0 deletionssrc/util/logger.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
import { warn } from '@vue/runtime-core';

const baseLogger = '[NativeScript-Vue]';

export const logger = {
warn(msg: string) {
warn(`${baseLogger} ${msg}`);
},
};
Loading

[8]ページ先頭

©2009-2025 Movatter.jp