发布 1.8.0 版本

This commit is contained in:
shizhong 2023-07-27 20:53:52 +08:00
parent 2104de6a71
commit 74aac991bc
4 changed files with 4 additions and 49 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "yudao-ui-admin-vue3", "name": "yudao-ui-admin-vue3",
"version": "1.7.3-snapshot", "version": "1.8.0-snapshot",
"description": "基于vue3、vite4、element-plus、typesScript", "description": "基于vue3、vite4、element-plus、typesScript",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,
@ -72,6 +72,7 @@
"vuedraggable": "^4.1.0", "vuedraggable": "^4.1.0",
"vxe-table": "^4.3.11", "vxe-table": "^4.3.11",
"web-storage-cache": "^1.1.1", "web-storage-cache": "^1.1.1",
"xe-utils": "^3.5.7",
"xml-js": "^1.6.11" "xml-js": "^1.6.11"
}, },
"devDependencies": { "devDependencies": {

View File

@ -105,8 +105,3 @@ export const exportSpu = async (params) => {
export const getSpuSimpleList = async () => { export const getSpuSimpleList = async () => {
return request.get({ url: '/product/spu/get-simple-list' }) return request.get({ url: '/product/spu/get-simple-list' })
} }
// 获得商品 SPU 精简列表
export const getSpuSimpleList = async () => {
return request.get({ url: '/product/spu/get-simple-list' })
}

View File

@ -3,8 +3,6 @@
<!-- 表单设计器 --> <!-- 表单设计器 -->
<FcDesigner ref="designer" height="780px"> <FcDesigner ref="designer" height="780px">
<template #handle> <template #handle>
<XButton type="primary" title="生成JSON" @click="showJson" />
<XButton type="primary" title="生成Options" @click="showOption" />
<XButton type="primary" :title="t('action.save')" @click="handleSave" /> <XButton type="primary" :title="t('action.save')" @click="handleSave" />
</template> </template>
</FcDesigner> </FcDesigner>
@ -13,7 +11,7 @@
<XTextButton style="float: right" :title="t('common.copy')" @click="copy(formValue)" /> <XTextButton style="float: right" :title="t('common.copy')" @click="copy(formValue)" />
<el-scrollbar height="580"> <el-scrollbar height="580">
<div> <div>
<pre><code class="hljs" v-html="highlightedCode(formValue)"></code></pre> <pre><code v-dompurify-html="highlightedCode(formValue)" class="hljs"></code></pre>
</div> </div>
</el-scrollbar> </el-scrollbar>
</div> </div>
@ -68,7 +66,6 @@ const message = useMessage() // 消息
const { query } = useRoute() // const { query } = useRoute() //
const designer = ref() // const designer = ref() //
const type = ref(-1)
const formValue = ref('') const formValue = ref('')
const dialogTitle = ref('') const dialogTitle = ref('')
const dialogVisible = ref(false) // const dialogVisible = ref(false) //
@ -116,20 +113,7 @@ const submitForm = async () => {
dialogLoading.value = false dialogLoading.value = false
} }
} }
const showJson = () => {
openModel('生成JSON')
type.value = 0
formValue.value = designer.value.getRule()
}
const showOption = () => {
openModel('生成Options')
type.value = 1
formValue.value = designer.value.getOption()
}
const openModel = (title: string) => {
dialogVisible1.value = true
dialogTitle.value = title
}
/** 复制 **/ /** 复制 **/
const copy = async (text: string) => { const copy = async (text: string) => {
// const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) }) // const { copy, copied, isSupported } = useClipboard({ source: JSON.stringify(text) })
@ -152,22 +136,6 @@ const copy = async (text: string) => {
oInput.remove() oInput.remove()
} }
/**
* 代码高亮
*/
import hljs from 'highlight.js' //
import 'highlight.js/styles/github.css' //
import java from 'highlight.js/lib/languages/java'
import xml from 'highlight.js/lib/languages/java'
import javascript from 'highlight.js/lib/languages/javascript'
import sql from 'highlight.js/lib/languages/sql'
import typescript from 'highlight.js/lib/languages/typescript'
const highlightedCode = (item) => {
const language = item.filePath.substring(item.filePath.lastIndexOf('.') + 1)
const result = hljs.highlight(language, item.code || '', true)
return result.value || '&nbsp;'
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
// //
@ -180,13 +148,5 @@ onMounted(async () => {
formValues.value = data formValues.value = data
setConfAndFields(designer, data.conf, data.fields) setConfAndFields(designer, data.conf, data.fields)
}) })
//
hljs.registerLanguage('java', java)
hljs.registerLanguage('xml', xml)
hljs.registerLanguage('html', xml)
hljs.registerLanguage('vue', xml)
hljs.registerLanguage('javascript', javascript)
hljs.registerLanguage('sql', sql)
hljs.registerLanguage('typescript', typescript)
}) })
</script> </script>

View File

@ -36,7 +36,6 @@ import hljs from 'highlight.js' // 导入代码高亮文件
import 'highlight.js/styles/github.css' // import 'highlight.js/styles/github.css' //
import xml from 'highlight.js/lib/languages/java' import xml from 'highlight.js/lib/languages/java'
import json from 'highlight.js/lib/languages/json' import json from 'highlight.js/lib/languages/json'
import formCreate from '@form-create/element-ui'
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //