<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示可选项目</title>
    <script type="text/javascript" src="{{ url_for("static",filename="vue.js") }}"></script>
</head>

<body>

    <div id="rootid">

{#        {% for k,v in data.items() %}#}
{#            <h1>项目名：{{ k }}（{{ v|length }}）</h1>#}
{#            <input value="{{ k }}" name="{{ k }}" hidden="hidden" />#}
{##}
{#            {% for ii in v %}#}
{#                <input type="checkbox" name="{{ k }}"  value="{{ ii }}" />{{ ii }}#}
{#                <br/>#}
{#            {% endfor %}#}
{#            <button type="submit" v-on:click="handleClick">提交</button>#}
{#        {% endfor %}#}

        <input v-for="(index,k) in valuess" :key="k"></input>
        <button @click="handleClick">1</button>



    </div>

{#    <form action="/scence" method="post" >#}
{#        {% for k,v in data.items() %}#}
{#            <h1>项目名：{{ k }}（{{ v|length }}）</h1>#}
{#            <input value="{{ k }}" name="{{ k }}" hidden="hidden" />#}
{##}
{#            {% for ii in v %}#}
{#                <input type="checkbox" name="{{ k }}"  value="{{ ii }}" />{{ ii }}#}
{#                <br/>#}
{#            {% endfor %}#}
{#        {% endfor %}#}
{#    <br/>#}
{#        <button type="submit">提交</button>#}
{#    </form>#}



    <script type="text/javascript">
        let i = {{ data|safe }}
        alert(i)
		new Vue(
            {
                el:"#rootid",
                delimiters:['{[', ']}'],
                data:{
                    listvalue:[],
                    valuess:""
                },
                methods:{
                    handleClick:function () {
                        alert(this.valuess)
                        {#this.listvalue.push(this.valuess)#}

                    }
                }
            }
        )
	</script>



</body>
</html>