Skip to content

Commit 301ea41

Browse files
authored
Merge pull request #2073 from Azir-11/v2.8.5
feat: 明确模块化为 EsModules,去除 postcss,提高 uno 的兼容性,支持解析 scss 的 apply;优化部分样式;
2 parents 38d7056 + 52b004e commit 301ea41

File tree

8 files changed

+18
-19
lines changed

8 files changed

+18
-19
lines changed

web/limit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// 运行项目前通过node执行此脚本 (此脚本与 node_modules 目录同级)
2-
const fs = require('fs')
3-
const path = require('path')
2+
import fs from 'fs'
3+
import path from 'path'
44
const wfPath = path.resolve(__dirname, './node_modules/.bin')
55

66
fs.readdir(wfPath, (err, files) => {

web/openDocument.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
未经授权的商用使用可能会被我们的资产搜索引擎爬取,并可能导致后续索赔。索赔金额将不低于高级授权费的十倍。请您遵守版权法律法规,尊重知识产权。
44
*/
55

6-
var child_process = require('child_process')
6+
import child_process from 'child_process'
77

88
var url = 'https://www.gin-vue-admin.com'
99
var cmd = ''

web/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"preview": "vite preview",
1010
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit"
1111
},
12+
"type": "module",
1213
"dependencies": {
1314
"@element-plus/icons-vue": "^2.3.1",
1415
"@form-create/designer": "^3.2.6",
1516
"@form-create/element-ui": "^3.2.10",
17+
"@unocss/transformer-directives": "^66.4.2",
1618
"@vue-office/docx": "^1.6.2",
1719
"@vue-office/excel": "^1.7.11",
1820
"@vue-office/pdf": "^2.0.2",
@@ -55,7 +57,6 @@
5557
"@babel/eslint-parser": "^7.25.1",
5658
"@eslint/js": "^8.56.0",
5759
"@unocss/extractor-svelte": "^66.4.2",
58-
"@unocss/postcss": "^66.4.2",
5960
"@unocss/preset-wind3": "^66.4.2",
6061
"@vitejs/plugin-legacy": "^6.0.0",
6162
"@vitejs/plugin-vue": "^5.0.3",

web/postcss.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

web/src/components/errorPreview/index.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<!-- 弹窗头部 -->
88
<div class="p-5 border-b border-gray-100 flex justify-between items-center">
99
<h3 class="text-lg font-semibold text-gray-800">{{ displayData.title }}</h3>
10-
<button class="text-gray-400 hover:text-gray-600 transition-colors" @click="closeModal">
11-
<close />
12-
</button>
10+
<div class="text-gray-400 hover:text-gray-600 transition-colors cursor-pointer" @click="closeModal">
11+
<close class="h-6 w-6" />
12+
</div>
1313
</div>
1414

1515
<!-- 弹窗内容 -->
16-
<div class="p-6">
16+
<div class="p-6 pt-0">
1717
<!-- 错误类型 -->
1818
<div class="mb-4">
1919
<div class="text-xs font-medium text-gray-500 uppercase mb-2">错误类型</div>
@@ -45,16 +45,16 @@
4545

4646
<!-- 弹窗底部 -->
4747
<div class="py-2 px-4 border-t border-gray-100 flex justify-end">
48-
<button class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm shadow-sm" @click="handleConfirm">
48+
<div class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors font-medium text-sm shadow-sm cursor-pointer" @click="handleConfirm">
4949
确定
50-
</button>
50+
</div>
5151
</div>
5252
</div>
5353
</div>
5454
</template>
5555

5656
<script setup>
57-
import { defineProps, defineEmits, ref, computed, onMounted } from 'vue';
57+
import { defineProps, defineEmits, computed } from 'vue';
5858
5959
const props = defineProps({
6060
errorData: {

web/src/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './style/element_visiable.scss'
22
import 'element-plus/theme-chalk/dark/css-vars.css'
3+
import 'uno.css';
34
import { createApp } from 'vue'
45
import ElementPlus from 'element-plus'
56

web/src/style/main.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
@use '@/style/iconfont.css';
22
@use "./transition.scss";
33

4-
@unocss;
5-
64
.html-grey {
75
filter: grayscale(100%);
86
}

web/uno.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { defineConfig } from 'unocss'
1+
import { defineConfig } from '@unocss/vite';
22
import presetWind3 from '@unocss/preset-wind3';
3+
import transformerDirectives from '@unocss/transformer-directives'
34

45
export default defineConfig({
56
theme: {
@@ -19,4 +20,7 @@ export default defineConfig({
1920
presets: [
2021
presetWind3({ dark: 'class' })
2122
],
23+
transformers: [
24+
transformerDirectives(),
25+
],
2226
})

0 commit comments

Comments
 (0)