<commit_before><template>
  <div class="weui_dialog_alert" v-show="show" :transition="maskTransition">
    <div class="weui_mask"></div>
    <div class="weui_dialog" v-show="show" :transition="dialogTransition">
      <div class="weui_dialog_hd"><strong class="weui_dialog_title">{{title}}</strong></div>
      <div class="weui_dialog_bd"><slot></slot></div>
      <div class="weui_dialog_ft">
        <a href="javascript:;" class="weui_btn_dialog primary" @click="onHide">{{buttonText}}</a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false,
      twoWay: true
    },
    title: {
      type: String,
      required: true
    },
    buttonText: {
      type: String,
      default: 'OK'
    },
    maskTransition: {
      type: String,
      default: 'vux-fade'
    },
    dialogTransition: {
      type: String,
      default: 'vux-dialog'
    }
  },
  methods: {
    onHide: function () {
      this.show = false
      this.$dispatch('on-hide')
    }
  },
  watch: {
    show: function (val) {
      if (val) {
        this.$dispatch('on-show')
      }
    }
  }
}
</script>
<commit_msg>Alert: User $emit instead of $dispatch<commit_after><template>
  <div class="weui_dialog_alert" v-show="show" :transition="maskTransition">
    <div class="weui_mask"></div>
    <div class="weui_dialog" v-show="show" :transition="dialogTransition">
      <div class="weui_dialog_hd"><strong class="weui_dialog_title">{{title}}</strong></div>
      <div class="weui_dialog_bd"><slot></slot></div>
      <div class="weui_dialog_ft">
        <a href="javascript:;" class="weui_btn_dialog primary" @click="onHide">{{buttonText}}</a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    show: {
      type: Boolean,
      default: false,
      twoWay: true
    },
    title: {
      type: String,
      required: true
    },
    buttonText: {
      type: String,
      default: 'OK'
    },
    maskTransition: {
      type: String,
      default: 'vux-fade'
    },
    dialogTransition: {
      type: String,
      default: 'vux-dialog'
    }
  },
  methods: {
    onHide: function () {
      this.show = false
      this.$emit('on-hide')
    }
  },
  watch: {
    show: function (val) {
      if (val) {
        this.$emit('on-show')
      }
    }
  }
}
</script>

{'fraction_non_alphanumeric': 0.17165752846900043, 'fraction_numerical': 0.0, 'mean_word_length': 2.5297619047619047, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1660897', 'n_tokens_mistral': 817, 'n_tokens_neox': 808, 'n_words': 149}