在SVG标签之外添加SVG Defs

时间:2019-07-04 15:44:26

标签: css svg

是否可以在SVG标签之外使用SVG Defs。像这样:

new Vue({
    el: "#app",
    data: {
        output: null,
        items: [
            {
                id: 1,
                name: "Tony"
            },
            {
                id: 2,
                name: "John"
            },
            {
                id: 3,
                name: "Paul"
            }
        ],
        fields: [
            {
                key: "id",
                label: "ID",
                sortable: true
            },
            { key: "name" },
            { key: "actions" }
        ]
    },
    methods: {
        update(data) {
            // I need to disable the button here
            this.output = data;
            data.item.name = "Dave";
        }
    }
});

如果是这样-我如何将<defs> // defs code goes here </defs> <svg> // svg code goes here </svg> 标签与要定位的特定defs标签相关联?

0 个答案:

没有答案