add iconfont

qianlishi 3 years ago
parent c36dbb8ba0
commit 5ebc5f48ce

@ -54,6 +54,18 @@
<div class="content unicode" style="display: block;"> <div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe621;</span>
<div class="name">堆叠图</div>
<div class="code-name">&amp;#xe621;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe61f;</span>
<div class="name">堆叠图</div>
<div class="code-name">&amp;#xe61f;</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe645;</span> <span class="icon iconfont">&#xe645;</span>
<div class="name">文件</div> <div class="name">文件</div>
@ -750,9 +762,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1628064452460') format('woff2'), src: url('iconfont.woff2?t=1629425895962') format('woff2'),
url('iconfont.woff?t=1628064452460') format('woff'), url('iconfont.woff?t=1629425895962') format('woff'),
url('iconfont.ttf?t=1628064452460') format('truetype'); url('iconfont.ttf?t=1629425895962') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -778,6 +790,24 @@
<div class="content font-class"> <div class="content font-class">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont iconbianzu23"></span>
<div class="name">
堆叠图
</div>
<div class="code-name">.iconbianzu23
</div>
</li>
<li class="dib">
<span class="icon iconfont iconduidietu"></span>
<div class="name">
堆叠图
</div>
<div class="code-name">.iconduidietu
</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont iconfill_folder"></span> <span class="icon iconfont iconfill_folder"></span>
<div class="name"> <div class="name">
@ -1822,6 +1852,22 @@
<div class="content symbol"> <div class="content symbol">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconbianzu23"></use>
</svg>
<div class="name">堆叠图</div>
<div class="code-name">#iconbianzu23</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconduidietu"></use>
</svg>
<div class="name">堆叠图</div>
<div class="code-name">#iconduidietu</div>
</li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#iconfill_folder"></use> <use xlink:href="#iconfill_folder"></use>

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 1513211 */ font-family: "iconfont"; /* Project id 1513211 */
src: url('iconfont.woff2?t=1628064452460') format('woff2'), src: url('iconfont.woff2?t=1629425895962') format('woff2'),
url('iconfont.woff?t=1628064452460') format('woff'), url('iconfont.woff?t=1629425895962') format('woff'),
url('iconfont.ttf?t=1628064452460') format('truetype'); url('iconfont.ttf?t=1629425895962') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.iconbianzu23:before {
content: "\e621";
}
.iconduidietu:before {
content: "\e61f";
}
.iconfill_folder:before { .iconfill_folder:before {
content: "\e645"; content: "\e645";
} }

File diff suppressed because one or more lines are too long

