File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 11<!--
22 * @Author: 秦少卫
33 * @Date: 2022-09-03 19:16:55
4- * @LastEditors: 秦少卫
5- * @LastEditTime: 2023-07-16 12:15:26
4+ * @LastEditors: June
5+ * @LastEditTime: 2024-04-15 19:52:00
66 * @Description: 组合元素对齐
77-->
88
169169 </div >
170170</template >
171171
172- <script setup name="Align">
172+ <script name="Align" lang="ts" setup >
173173import useSelect from ' @/hooks/select' ;
174174
175175const { mixinState, canvasEditor } = useSelect ();
Original file line number Diff line number Diff line change @@ -9,16 +9,12 @@ import FontFaceObserver from 'fontfaceobserver';
99import fontList from '@/assets/fonts/font' ;
1010import axios from 'axios' ;
1111import { Spin , Message } from 'view-ui-plus' ;
12- import { useI18n } from 'vue-i18n' ;
13- import { computed , onMounted , ref , unref } from 'vue' ;
1412
1513const repoSrc = import . meta. env . APP_REPO ;
1614
1715const _fontList = ref < any [ ] > ( [ ] ) ;
1816
1917export function useFont ( ) {
20- const { t } = useI18n ( ) ;
21-
2218 const initFont = ( ) => {
2319 if ( unref ( _fontList ) . length > 0 ) return ;
2420 axios . get ( `${ repoSrc } /font/free-font.json` ) . then ( ( res ) => {
@@ -36,12 +32,12 @@ export function useFont() {
3632 font
3733 . load ( null , 150000 )
3834 . then ( ( ) => {
39- Message . success ( t ( 'alert.loading_fonts_success' ) ) ;
35+ Message . success ( '字体加载成功' ) ;
4036 Spin . hide ( ) ;
4137 resolve ( true ) ;
4238 } )
4339 . catch ( ( ) => {
44- Message . error ( t ( 'alert.loading_fonts_failed' ) ) ;
40+ Message . error ( '字体加载失败' ) ;
4541 Spin . hide ( ) ;
4642 resolve ( false ) ;
4743 } ) ;
You can’t perform that action at this time.
0 commit comments