# 普通用法
点击查看代码
<template>
<div>
<ygp-crud :data="data" :option="option"></ygp-crud>
</div>
</template>
export default {
data() {
return {
data: [
{
text1: "内容1-1",
text2: "内容1-2",
text3: "内容1-3",
text4: "内容1-4",
},
{
text1: "内容2-1",
text2: "内容2-2",
text3: "内容2-3",
text4: "内容2-4",
},
],
option: {
columns: [
{
label: "列内容1",
prop: "text1",
},
{
label: "列内容2",
prop: "text2",
},
{
label: "列内容3",
prop: "text3",
},
{
label: "列内容4",
prop: "text4",
show: false,
},
],
},
};
},
};