|
|
@@ -17,7 +17,7 @@ import {
|
|
|
ElSelectV2
|
|
|
} from "element-plus";
|
|
|
import XEUtils from "xe-utils";
|
|
|
-import icon from '@/icons/iconfont.css'
|
|
|
+// import * as icon from '../src/icons/iconfont.css'
|
|
|
import {eachAndReturnList} from "@/utils/cyRefList";
|
|
|
import {useCompRef} from "@/utils/useCompRef";
|
|
|
import {QuestionFilled} from "@element-plus/icons-vue";
|
|
|
@@ -30,6 +30,14 @@ const emits = defineEmits<{
|
|
|
(e: "saveCallback"): void,
|
|
|
}>()
|
|
|
|
|
|
+const icon = ref('')
|
|
|
+
|
|
|
+async function importCss() {
|
|
|
+ const cssContent = await fetch('../src/icons/iconfont.css');
|
|
|
+ icon.value = await cssContent.text();
|
|
|
+}
|
|
|
+
|
|
|
+importCss()
|
|
|
|
|
|
const showDialog = ref(false)
|
|
|
const currentData = ref<IntergrationMenu>({
|
|
|
@@ -52,7 +60,6 @@ const currentData = ref<IntergrationMenu>({
|
|
|
|
|
|
const fromRef = useCompRef(ElForm)
|
|
|
|
|
|
-
|
|
|
const rules: FormRules<IntergrationMenu> = reactive({})
|
|
|
type D = keyof IntergrationMenu
|
|
|
|
|
|
@@ -90,7 +97,8 @@ const layout = [
|
|
|
|
|
|
function dialogOpen() {
|
|
|
const regex = /.(?<icon>.*):before/g;
|
|
|
- const matches = (icon as string).matchAll(regex);
|
|
|
+ const matches = icon.value.matchAll(regex);
|
|
|
+ console.log(matches)
|
|
|
icons.value = eachAndReturnList((matches as string[]), (item) => {
|
|
|
return item[1]
|
|
|
})
|
|
|
@@ -120,7 +128,6 @@ function handlePath() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
function iconClick(icon) {
|
|
|
currentData.value.icon = `iconfont ${icon}`
|
|
|
}
|