mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-03-19 09:05:49 +00:00
Code refactoring (#2739)
* refactor: switching to the use of typed props * refactor: `password-input` -> `a-password-input` * fix: qr modal copy error
This commit is contained in:
@@ -21,7 +21,24 @@
|
||||
{{define "component/setting"}}
|
||||
<script>
|
||||
Vue.component('a-setting-list-item', {
|
||||
props: ["title", "description", "paddings"],
|
||||
props: {
|
||||
'title': {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
'description': {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
'paddings': {
|
||||
type: String,
|
||||
required: false,
|
||||
defaultValue: "default",
|
||||
validator: function (value) {
|
||||
return ['small', 'default'].includes(value)
|
||||
}
|
||||
}
|
||||
},
|
||||
template: `{{ template "component/settingListItem" }}`,
|
||||
computed: {
|
||||
padding() {
|
||||
@@ -29,7 +46,7 @@
|
||||
case "small":
|
||||
return "10px 20px !important"
|
||||
break;
|
||||
default:
|
||||
case "default":
|
||||
return "20px !important"
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user