input & collapse & tags

input & collapse & tags

https://ant.design/components/tag-cn/

740516-20190321203356999-1265217490.png

https://www.iviewui.com/components/tag

740516-20190321203417899-1897223158.png


<template>
    <section>
        <div>
            <!-- <h-tag
                v-for="item in tags"
                :key="item"
                :name="item"
                :closable="false">
                标签{{ item + 1 }}
            </h-tag>
            <h-tag
                v-for="item in tags"
                :key="item"
                :name="item"
                :closable="true">
                标签{{ item + 1 }}
            </h-tag> -->
            <!-- <h-tag
                v-for="(item, index) of tags"
                :key="item"
                :name="item"
                closable
                @on-close="handleCloseTag(index)">
                标签{{ item + 1 }}
            </h-tag> -->
            <h-tag
                v-for="(item, index) of tags"
                :key="item"
                :name="item"
                closable
                @on-close="handleCloseTag">
                标签{{ item + index }}
            </h-tag>
            <!-- <h-tag
                v-for="item in tags"
                :key="item"
                :name="item"
                closable
                @on-close="handleCloseTag">
                标签{{ item + 1 }}
            </h-tag> -->
        </div>
    </section>
</template>

    /**
     *
     * @author xgqfrms
     * @copyright xgqfrms
     *
     * @created 2019.02.27
     * @modified 2019.02.27
     *
     * @description dissociation-maintenance
     * @augments AuditNewsDissociationMaintenance
     * @example
     *
     */
    import {
        TODAY,
        TODAY_Begin,
        TODAY_End,
        TODAY_TimeStamp,
    } from "./utils";
    export default {
        name: "AuditNewsDissociation-maintenance",
        data () {
            return {
                tags: [
                    "标签 a",
                    "标签 b",
                    "标签 c",
                ],
            }
        },
        methods: {
            handleCloseTag (event, name) {
                const index = this.tags.indexOf(name);
                this.tags.splice(index, 1);
            },
            // handleCloseTag (e) {
            //     console.log(`tag =`, e);
            //     console.log(`tag =`, e.target.innerText);
            // },
            // tags
        },
        mounted() {
            this.init();
            // let isGobalBindKS = window.sessionStorage.getItem(`isGobalBindKeyboardShortcuts`);
            // // isGobalBindKS === "true"
            // if (isGobalBindKS) {
            //     // only bind once
            //     console.warn(`dissociation-maintenance, KeyboardShortcuts, only need bind once!`, isGobalBindKS);
            // } else {
            //     // init bind
            //     console.info(`dissociation-maintenance, KeyboardShortcuts, bind once!`, isGobalBindKS);
            //     this.globalBindKeyboardShortcuts();
            //     window.sessionStorage.setItem(`isGobalBindKeyboardShortcuts`, true);
            // }
        },
        activated() {
            // console.log(`keep-alive 组件激活时调用`);
            if (this.isAutoRefreshTable) {
                this.onClickButton(`search`);
            } else {
                // no need!
            }
        },
    }

转载于:https://www.cnblogs.com/xgqfrms/p/10574387.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值