forked from PanJiaChen/vue-element-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature[Excel]: support bookType option (PanJiaChen#1144)
- Loading branch information
1 parent
dc84e7b
commit ff13ee1
Showing
7 changed files
with
122 additions
and
190 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div style="display:inline-block;"> | ||
<label class="radio-label">Cell Auto-Width: </label> | ||
<el-radio-group v-model="autoWidth"> | ||
<el-radio :label="true" border>True</el-radio> | ||
<el-radio :label="false" border>False</el-radio> | ||
</el-radio-group> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
value: { | ||
type: Boolean, | ||
default: true | ||
} | ||
}, | ||
computed: { | ||
autoWidth: { | ||
get() { | ||
return this.value | ||
}, | ||
set(val) { | ||
this.$emit('input', val) | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div style="display:inline-block;"> | ||
<label class="radio-label">Book Type: </label> | ||
<el-select v-model="bookType" style="width:120px;" > | ||
<el-option | ||
v-for="item in options" | ||
:key="item" | ||
:label="item" | ||
:value="item"/> | ||
</el-select> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
value: { | ||
type: String, | ||
default: 'xlsx' | ||
} | ||
}, | ||
data() { | ||
return { | ||
options: ['xlsx', 'csv', 'txt'] | ||
} | ||
}, | ||
computed: { | ||
bookType: { | ||
get() { | ||
return this.value | ||
}, | ||
set(val) { | ||
this.$emit('input', val) | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div style="display:inline-block;"> | ||
<!-- $t is vue-i18n global function to translate lang --> | ||
<label class="radio-label" style="padding-left:0;">Filename: </label> | ||
<el-input :placeholder="$t('excel.placeholder')" v-model="filename" style="width:340px;" prefix-icon="el-icon-document"/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: { | ||
value: { | ||
type: String, | ||
default: '' | ||
} | ||
}, | ||
computed: { | ||
filename: { | ||
get() { | ||
return this.value | ||
}, | ||
set(val) { | ||
this.$emit('input', val) | ||
} | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters