Skip to content

Showing of JSon Objects using VList #652

Closed Answered by jourdain
QTM3 asked this question in Q&A
Discussion options

You must be logged in to vote

It would be good to read the Vue.js template reference syntax as it is different to template a string for display vs providing a value (bool, number, str, obj) to a property.

The solution for the current question is available here and below for reference.

from trame.app import get_server
from trame.widgets import vtk as tvtk, vuetify
from trame.ui.vuetify import SinglePageWithDrawerLayout

import json

server = get_server(client_type="vue2")
state = server.state
ctrl = server.controller

state.sgnodeList = json.loads(
    """[
    {
        "name": "First",
        "visible": false,
        "selfcolor": "#ff643d",
        "selected": true
    },
    {
        "name": "Second",
        "vi…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by QTM3
Comment options

You must be logged in to vote
1 reply
@jourdain
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants