Config plugin finally working.
This commit is contained in:
parent
4bf0d99b44
commit
6e1e458613
4 changed files with 34 additions and 14 deletions
|
@ -4,8 +4,8 @@ use KangarooPunch\KwConfig;
|
|||
use Kirby\Toolkit\A;
|
||||
|
||||
return [
|
||||
'title' => [
|
||||
'label' => 'Title',
|
||||
'name' => [
|
||||
'label' => 'Name',
|
||||
'type' => 'text'
|
||||
],
|
||||
'type' => [
|
||||
|
@ -22,7 +22,7 @@ return [
|
|||
'type' => 'textarea',
|
||||
'buttons' => false
|
||||
],
|
||||
'price' => [
|
||||
'data' => [
|
||||
'label' => 'Value',
|
||||
'type' => 'text'
|
||||
]
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
overflow: hidden;
|
||||
background: var(--color-white);
|
||||
}
|
||||
.k-kwconfig th {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
.k-kwconfig th button {
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
.k-kwconfig-name {
|
||||
/* width: 8rem; */
|
||||
}
|
||||
|
@ -28,8 +36,8 @@
|
|||
font-variant-numeric: tabular-nums;
|
||||
text-align: right !important;
|
||||
}
|
||||
.k-kwconfig th button {
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
.k-kwconfig-options {
|
||||
padding: 0 !important;
|
||||
width: 3rem;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
return _vm.sortBy("description");
|
||||
} } }, [_vm._v(" Description "), _vm.sort === "description" ? _c("span", { domProps: { "innerHTML": _vm._s(_vm.sortArrow) } }) : _vm._e()])]), _c("th", { staticClass: "k-kwconfig-data" }, [_c("button", { on: { "click": function($event) {
|
||||
return _vm.sortBy("data");
|
||||
} } }, [_vm._v(" Value "), _vm.sort === "data" ? _c("span", { domProps: { "innerHTML": _vm._s(_vm.sortArrow) } }) : _vm._e()])])]), _vm._l(_vm.kwconfig, function(kwconfig, name) {
|
||||
return _c("tr", { key: name }, [_c("td", { staticClass: "k-kwconfig-name" }, [_vm._v(_vm._s(kwconfig.name))]), _c("td", { staticClass: "k-kwconfig-type" }, [_vm._v(_vm._s(kwconfig.type))]), _c("td", { staticClass: "k-kwconfig-description" }, [_vm._v(_vm._s(kwconfig.description))]), _c("td", { staticClass: "k-kwconfig-data" }, [_vm._v(_vm._s(kwconfig.data)), _c("k-options-dropdown", { attrs: { "options": "kwconfig/" + name } })], 1)]);
|
||||
} } }, [_vm._v(" Value "), _vm.sort === "data" ? _c("span", { domProps: { "innerHTML": _vm._s(_vm.sortArrow) } }) : _vm._e()])]), _c("th", { staticClass: "k-kwconfig-options" })]), _vm._l(_vm.kwconfig, function(kwconfig, name) {
|
||||
return _c("tr", { key: name }, [_c("td", { staticClass: "k-kwconfig-name" }, [_vm._v(_vm._s(kwconfig.name))]), _c("td", { staticClass: "k-kwconfig-type" }, [_vm._v(_vm._s(kwconfig.type))]), _c("td", { staticClass: "k-kwconfig-description" }, [_vm._v(_vm._s(kwconfig.description))]), _c("td", { staticClass: "k-kwconfig-data" }, [_vm._v(_vm._s(kwconfig.data))]), _c("td", { staticClass: "k-kwconfig-options" }, [_c("k-options-dropdown", { attrs: { "options": "kwconfig/" + name } })], 1)]);
|
||||
})], 2)], 1)], 1);
|
||||
};
|
||||
var staticRenderFns$1 = [];
|
||||
|
|
|
@ -37,12 +37,16 @@
|
|||
<span v-if="sort === 'data'" v-html="sortArrow"/>
|
||||
</button>
|
||||
</th>
|
||||
<th class="k-kwconfig-options"></th>
|
||||
</tr>
|
||||
<tr v-for="(kwconfig, name) in kwconfig" :key="name">
|
||||
<td class="k-kwconfig-name">{{ kwconfig.name }}</td>
|
||||
<td class="k-kwconfig-type">{{ kwconfig.type }}</td>
|
||||
<td class="k-kwconfig-description">{{ kwconfig.description }}</td>
|
||||
<td class="k-kwconfig-data">{{ kwconfig.data }}<k-options-dropdown :options="'kwconfig/' + name" /></td>
|
||||
<td class="k-kwconfig-data">{{ kwconfig.data }}</td>
|
||||
<td class="k-kwconfig-options">
|
||||
<k-options-dropdown :options="'kwconfig/' + name" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</k-view>
|
||||
|
@ -92,6 +96,14 @@ export default {
|
|||
overflow: hidden;
|
||||
background: var(--color-white);
|
||||
}
|
||||
.k-kwconfig th {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
.k-kwconfig th button {
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
.k-kwconfig-name {
|
||||
/* width: 8rem; */
|
||||
}
|
||||
|
@ -106,9 +118,9 @@ export default {
|
|||
font-variant-numeric: tabular-nums;
|
||||
text-align: right !important;
|
||||
}
|
||||
.k-kwconfig th button {
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
.k-kwconfig-options {
|
||||
padding: 0 !important;
|
||||
width: 3rem;
|
||||
overflow: visible !important;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue