PHP Classes

File: resources/js/components/IndexField.vue

Recommend this page to a friend!
  Classes of Nyi Nyi Lwin   Laravel Nova Quick View   resources/js/components/IndexField.vue   Download  
File: resources/js/components/IndexField.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel Nova Quick View
Generate the output for Laravel Nova fields
Author: By
Last change:
Date: 1 year ago
Size: 1,262 bytes
 

Contents

Class file image Download
<template> <div> <button @click="drawer = true" class="appearance-none cursor-pointer text-70 hover:text-primary mr-3 drawer-button" style="height: 20px" v-tooltip.click="__(field.tooltip)" > <i :class="field.icon" style="font-size: 20px"></i> </button> <el-drawer :title="field.title" :visible.sync="drawer" :direction="field.direction" :with-header="header" > <div v-html="field.value" /> </el-drawer> </div> </template> <script> export default { props: ['resourceName', 'field'], data() { return { drawer: false, }; }, computed: { header () { return !!this.field.title; } }, methods: { appendButton() { let td = this.$el.parentElement; td.style.padding = "0px"; td.style.minWidth = "0px"; let tr = td.parentElement; let btn = td.querySelector('button.drawer-button') let el = tr.querySelector('div.inline-flex.items-center') el.prepend(btn) } }, mounted() { this.appendButton(); } } </script>