laravel-vue-admin icon indicating copy to clipboard operation
laravel-vue-admin copied to clipboard

Rate组件无法使用

Open jacky1988li opened this issue 5 years ago • 0 comments

使用rate 组件时,渲染出来是 <rate value="4" attrs="[object Object]" form_data="[object Object]"></rate> 在 vendor\smallruraldog\laravel-vue-admin\resources\js\components\widgets\Grid 目录下添加了 Rate.vue 也执行了 更新静态资源命令,清理视图缓存 ,结果一样,Rate.vue 代码如下

<template>
  <el-rate
    :value="value"
    :style="attrs.style"
    :class="attrs.className"
    :max="attrs.max"
    :disabled="attrs.disabled"
    :allow-half="attrs.allowHalf"
    :low-threshold="attrs.lowThreshold"
    :high-threshold="attrs.highThreshold"
    :colors="attrs.colors"
    :void-color="attrs.voidColor"
    :disabled-void-color="attrs.disabledVoidColor"
    :icon-classes="attrs.iconClasses"
    :void-icon-class="attrs.voidIconClass"
    :disabled-void-icon-class="attrs.disabledVoidIconClass"
    :show-text="attrs.showText"
    :show-score="attrs.showScore"
    :text-color="attrs.textColor"
    :texts="attrs.texts"
    @change="onChange">
  </el-rate>
</template>
<script>
export default {
  props: {
    attrs: Object,
    value: {
      default: true
    }
  },
  data() {
    return {options: this.attrs.options};
  },
  model: {
    prop: "value",
    event: "change"
  },
  methods: {
    onChange(value) {
      this.$emit("change", value);
    }
  }
};
</script>

jacky1988li avatar Jul 15 '20 08:07 jacky1988li