80 lines
15 KiB
JavaScript
80 lines
15 KiB
JavaScript
|
import{b as p,r as u,o as x,h as V,e as t,d as o,z as c,L as y,f as n,g as a}from"./vendor.e7911ee1.js";const q={class:"markdown-body"},j=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-switch")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("active1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-switch")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(" active1 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
active1
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),C=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-switch")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("active2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@change"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("change"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-switch")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(" active2 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"change"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),a(),n("span",{class:"token parameter"},"val"),a(),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
console`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u5F53\u524D\u503C:"'),a(),n("span",{class:"token operator"},"+"),a(" val"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
active2`),n("span",{class:"token punctuation"},","),a(`
|
||
|
change
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),U=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-switch")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("active3"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":disabled"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("disabled"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-switch")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(" active3 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
|
||
|
`),n("span",{class:"token keyword"},"const"),a(" disabled "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
active3
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),B=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-switch")]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("active4"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"active-text"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u767D\u5929"),n("span",{class:"token punctuation"},'"')]),a(" "),n("span",{class:"token attr-name"},"inactive-text"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u591C\u95F4"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-switch")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
|
||
|
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
|
||
|
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"const"),a(" active4 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},")"),a(`
|
||
|
|
||
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
||
|
active4
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`),n("span",{class:"token punctuation"},"}"),a(`
|
||
|
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
|
||
|
`)])],-1),N=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53EF\u9009\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"name"),n("td",null,"\u539F\u751F name \u5C5E\u6027"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"v-model"),n("td",null,"\u662F\u5426\u542F\u7528"),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")])]),n("tr",null,[n("td",null,"disabled"),n("td",null,"\u7981\u7528"),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")])]),n("tr",null,[n("td",null,"active-text"),n("td",null,"\u542F\u7528\u63CF\u8FF0"),n("td",null,[n("code",null,"\u542F\u52A8")])]),n("tr",null,[n("td",null,"inactive-text"),n("td",null,"\u7981\u7528\u63CF\u8FF0"),n("td",null,[n("code",null,"\u7981\u7528")])])])],-1),z=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53EF\u9009\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"change"),n("td",null,"\u5207\u6362\u4E8B\u4EF6"),n("td",null,"current : \u5F53\u524D\u503C")])])],-1),T={setup(E,{expose:w}){w({frontmatter:{}});let k=p(!1),i=p(!0),_=function(v){console.log("\u5F53\u524D\u503C:"+v)},r=p(!0),b=p(!0),d=p(!0);return(v,e)=>{const l=u("lay-field"),g=u("lay-switch"),m=u("lay-code"),f=u("lay-table-box"),h=u("lay-comment");return x(),V("div",q,[t(l,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[j]),default:o(()=>[t(g,{modelValue:c(k),"onUpdate:modelValue":e[0]||(e[0]=s=>y(k)?k.value=s:k=s)},null,8,["modelValue"])]),_:1}),t(l,{title:"\u4E8B\u4EF6\u56DE\u8C03",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[C]),default:o(()=>[t(g,{modelValue:c(i),"onUpdate:modelValue":e[1]||(e[1]=s=>y(i)?i.value=s:i=s),onChange:c(_)},null,8,["modelValue","onChange"])]),_:1}),t(l,{title:"\u7981\u7528\u72B6\u6001",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[U]),default:o(()=>[t(g,{modelValue:c(r),"onUpdate:modelValue":e[2]||(e[2]=s=>y(r)?r.value=s:r=s),disabled:c(b)},null,8,["modelValue","disabled"])]),_:1}),t(l,{title:"\u4FEE\u6539\u63CF\u8FF0",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[B]),default:o(()=>[t(g,{modelValue:c(d),"onUpdate:modelValue":e[3]||(e[3]=s=>y(d)?d.value=s:d=s),"active-text":"\u767D\u5929","inactive-text":"\u591C\u95F4"},null,8,["modelValue"])]),_:1}),t(l,{title:"\u5F00\u5173\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(f,null,{default:o(()=>[N]),_:1}),t(l,{title:"\u5F00\u5173\u4E8B\u4EF6",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(f,null,{default:o(()=>[z]),_:1}),t(h)])}}};export{T as default};
|