iview在列表中使用进度条

iview中的列表使用进度条,需要使用render函数:

 代码:

        {
          title: "进度",
          key: "progress",
          align: "left",
          minWidth: 100,
          render: (h, params) => {
            return h(
              "Progress",
              {
                props: {
                  type: "Progress",
                  size: "small",
                  percent: parseFloat(
                    params.row.progress == null ? 0 : params.row.progress
                  ),
                },
              },
              params.row.progress == null ? "0%" : params.row.progress + "%"
            );
          },
        },

 

posted @ 2020-09-10 16:18  丙炎  阅读(2339)  评论(0)    收藏  举报