Skip to content

Commit d6d384a

Browse files
authored
fix: image loading error (#97)
1 parent 0e47d93 commit d6d384a

File tree

22 files changed

+12360
-15
lines changed

22 files changed

+12360
-15
lines changed

pnpm-lock.yaml

+12,305
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/images/1.jpeg

98.3 KB
Loading

src/assets/images/2.jpg

1.61 MB
Loading

src/assets/images/3.jpg

23.7 KB
Loading

src/assets/images/4.jpg

205 KB
Loading

src/assets/images/5.jpeg

2.08 MB
Loading
283 KB
Loading

src/assets/images/color-palette.gif

785 KB
Loading

src/assets/images/fu.png

14.2 KB
Loading

src/assets/images/size-preview.png

67.8 KB
Loading
+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import options from "./index.json";
2+
import IMAGE from "../../../../assets/images/4.jpg";
23

34
export const bigWorld = {
45
name: "Big World",
56
type: "image",
6-
options
7+
options: {
8+
...options,
9+
background: {
10+
...options.background,
11+
imageURL: IMAGE,
12+
},
13+
},
714
};

src/data/gallery/all/big-world/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"padding": 0,
1111
"dy": 30
1212
},
13-
"background": { "mode": "image", "imageURL": "http://pearmini.gitee.io/assets/colorfu/4.jpg" }
13+
"background": { "mode": "image" }
1414
}
+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import options from "./index.json";
2+
import IMAGE from "../../../../assets/images/5.jpeg";
23

34
export const challenge = {
45
name: "Face challenge",
56
type: "image",
6-
options
7+
options: {
8+
...options,
9+
background: {
10+
...options.background,
11+
imageURL: IMAGE,
12+
},
13+
},
714
};
15+

src/data/gallery/all/challenge/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"padding": 0,
1111
"dy": 30
1212
},
13-
"background": { "mode": "image", "imageURL": "http://pearmini.gitee.io/assets/colorfu/5.jpeg" }
13+
"background": { "mode": "image" }
1414
}

src/data/gallery/all/falling/index.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import options from "./index.json";
2+
import IMAGE from "../../../../assets/images/1.jpeg";
23

34
export const falling = {
45
name: "Falling Down",
56
type: "image",
6-
options
7+
options: {
8+
...options,
9+
background: {
10+
...options.background,
11+
imageURL: IMAGE,
12+
},
13+
},
714
};

src/data/gallery/all/falling/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"padding": 0,
1111
"dy": 30
1212
},
13-
"background": { "mode": "image", "imageURL": "http://pearmini.gitee.io/assets/colorfu/1.jpeg" }
13+
"background": { "mode": "image" }
1414
}
+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import options from "./index.json";
2+
import IMAGE from "../../../../assets/images/2.jpg";
23

34
export const goodNight = {
45
name: "Another Planet",
56
type: "image",
6-
options
7+
options: {
8+
...options,
9+
background: {
10+
...options.background,
11+
imageURL: IMAGE,
12+
},
13+
},
714
};

src/data/gallery/all/good-night/index.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"padding": 0,
1111
"dy": 30
1212
},
13-
"background": { "mode": "image", "imageURL": "http://pearmini.gitee.io/assets/colorfu/2.jpg" }
13+
"background": { "mode": "image"}
1414
}
+8-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import options from "./index.json";
2+
import IMAGE from "../../../../assets/images/3.jpg";
23

34
export const mountain = {
45
name: "Eat Red Sun",
56
type: "image",
6-
options
7+
options: {
8+
...options,
9+
background: {
10+
...options.background,
11+
imageURL: IMAGE,
12+
},
13+
},
714
};

src/data/gallery/all/mountain/index.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"dy": 30
1212
},
1313
"background": {
14-
"mode": "image",
15-
"imageURL": "http://pearmini.gitee.io/assets/colorfu/3.jpg"
14+
"mode": "image"
1615
}
1716
}

src/pages/Story.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</el-select>
4444
</p>
4545
</div>
46-
<img src="http://pearmini.gitee.io/assets/colorfu/fu.png" class="story-image" width="32%" />
46+
<img :src="FU_IMAGE" class="story-image" width="32%" />
4747
</div>
4848
<div class="story-body">
4949
<div v-if="selectedValue === 'emoji'">
@@ -140,6 +140,7 @@ import faces from "../data/emoticons.json";
140140
import { colorStore } from "../data/color";
141141
import { patterns } from "../data/pattern";
142142
import { gotoEditor } from "../utils/gotoEditor";
143+
import FU_IMAGE from "../assets/images/fu.png";
143144
144145
const emojis = Object.values(emojiByGroup).flat();
145146
@@ -172,6 +173,7 @@ export default {
172173
cardSize: 200,
173174
selectedImageColors: [],
174175
patternSize: screen.width / 2,
176+
FU_IMAGE,
175177
};
176178
},
177179
components: {

src/utils/attribute/index.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { getTextOptions } from "./text";
22
import { getBackgroundOptions } from "./background";
33
import { getColorOptions } from "./color";
4+
import COLOR_PALETTE from "../../assets/images/color-palette.gif";
5+
import SIZE_PREVIEW from "../../assets/images/size-preview.png";
6+
import BACKGROUND_PREVIEW from "../../assets/images/background-preivew.png";
47

58
export function getAttributeOptions(options) {
69
return {
@@ -11,7 +14,7 @@ export function getAttributeOptions(options) {
1114
name: "Colors",
1215
help: `
1316
<p style="color: #606266;font-size:14px;line-height: 1.4;">Sets attributes related to color here.</p>
14-
<img src="http://pearmini.gitee.io/assets/colorfu/color-palette.gif" />
17+
<img src=${COLOR_PALETTE} />
1518
`,
1619
children: [
1720
{
@@ -33,7 +36,7 @@ export function getAttributeOptions(options) {
3336
name: "Words",
3437
help: `
3538
<p style="color: #606266;font-size:14px;line-height: 1.4;">Sets attributes related to foreground words here.</p>
36-
<img src="http://pearmini.gitee.io/assets/colorfu/size-preview.png" width="100%"/>
39+
<img src=${SIZE_PREVIEW} width="100%"/>
3740
`,
3841
children: getTextOptions(options),
3942
},
@@ -42,7 +45,7 @@ export function getAttributeOptions(options) {
4245
name: "Background",
4346
help: `
4447
<p style="color: #606266;font-size:14px;line-height: 1.4;">Sets attributes relate to background here.</p>
45-
<img src="http://pearmini.gitee.io/assets/colorfu/background-preivew.png" width="100%"/>
48+
<img src=${BACKGROUND_PREVIEW} width="100%"/>
4649
`,
4750
children: getBackgroundOptions(options),
4851
},

0 commit comments

Comments
 (0)