diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-25 11:50:19 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-25 11:50:19 +0900 |
| commit | 16fda8973805ae3f644a9e7a16279a531aa20da6 (patch) | |
| tree | 0487b42c4f827c808d2296ee7288684c721988fc /packages/client/src | |
| parent | 12.112.0-beta.3 (diff) | |
| download | misskey-16fda8973805ae3f644a9e7a16279a531aa20da6.tar.gz misskey-16fda8973805ae3f644a9e7a16279a531aa20da6.tar.bz2 misskey-16fda8973805ae3f644a9e7a16279a531aa20da6.zip | |
chore(client): tweak MkKeyValue component
Diffstat (limited to 'packages/client/src')
| -rw-r--r-- | packages/client/src/components/key-value.vue | 48 |
1 files changed, 16 insertions, 32 deletions
diff --git a/packages/client/src/components/key-value.vue b/packages/client/src/components/key-value.vue index da98abd77c..592c7be593 100644 --- a/packages/client/src/components/key-value.vue +++ b/packages/client/src/components/key-value.vue @@ -10,46 +10,27 @@ </div> </template> -<script lang="ts"> -import { defineComponent } from 'vue'; +<script lang="ts" setup> +import { } from 'vue'; import copyToClipboard from '@/scripts/copy-to-clipboard'; import * as os from '@/os'; -export default defineComponent({ - props: { - copy: { - type: String, - required: false, - default: null, - }, - oneline: { - type: Boolean, - required: false, - default: false, - }, - }, - - setup(props) { - const copy_ = () => { - copyToClipboard(props.copy); - os.success(); - }; - - return { - copy_ - }; - }, +const props = withDefaults(defineProps<{ + copy: string | null; + oneline: boolean; +}>(), { + copy: null, + oneline: false, }); + +const copy_ = () => { + copyToClipboard(props.copy); + os.success(); +}; </script> <style lang="scss" scoped> .alqyeyti { - > .key, > .value { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - > .key { font-size: 0.85em; padding: 0 0 0.25em 0; @@ -67,6 +48,9 @@ export default defineComponent({ > .value { width: 70%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } } |