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:
Shishkevich D.
2025-03-08 22:41:27 +07:00
committed by GitHub
parent c6d27a4463
commit 697cd5e6d9
13 changed files with 136 additions and 66 deletions

View File

@@ -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;
}