5b64cad09c
修复table 布局问题 column 新增minWidth和ellipsisTooltip属性 ISSUES CLOSED: https://gitee.com/layui/layui-vue/issues/I58DWF
75 lines
14 KiB
JavaScript
75 lines
14 KiB
JavaScript
import{b as d,r as e,o as w,h as x,e as t,d as s,z as r,L as y,f as n,g as a}from"./vendor.e7911ee1.js";const h={class:"markdown-body"},V=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-input")]),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("data1"),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-input")]),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(" data1 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"\u5185\u5BB9"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
|
|
|
|
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
|
data1
|
|
`),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),q=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-input")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u63D0\u793A\u4FE1\u606F"),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-input")]),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"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
|
|
`),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),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-input")]),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("data2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@input"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("input"),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-input")]),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(" data2 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Input \u4E8B\u4EF6"'),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"},"input"),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(`
|
|
data2`),n("span",{class:"token punctuation"},","),a(`
|
|
input
|
|
`),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),I=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-input")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7981\u6B62\u8F93\u5165"),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-input")]),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(" 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(`
|
|
disabled
|
|
`),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("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\u59CB\u5C5E\u6027 name"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"placeholder"),n("td",null,"\u63D0\u793A\u4FE1\u606F"),n("td",null,"\u2013")]),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,"v-model"),n("td",null,"\u503C"),n("td",null,"\u2013")])])],-1),N=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u4E8B\u4EF6"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53C2\u6570")])]),n("tbody",null,[n("tr",null,[n("td",null,"input"),n("td",null,"\u539F\u751F input \u4E8B\u4EF6"),n("td",null,"event : \u4E8B\u4EF6\u5BF9\u8C61")]),n("tr",null,[n("td",null,"foucs"),n("td",null,"\u539F\u751F foucs \u4E8B\u4EF6"),n("td",null,"event : \u4E8B\u4EF6\u5BF9\u8C61")]),n("tr",null,[n("td",null,"blur"),n("td",null,"\u539F\u751F blur \u4E8B\u4EF6"),n("td",null,"\u2013")])])],-1),E={setup(C,{expose:f}){f({frontmatter:{}});let p=d("\u5185\u5BB9"),c=d("Input \u4E8B\u4EF6"),_=function(g){console.log("\u5F53\u524D\u503C:"+g)},v=d(!0);return(g,u)=>{const o=e("lay-field"),k=e("lay-input"),i=e("lay-code"),m=e("lay-table-box"),b=e("lay-comment");return w(),x("div",h,[t(o,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(i,null,{code:s(()=>[V]),default:s(()=>[t(k,{modelValue:r(p),"onUpdate:modelValue":u[0]||(u[0]=l=>y(p)?p.value=l:p=l)},null,8,["modelValue"])]),_:1}),t(o,{title:"\u63D0\u793A\u4FE1\u606F",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(i,null,{code:s(()=>[q]),default:s(()=>[t(k,{placeholder:"\u63D0\u793A\u4FE1\u606F"})]),_:1}),t(o,{title:"\u4E8B\u4EF6\u56DE\u8C03",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(i,null,{code:s(()=>[j]),default:s(()=>[t(k,{modelValue:r(c),"onUpdate:modelValue":u[1]||(u[1]=l=>y(c)?c.value=l:c=l),onInput:r(_)},null,8,["modelValue","onInput"])]),_:1}),t(o,{title:"\u7981\u6B62\u8F93\u5165",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(i,null,{code:s(()=>[I]),default:s(()=>[t(k,{placeholder:"\u7981\u6B62\u8F93\u5165",disabled:r(v)},null,8,["disabled"])]),_:1}),t(o,{title:"\u8F93\u5165\u6846\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{default:s(()=>[B]),_:1}),t(o,{title:"\u8F93\u5165\u6846\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{default:s(()=>[N]),_:1}),t(b)])}}};export{E as default};
|