comment-placeholder.js 631 Bytes
export default {
  name: 'CommentPlaceholder',
  props: {
    tag: String,
    destId: Number,
    addType: Number,
    columnType: {
      type: Number,
      default: 1001
    },
    placeholder: String
  },
  methods: {
    openComentInput() {
      this.$yoho.getInput({
        hint: '你好',
        success: (content) => {
          console.log(content)
        },
        fail: (e) => {
          console.log('fail', e)
        }
      });
    }
  },
  render(h) {
    return h(this.tag || 'div', {
      on: {
        click: () => {
          this.openComentInput();
        }
      }
    }, this.$slots.default);
  }
};