Use type to specify the control type. Supports checkbox / radio / switch controls, icons and right arrows.
浏览器不支持,请手动复制 basic.en.vue
<scriptsetuplang="tsx">import{ ref }from'vue'import{ NpCell }from'../index'const checkbox =ref(false)const radio =ref(false)const switchVal =ref(false)consticonRender=()=>{return<img src="/logo.png" alt="icon"/>}constvalueRender=()=>{return<span style="color: #18a058">Render Value</span>}</script><template><divstyle="display: flex;flex-direction: column;gap: 8px"><np-cellv-model:checked="checkbox"type="checkbox"label="Checkbox Type"/><np-cellv-model:checked="radio"type="radio"label="Radio Type"/><np-cellv-model:checked="switchVal"type="switch"label="Switch Type":value="switchVal ? 'On' : 'Off'"/><np-celllabel="With Arrow":arrow="true"value="Navigate"/><np-celllabel="With Icon":icon="iconRender"/><np-cellv-model:checked="checkbox"type="checkbox"label="With Footer"value="Description"description="Footer is below the main content and does not affect the left control and content alignment"><template#footer><divstyle="font-size: 12px;color: #8a8a8a">
Footer is below the main content and does not affect the left control
and content alignment
</div></template></np-cell><np-celllabel="Render Function":value="valueRender"/><np-celllabel="Plain Text, No Control"/></div></template>