Open u007 opened 1 year ago
For vue3 you need register component in your main.ts
or app.ts
:
import {createApp, registerElement} from 'nativescript-vue';
registerElement('MDTextField', () => require("@nativescript-community/ui-material-textfield").TextField, {
model: {
prop: 'text',
event: 'textChange'
}
})
hey bro, thank you, let me try 😄
just realised i tried this long ago and didnt work, got this:
[$navigateTo] Failed to navigate:
{} TypeError: Cannot set property android of [object Object] which has only a getter
at setValue (file: src/webpack:/movingapp/node_modules/set-value/index.js:154:0)
at NSVElement.setAttribute (file: src/webpack:/movingapp/node_modules/nativescript-vue/dist/dom/index.js:120:16)
at patchAttr (file: src/webpack:/movingapp/node_modules/nativescript-vue/dist/renderer/modules/attrs.js:28:0)
at patchProp (file: src/webpack:/movingapp/node_modules/nativescript-vue/dist/renderer/patchProp.js:26:25)
at mountElement (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5204:0)
at processElement (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5178:0)
at patch (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5098:0)
at mountChildren (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5285:0)
at mountElement (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5195:0)
at processElement (file: src/webpack:/movingapp/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js:5178:0)
[Vue warn]: Unhandled error during execution of component event handler
at <Button1 onTap=fn width="100%" horizontalAlignment="center" ... >
at <BottomBar dock="bottom" class="" >
at <Home>
Make sure to check the demo app(s) for sample usage
generic starter template with material text field
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital letter.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
tns --version
to fetch it): 8.4.0node_modules/@nativescript/core/package.json
file in your project): "version": "8.4.3","tns-android"
and"tns-ios"
properties in thepackage.json
file of your project)inside the page component```