1 line
1.9 KiB
JavaScript
1 line
1.9 KiB
JavaScript
"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[4948],{7788:function(e,l,t){t.r(l),t.d(l,{default:function(){return u}});var r=t(641),o=t(2644);function s(e,l,t,s,i,n){const a=(0,r.g2)("el-alert"),d=(0,r.g2)("sc-icon-select"),u=(0,r.g2)("el-form-item"),c=(0,r.g2)("el-button"),m=(0,r.g2)("el-form"),b=(0,r.g2)("el-card"),f=(0,r.g2)("el-main");return(0,r.uX)(),(0,r.Wv)(f,null,{default:(0,r.k6)((()=>[(0,r.bF)(a,{title:"支持扩展的图标选择器,除了默认的图标组还可以在 @/config/iconSelect 中定义更多的图标组",type:"success",style:{"margin-bottom":"20px"}}),(0,r.bF)(b,{shadow:"never"},{default:(0,r.k6)((()=>[(0,r.bF)(m,{ref:"ruleForm",model:i.form,rules:i.rules,"label-width":"100px"},{default:(0,r.k6)((()=>[(0,r.bF)(u,{label:"图标",prop:"icon"},{default:(0,r.k6)((()=>[(0,r.bF)(d,{modelValue:i.form.icon,"onUpdate:modelValue":l[0]||(l[0]=e=>i.form.icon=e),disabled:i.disabled},null,8,["modelValue","disabled"])])),_:1}),(0,r.bF)(u,null,{default:(0,r.k6)((()=>[(0,r.bF)(c,{type:"primary",onClick:n.submitForm},{default:(0,r.k6)((()=>[(0,r.eW)("保存")])),_:1},8,["onClick"]),(0,r.bF)(c,{onClick:n.resetForm},{default:(0,r.k6)((()=>[(0,r.eW)("重置")])),_:1},8,["onClick"]),(0,r.bF)(c,{onClick:n.setdisabled},{default:(0,r.k6)((()=>[(0,r.eW)((0,o.v_)(i.disabled?"移除禁用":"设为禁用"),1)])),_:1},8,["onClick"])])),_:1})])),_:1},8,["model","rules"])])),_:1})])),_:1})}var i=t(7978),n={name:"iconSelect",components:{scIconSelect:i.A},data(){return{form:{icon:"el-icon-apple"},rules:{icon:[{required:!0,message:"请选择图标",trigger:"change"}]},disabled:!1}},methods:{submitForm(){this.$refs.ruleForm.validate((e=>{if(!e)return!1;alert("请看控制台输出"),console.log(this.form)}))},resetForm(){this.$refs.ruleForm.resetFields()},setdisabled(){this.disabled=!this.disabled}}},a=t(6262);const d=(0,a.A)(n,[["render",s]]);var u=d}}]); |