Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate组件无法使用 #46

Open
jacky1988li opened this issue Jul 15, 2020 · 0 comments
Open

Rate组件无法使用 #46

jacky1988li opened this issue Jul 15, 2020 · 0 comments

Comments

@jacky1988li
Copy link

使用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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant