1. 程式人生 > 資訊 >微軟 Xbox 公開 7 款 B 社聯動定製手柄:不賣,就是讓你看看

微軟 Xbox 公開 7 款 B 社聯動定製手柄:不賣,就是讓你看看

onComment: function () {
    var _this = this;
    const h = _this.$createElement;
    _this.$msgbox({
        title: '訊息',
        message: h('div', {
            attrs: {
                class: 'el-textarea',
            },
        }, [
            h('textarea', {
                attrs: {
                    class: 'el-textarea__inner',
                    autocomplete: 'off',
                    rows: 4,
                    id:'commentContent'
                },
                value: _this.commentContent,
                on: { input: _this.onCommentInputChange }
            })
        ]),
        showCancelButton: true,
        confirmButtonText: '評論',
        cancelButtonText: '取消',
        beforeClose: (action, instance, done) => {
            if (action === 'confirm') {
                instance.confirmButtonLoading = true;
                instance.confirmButtonText = '評論中...';
                alert(_this.commentContent);
            } else {
                done();
            }
        }
    }).then(action => {
        _this.$message({
            type: 'info',
            message: 'action: ' + action
        });
    });
},
onCommentInputChange() {
    this.commentContent = document.getElementById("commentContent").value;
}