Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@soramitsu/soramitsu-js-ui",
"version": "0.9.17",
"version": "0.9.18",
"private": false,
"publishConfig": {
"registry": "https://nexus.iroha.tech/repository/npm-soramitsu/"
Expand Down
12 changes: 12 additions & 0 deletions src/components/Button/SButtonGroup/SButtonGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@
<slot></slot>
</el-button-group>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import ElButtonGroup from 'element-ui/lib/button-group'

@Component({
components: {
ElButtonGroup
}
})
export default class SButtonGroup extends Vue {}
</script>
18 changes: 16 additions & 2 deletions src/components/Input/SInput/SInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,17 @@
<slot slot="append" name="append"></slot>
</el-input>
<template v-if="type === InputType.TEXT_FILE">
<s-icon name="file-file-upload-24" />
<input :value="emptyValue" type="file" :accept="accept" @change="handleTextFileChange">
<s-icon
name="file-file-upload-24"
@click.native="handleFileIconClick"
/>
<input
ref="file"
:value="emptyValue"
type="file"
:accept="accept"
@change="handleTextFileChange"
>
</template>
</div>
<slot name="right" />
Expand Down Expand Up @@ -158,6 +167,7 @@ export default class SInput extends Mixins(BorderRadiusMixin, DesignSystemInject
@Prop({ default: InputSize.BIG, type: String }) readonly size!: InputSize

@Ref('el-input') input!: ElInput
@Ref('file') file!: HTMLElement

@Inject({ default: '', from: 'elForm' }) elForm!: ElForm

Expand Down Expand Up @@ -283,6 +293,10 @@ export default class SInput extends Mixins(BorderRadiusMixin, DesignSystemInject
fr.readAsText(file)
}

handleFileIconClick () {
this.file.click()
}

public focus (): void {
this.input.focus()
}
Expand Down