Skip to content

Commit

Permalink
fix(模板图片): 图片宽度调整
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaojob committed Aug 11, 2023
1 parent 854b124 commit d8ae376
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"prettier.configPath": ".prettierrc.js",
"prettier.requireConfig": true // 需要Prettier的配置文件
"prettier.requireConfig": true,
"i18n-ally.localesPaths": [
"src/language"
],
"i18n-ally.sourceLanguage": "zh" // 需要Prettier的配置文件
}
4 changes: 2 additions & 2 deletions src/components/importTmpl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 秦少卫
* @Date: 2022-09-03 19:16:55
* @LastEditors: 秦少卫
* @LastEditTime: 2023-08-05 17:49:58
* @LastEditTime: 2023-08-11 10:12:00
* @Description: 导入模板
-->

Expand Down Expand Up @@ -164,7 +164,7 @@ const search = () => {
}
}
.tmpl-img {
width: 135px;
width: 132px;
cursor: pointer;
margin-right: 5px;
}
Expand Down
42 changes: 21 additions & 21 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @Author: June
* @Date: 2023-04-24 00:25:39
* @LastEditors: 秦少卫
* @LastEditTime: 2023-07-29 21:47:22
* @LastEditTime: 2023-08-11 10:13:09
*/
import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue';
Expand All @@ -13,7 +13,7 @@ import vueJsx from '@vitejs/plugin-vue-jsx';
import eslintPlugin from 'vite-plugin-eslint'; //导入包
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus';
import autoImports from 'unplugin-auto-import/vite';
import { VitePWA } from 'vite-plugin-pwa';
// import { VitePWA } from 'vite-plugin-pwa';

type CacheStrategy =
| 'CacheFirst'
Expand Down Expand Up @@ -53,25 +53,25 @@ const config = ({ mode }) => {
base: isProd ? '/vue-fabric-editor/' : '/',
plugins: [
vue(),
VitePWA({
manifest: false,
registerType: 'autoUpdate',
workbox: {
cacheId: APP_TITLE,
runtimeCaching: [
getCache({
// js /css /ts静态资源缓存
name: 'js-css-cache',
pattern: /(.*?)\.(js|css|ts)/,
}),
getCache({
// 图片缓存
name: 'image-cache',
pattern: /(.*?)\.(png|jpe?g|svg|gif|json|psd|ttf)/,
}),
],
},
}),
// VitePWA({
// manifest: false,
// registerType: 'autoUpdate',
// workbox: {
// cacheId: APP_TITLE,
// runtimeCaching: [
// getCache({
// // js /css /ts静态资源缓存
// name: 'js-css-cache',
// pattern: /(.*?)\.(js|css|ts)/,
// }),
// getCache({
// // 图片缓存
// name: 'image-cache',
// pattern: /(.*?)\.(png|jpe?g|svg|gif|json|psd|ttf)/,
// }),
// ],
// },
// }),
autoImports({
imports: ['vue'],
eslintrc: {
Expand Down

0 comments on commit d8ae376

Please sign in to comment.