chore(client): tweak MkKeyValue component

This commit is contained in:
syuilo 2022-06-25 11:50:19 +09:00
parent 3d57188c81
commit a892657b28

View file

@ -10,46 +10,27 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; import { } from 'vue';
import copyToClipboard from '@/scripts/copy-to-clipboard'; import copyToClipboard from '@/scripts/copy-to-clipboard';
import * as os from '@/os'; import * as os from '@/os';
export default defineComponent({ const props = withDefaults(defineProps<{
props: { copy: string | null;
copy: { oneline: boolean;
type: String, }>(), {
required: false, copy: null,
default: null, oneline: false,
}, });
oneline: {
type: Boolean,
required: false,
default: false,
},
},
setup(props) { const copy_ = () => {
const copy_ = () => {
copyToClipboard(props.copy); copyToClipboard(props.copy);
os.success(); os.success();
}; };
return {
copy_
};
},
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.alqyeyti { .alqyeyti {
> .key, > .value {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
> .key { > .key {
font-size: 0.85em; font-size: 0.85em;
padding: 0 0 0.25em 0; padding: 0 0 0.25em 0;
@ -67,6 +48,9 @@ export default defineComponent({
> .value { > .value {
width: 70%; width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
} }
} }