Merge remote-tracking branch 'origin/master'
commit
f6963cde37
|
|
@ -18,7 +18,7 @@
|
|||
</el-select>
|
||||
</ElDialog>
|
||||
<div v-else class="custom-hover" @click.stop="showTopSearch = !showTopSearch">
|
||||
<Icon icon="ep:search" :color="color"/>
|
||||
<Icon icon="ep:search" :color="color" />
|
||||
<el-select
|
||||
@click.stop
|
||||
filterable
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
import { useAppStore } from '@/store/modules/app'
|
||||
import { useDesign } from '@/hooks/web/useDesign'
|
||||
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
defineOptions({ name: 'Footer' })
|
||||
|
||||
const { getPrefixCls } = useDesign()
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ const { getPrefixCls } = useDesign()
|
|||
const prefixCls = getPrefixCls('menu')
|
||||
|
||||
export default defineComponent({
|
||||
// eslint-disable-next-line vue/no-reserved-component-names
|
||||
name: 'Menu',
|
||||
props: {
|
||||
menuSelect: {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ export const setCssVar = (prop: string, val: any, dom = document.documentElement
|
|||
* @param {Array} ary 查找的数组
|
||||
* @param {Functon} fn 判断的方法
|
||||
*/
|
||||
// eslint-disable-next-line
|
||||
export const findIndex = <T = Recordable>(ary: Array<T>, fn: Fn): number => {
|
||||
if (ary.findIndex) {
|
||||
return ary.findIndex(fn)
|
||||
|
|
|
|||
|
|
@ -89,11 +89,19 @@
|
|||
:href="row.url"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>预览</el-link
|
||||
>
|
||||
<el-link v-else type="primary" download :href="row.url" :underline="false" target="_blank"
|
||||
>下载</el-link
|
||||
预览
|
||||
</el-link>
|
||||
<el-link
|
||||
v-else
|
||||
type="primary"
|
||||
download
|
||||
:href="row.url"
|
||||
:underline="false"
|
||||
target="_blank"
|
||||
>
|
||||
下载
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {resolve} from 'path'
|
||||
import type {ConfigEnv, UserConfig} from 'vite'
|
||||
import {loadEnv} from 'vite'
|
||||
import {loadEnv, normalizePath} from 'vite'
|
||||
import {createVitePlugins} from './build/vite'
|
||||
import {exclude, include} from "./build/vite/optimize"
|
||||
// 当前执行node命令时文件夹的地址(工作目录)
|
||||
|
|
@ -20,6 +20,7 @@ export default ({command, mode}: ConfigEnv): UserConfig => {
|
|||
} else {
|
||||
env = loadEnv(mode, root)
|
||||
}
|
||||
const variablesScssPath = normalizePath(pathResolve('src/styles/variables.scss'))
|
||||
return {
|
||||
base: env.VITE_BASE_PATH,
|
||||
root: root,
|
||||
|
|
@ -47,7 +48,18 @@ export default ({command, mode}: ConfigEnv): UserConfig => {
|
|||
},
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "${pathResolve('src/styles/variables.scss')}" as *;`,
|
||||
additionalData: (source: string, filename: string) => {
|
||||
const normalizedFilename = normalizePath(filename)
|
||||
// Windows 下更容易触发重复注入:定义或显式转导变量的文件,不能再次注入同一个
|
||||
// `@use ... as *`,否则 Sass 会报 duplicate global variables。
|
||||
if (
|
||||
normalizedFilename.endsWith('/src/styles/variables.scss') ||
|
||||
normalizedFilename.endsWith('/src/styles/global.module.scss')
|
||||
) {
|
||||
return source
|
||||
}
|
||||
return `@use "${variablesScssPath}" as *;\n${source}`
|
||||
},
|
||||
api: 'modern-compiler'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue