12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- "use strict";
- const common_vendor = require("../../../common/vendor.js");
- const block0 = {};
- const _sfc_main = {
- props: {
- pro: {
- type: Number,
- default: 0
- },
- //起始位置 0-1
- start: {
- type: Number,
- default: 0
- },
- //圆形大小
- size: {
- type: Number,
- default: 100
- },
- //线宽度
- border_width: {
- type: Number,
- default: 10
- },
- //线颜色
- border_color: {
- type: String,
- default: "#07C160"
- },
- //线背景色
- border_back_color: {
- type: String
- },
- //中心内容背景色
- background: {
- type: String
- },
- //单位
- unit: {
- type: String,
- default: "rpx"
- },
- // 内容
- content: {
- type: String,
- default: "0"
- },
- //是否启用动画
- animate: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- cpro: 0
- };
- },
- watch: {
- pro(val) {
- this.cpro = val;
- }
- },
- mounted() {
- this.cpro = this.pro;
- },
- methods: {
- sunit(num) {
- if (typeof num === "number") {
- return num + this.unit;
- }
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return common_vendor.e({
- a: $data.cpro,
- b: $props.animate,
- c: `rotate(${$props.start * 360 + 45}deg)`,
- d: `${$options.sunit($props.border_width)} solid ${$props.border_color}`,
- e: $props.background
- }, $props.background ? {
- f: $props.background
- } : {}, {
- g: $props.border_back_color
- }, $props.border_back_color ? {
- h: `calc(${$options.sunit($props.border_width)} - 1px) solid ${$props.border_back_color}`
- } : {}, {
- i: common_vendor.t($props.content),
- j: $options.sunit($props.size),
- k: $options.sunit($props.size)
- });
- }
- if (typeof block0 === "function")
- block0(_sfc_main);
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2577f78a"], ["__file", "D:/project/足球比赛/match_applet/pagesHome/team/components/circle.vue"]]);
- wx.createComponent(Component);
|