laravel-vue-admin
laravel-vue-admin copied to clipboard
Rate组件无法使用
使用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>