@ -5,6 +5,20 @@
"css_prefix_text": "icon", "css_prefix_text": "icon",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "18888301",
"name": "堆叠图",
"font_class": "bianzu23",
"unicode": "e621",
"unicode_decimal": 58913
},
{
"icon_id": "23457042",
"name": "堆叠图",
"font_class": "duidietu",
"unicode": "e61f",
"unicode_decimal": 58911
},
{ {
"icon_id": "5472881", "icon_id": "5472881",
"name": "文件", "name": "文件",

@ -1,8 +1,22 @@
<template> <template>
<anji-crud ref="listPage" :option="crudOption"> <anji-crud ref="listPage" :option="crudOption">
<template v-slot:buttonLeftOnTable> <template v-slot:buttonLeftOnTable>
<el-upload class="el-upload" :action="uploadUrl" :headers="headers" :on-success="handleUpload" :on-error="handleUpload" :show-file-list="false" :limit="1"> <el-upload
<el-button type="primary" icon="el-icon" v-permission="'fileManage:upload'"></el-button> ref="upload"
class="el-upload"
:action="uploadUrl"
:headers="headers"
:on-success="handleUpload"
:on-error="handleUpload"
:show-file-list="false"
:limit="1"
>
<el-button
type="primary"
icon="el-icon"
v-permission="'fileManage:upload'"
>文件上传</el-button
>
</el-upload> </el-upload>
</template> </template>
@ -12,173 +26,203 @@
</anji-crud> </anji-crud>
</template> </template>
<script> <script>
import { fileList, fileAdd, fileDel, fileUpdate, fileDetail } from '@/api/file' import { fileList, fileAdd, fileDel, fileUpdate, fileDetail } from "@/api/file";
import { getToken } from '@/utils/auth' import { getToken } from "@/utils/auth";
export default { export default {
name: 'File', name: "File",
components: { components: {
anjiCrud: require('@/components/AnjiPlus/anji-crud/anji-crud').default, anjiCrud: require("@/components/AnjiPlus/anji-crud/anji-crud").default
}, },
data() { data() {
return { return {
selectedList: [], selectedList: [],
uploadUrl: process.env.BASE_API + '/file/upload', uploadUrl: process.env.BASE_API + "/file/upload",
crudOption: { crudOption: {
// 使 // 使
title: '文件管理', title: "文件管理",
// //
labelWidth: '120px', labelWidth: "120px",
// //
queryFormFields: [ queryFormFields: [
{ {
inputType: 'input', inputType: "input",
label: '文件路径', label: "文件路径",
field: 'filePath', field: "filePath"
}, }
], ],
// //
buttons: { buttons: {
query: { query: {
api: fileList, api: fileList,
permission: 'fileManage:query', permission: "fileManage:query",
sort: 'create_time', sort: "create_time",
order: 'DESC', order: "DESC"
}, },
queryByPrimarykey: { queryByPrimarykey: {
api: fileDetail, api: fileDetail,
permission: 'fileManage:query', permission: "fileManage:query"
}, },
add: { add: {
api: fileAdd, api: fileAdd,
permission: 'fileManage:upload', permission: "fileManage:upload",
isShow: false, isShow: false
}, },
delete: { delete: {
api: fileDel, api: fileDel,
permission: 'fileManage:delete', permission: "fileManage:delete"
}, },
edit: { edit: {
api: fileUpdate, api: fileUpdate,
permission: 'fileManage:update', permission: "fileManage:update",
isShow: false, isShow: false
}, },
// //
customButton: { customButton: {
operationWidth: 100, // row operationWidth: 100 // row
}, }
}, },
// //
columns: [ columns: [
{ {
label: '', label: "",
field: 'id', field: "id",
primaryKey: true, // , primaryKey: true, // ,
tableHide: true, // tableHide: true, //
editHide: true, // editHide: true //
}, },
{ {
// //
label: '图片缩略图', // label: "图片缩略图", //
field: 'urlPath', // field: "urlPath", //
columnType: 'imgPreview', // text columnType: "imgPreview", // text
editHide: true, // editHide: true, //
// //
// inputType: 'input', // input anji-select // inputType: 'input', // input anji-select
placeholder: '', placeholder: "",
disabled: false, disabled: false
}, },
{ {
label: '文件标识', // label: "文件标识", //
placeholder: '', placeholder: "",
field: 'fileId', field: "fileId",
editField: 'fileId', editField: "fileId",
tableHide: true, // tableHide: true, //
inputType: 'input', inputType: "input",
rules: [{ min: 1, max: 64, message: '不超过64个字符', trigger: 'blur' }], rules: [
disabled: false, { min: 1, max: 64, message: "不超过64个字符", trigger: "blur" }
],
disabled: false
}, },
{ {
label: '文件类型', // label: "文件类型", //
placeholder: '', placeholder: "",
field: 'fileType', field: "fileType",
editField: 'fileType', editField: "fileType",
inputType: 'input', inputType: "input",
rules: [{ min: 1, max: 1024, message: '不超过1024个字符', trigger: 'blur' }], rules: [
disabled: false, {
min: 1,
max: 1024,
message: "不超过1024个字符",
trigger: "blur"
}
],
disabled: false
}, },
{ {
label: '文件路径', // label: "文件路径", //
placeholder: '', placeholder: "",
field: 'filePath', field: "filePath",
editField: 'filePath', editField: "filePath",
inputType: 'input', inputType: "input",
rules: [{ min: 1, max: 1024, message: '不超过1024个字符', trigger: 'blur' }], rules: [
disabled: false, {
min: 1,
max: 1024,
message: "不超过1024个字符",
trigger: "blur"
}
],
disabled: false
}, },
{ {
label: 'url路径', // url label: "url路径", // url
placeholder: '', placeholder: "",
field: 'urlPath', field: "urlPath",
editField: 'urlPath', editField: "urlPath",
inputType: 'input', inputType: "input",
rules: [{ min: 1, max: 1024, message: '不超过1024个字符', trigger: 'blur' }], rules: [
disabled: false, {
min: 1,
max: 1024,
message: "不超过1024个字符",
trigger: "blur"
}
],
disabled: false
}, },
{ {
label: '内容说明', // label: "内容说明", //
placeholder: '', placeholder: "",
field: 'fileInstruction', field: "fileInstruction",
editField: 'fileInstruction', editField: "fileInstruction",
inputType: 'input', inputType: "input",
rules: [{ min: 1, max: 1024, message: '不超过1024个字符', trigger: 'blur' }], rules: [
disabled: false, {
min: 1,
max: 1024,
message: "不超过1024个字符",
trigger: "blur"
}
],
disabled: false
}, },
{ {
label: '创建人', label: "创建人",
field: 'createByView', field: "createByView",
columnType: 'expand', // columnType: "expand", //
inputType: 'input', // input inputType: "input", // input
disabled: true, // disabled: true //
}, },
{ {
label: '创建时间', label: "创建时间",
field: 'createTime', field: "createTime",
columnType: 'expand', columnType: "expand",
inputType: 'input', inputType: "input",
disabled: true, disabled: true
},
],
},
} }
]
}
};
}, },
computed: { computed: {
headers() { headers() {
return { return {
Authorization: getToken(), // token Authorization: getToken() // token
};
} }
}, },
},
created() {}, created() {},
methods: { methods: {
// //
handleUpload(response) { handleUpload(response) {
console.log(this) this.$refs.upload.clearFiles();
// //
this.$refs.listPage.handleQueryForm() this.$refs.listPage.handleQueryForm();
}, },
handleError() {}, handleError() {},
async downloadFile(row) { async downloadFile(row) {
window.open(row.urlPath) window.open(row.urlPath);
}, },
customButtom(val) { customButtom(val) {
this.downloadFile(val.msg) this.downloadFile(val.msg);
}, }
}, }
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.el-upload { .el-upload {

@ -5689,7 +5689,7 @@ const widgetTools = [
code: 'widgetBarStackChart', code: 'widgetBarStackChart',
type: 'chart', type: 'chart',
label: '柱状堆叠图', label: '柱状堆叠图',
icon: 'iconzhuzhuangtu', icon: 'iconbianzu23',
options: { options: {
// 配置 // 配置
setup: [ setup: [

Loading…
Cancel
Save