diff options
| author | MHSanaei <mc.sanaei@gmail.com> | 2023-02-09 22:18:06 +0300 |
|---|---|---|
| committer | MHSanaei <mc.sanaei@gmail.com> | 2023-02-09 22:18:06 +0300 |
| commit | b73e4173a3c1e69e02ad6b4e3b43e425e57a5be9 (patch) | |
| tree | d95d2f5e903d97082e11eb9f9023c165b1bde388 /web/html/xui/component/setting.html | |
3x-ui
Diffstat (limited to 'web/html/xui/component/setting.html')
| -rw-r--r-- | web/html/xui/component/setting.html | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/web/html/xui/component/setting.html b/web/html/xui/component/setting.html new file mode 100644 index 00000000..9f8e8cbc --- /dev/null +++ b/web/html/xui/component/setting.html @@ -0,0 +1,32 @@ +{{define "component/settingListItem"}} +<a-list-item style="padding: 20px"> + <a-row> + <a-col :lg="24" :xl="12"> + <a-list-item-meta :title="title" :description="desc"/> + </a-col> + <a-col :lg="24" :xl="12"> + <template v-if="type === 'text'"> + <a-input :value="value" @input="$emit('input', $event.target.value)"></a-input> + </template> + <template v-else-if="type === 'number'"> + <a-input type="number" :value="value" @input="$emit('input', $event.target.value)"></a-input> + </template> + <template v-else-if="type === 'textarea'"> + <a-textarea :value="value" @input="$emit('input', $event.target.value)" :auto-size="{ minRows: 10, maxRows: 10 }"></a-textarea> + </template> + <template v-else-if="type === 'switch'"> + <a-switch :checked="value" @change="value => $emit('input', value)"></a-switch> + </template> + </a-col> + </a-row> +</a-list-item> +{{end}} + +{{define "component/setting"}} +<script> + Vue.component('setting-list-item', { + props: ["type", "title", "desc", "value"], + template: `{{template "component/settingListItem"}}`, + }); +</script> +{{end}}
\ No newline at end of file |
