installConflict-TMjGp7_8.js 3.0 KB

1
  1. import{s as l}from"./store-F66kEjW2.js";import{e as $}from"./index-3qA-WN0K.js";import{d as y,K as s,aq as V,e as m,f as r,i as f,u as i,F as C,t as u,j as n,L as a,C as b,am as k,y as D,m as F}from"./vue-A59npLRR.js";import{_ as B}from"./index-EwE51S_X.js";import"./echarts-cxb9vJr1.js";const N={class:"install-conflict"},U={class:"install-title"},E={class:"install-title"},I={key:0},T=y({__name:"installConflict",setup(S){const w=()=>{l.loading.common=!0;let e={},d={};for(const o in l.common.fileConflict)e[l.common.fileConflict[o].oldFile]=l.common.fileConflict[o].solution;for(const o in l.common.dependConflict)typeof d[l.common.dependConflict[o].env]>"u"&&(d[l.common.dependConflict[o].env]={}),d[l.common.dependConflict[o].env][l.common.dependConflict[o].depend]=l.common.dependConflict[o].solution;$(l.common.uid,0,{dependConflict:d,fileConflict:e})};return(e,d)=>{const o=s("el-table-column"),c=s("el-option"),_=s("el-select"),v=s("el-table"),g=s("el-button"),h=V("blur");return m(),r("div",null,[f("div",N,[i(l).common.fileConflict.length>0?(m(),r(C,{key:0},[f("div",U,u(e.$t("module.File conflict")),1),n(v,{data:i(l).common.fileConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[n(o,{prop:"newFile",label:e.$t("module.new file")},null,8,["label"]),n(o,{prop:"oldFile",label:e.$t("module.Existing files")},null,8,["label"]),n(o,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(t=>[n(_,{modelValue:t.row.solution,"onUpdate:modelValue":p=>t.row.solution=p},{default:a(()=>[n(c,{label:e.$t("module.Backup and overwrite existing files"),value:"cover"},null,8,["label"]),n(c,{label:e.$t("module.Discard new file"),value:"discard"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):b("",!0),i(l).common.dependConflict.length>0?(m(),r(C,{key:1},[f("div",E,u(e.$t("module.Dependency conflict")),1),n(v,{data:i(l).common.dependConflict,stripe:"",border:"",style:{width:"100%"}},{default:a(()=>[n(o,{prop:"env",label:e.$t("module.environment")},{default:a(t=>[t.row.env?(m(),r("span",I,u(e.$t("module.env "+t.row.env)),1)):b("",!0)]),_:1},8,["label"]),n(o,{prop:"newDepend",label:e.$t("module.New dependency")},null,8,["label"]),n(o,{prop:"oldDepend",label:e.$t("module.Existing dependencies")},null,8,["label"]),n(o,{prop:"solution",width:"200",label:e.$t("module.Treatment scheme"),align:"center"},{default:a(t=>[n(_,{modelValue:t.row.solution,"onUpdate:modelValue":p=>t.row.solution=p},{default:a(()=>[n(c,{label:e.$t("module.Overwrite existing dependencies"),value:"cover"},null,8,["label"]),n(c,{label:e.$t("module.Do not use new dependencies"),value:"discard"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data"])],64)):b("",!0)]),k((m(),D(g,{class:"install-done-button",loading:i(l).loading.common,disabled:i(l).loading.common,size:"large",type:"primary",onClick:w},{default:a(()=>[F(u(e.$t("Confirm")),1)]),_:1},8,["loading","disabled"])),[[h]])])}}}),L=B(T,[["__scopeId","data-v-91d7b712"]]);export{L as default};