plugin/dt-ui/raty.vue.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
Vue.component('sky-raty', {
props: {
len: 0,
grade: 0,
label: "",
fields: "",
mod: 0,
readonly: 0,
groupclass: ""
},
data: function() {
return {
num: 0,
items: [],
gradeItems: [],
half: false,
gclass: "mgb-10"
}
},
created: function() {
if (this.groupclass != undefined) {
this.gclass = this.groupclass;
}
var items = [];
var len = this.len;
if (len == 0) {
len = 5;
}
for (var i = 0; i < len; i++) {
items.push(i);
}
this.items = items;
var mod = 1;
if (this.mod != undefined) {
mod = this.mod;
}
if (this.grade % mod != 0) {
console.log("mod")
this.half = true;
}
var num = parseInt(this.grade / mod);
var gradeItems = [];
for (var i = 0; i < num; i++) {
gradeItems.push(i);
}
this.num = this.grade;
this.gradeItems = gradeItems;
},
watch:{
num:function(n,o){
this.$emit("call-parent",n);
}
},
methods: {
setRaty: function(index) {
if (this.readonly) {
return false;
}
后面还有 16 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。