<commit_before><template>
   <div class="vux-selector weui-cell" :class="{'weui-cell_select':!readonly, 'weui-cell_select-after':title}">
    <div class="weui-cell__hd" v-if="title">
      <label for="" class="weui-label" :style="{width: $parent.labelWidth, textAlign: $parent.labelAlign, marginRight: $parent.labelMarginRight}">{{title}}</label>
    </div>
    <div class="weui-cell__bd" v-if="!readonly">
      <select class="weui-select" v-model="currentValue" :style="{direction: direction}">
        <option value="" v-if="typeof value === 'undefined' && placeholder" :selected="typeof value === 'undefined' && placeholder">{{placeholder}}</option>
        <option disabled v-if="!placeholder && typeof value === 'undefined' && isIOS && title"></option>
        <option :value="one.key" v-for="one in processOptions">{{one.value}}</option>
      </select>
    </div>
    <div class="weui-cell__ft vux-selector-readonly" v-else>
      {{value | findByKey(processOptions)}}
    </div>
  </div>
</template>

<script>
import find from 'array-find'

const findByKey = function (key, options) {
  const _rs = find(options, function (item) {
    return item.key === key
  })
  return _rs ? _rs.value : key
}

export default {
  created () {
    if (typeof value !== 'undefined') {
      this.currentValue = this.value<commit_msg>fix no this bug<commit_after><template>
   <div class="vux-selector weui-cell" :class="{'weui-cell_select':!readonly, 'weui-cell_select-after':title}">
    <div class="weui-cell__hd" v-if="title">
      <label for="" class="weui-label" :style="{width: $parent.labelWidth, textAlign: $parent.labelAlign, marginRight: $parent.labelMarginRight}">{{title}}</label>
    </div>
    <div class="weui-cell__bd" v-if="!readonly">
      <select class="weui-select" v-model="currentValue" :style="{direction: direction}">
        <option value="" v-if="typeof value === 'undefined' && placeholder" :selected="typeof value === 'undefined' && placeholder">{{placeholder}}</option>
        <option disabled v-if="!placeholder && typeof value === 'undefined' && isIOS && title"></option>
        <option :value="one.key" v-for="one in processOptions">{{one.value}}</option>
      </select>
    </div>
    <div class="weui-cell__ft vux-selector-readonly" v-else>
      {{value | findByKey(processOptions)}}
    </div>
  </div>
</template>

<script>
import find from 'array-find'

const findByKey = function (key, options) {
  const _rs = find(options, function (item) {
    return item.key === key
  })
  return _rs ? _rs.value : key
}

export default {
  created () {
    if (typeof this.value !== 'undefined') {
      this.currentValue = this.value
{'fraction_non_alphanumeric': 0.18752348741074784, 'fraction_numerical': 0.0, 'mean_word_length': 4.148936170212766, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '4506594', 'n_tokens_mistral': 860, 'n_tokens_neox': 845, 'n_words': 186}