Skip to content

Commit 89584f8

Browse files
committed
屬性 :html 現可正常插入內容。
1 parent e423d11 commit 89584f8

File tree

13 files changed

+35
-26
lines changed

13 files changed

+35
-26
lines changed

DEPRECATION.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
## 預計 `1.*.*` 移除
1+
## 預計 `1.*.*` 棄用
22

3-
- 所有的生命週期方法需要移動至 `when` 值中。確保代碼一致性和可維護性。
4-
- `lifecycle` 對象:任何使用 `lifecycle` 對象定義生命週期方法的方式將被去除。
5-
- 獨立定義的生命週期方法:所有在 `QUI` 對象中直接定義的生命週期方法(例如,`before_render` 等)都將不再被支持。
6-
從以下寫法:
7-
```JavaScript
3+
> 為確保代碼風格保有一致性與壓縮代碼容量,本專案 1.0.0 開始僅保留駝峰命名的屬性。不再支持蛇形名的屬性。
4+
5+
- 生命週期方法統一移至 `when` 對象中:
6+
- 移除 `lifecycle` 對象
7+
- `when` 對象僅保留駝峰命名屬性
8+
- 移除 QUI 對象中直接定義的生命週期方法
9+
- 舊寫法:
10+
```javascript
811
const app = new QUI({
912
lifecycle: {
1013
before_render: _ => {
@@ -16,14 +19,16 @@
1619
}
1720
});
1821
```
19-
改為
20-
```JavaScript
22+
- 新寫法
23+
```javascript
2124
const app = new QUI({
2225
when: {
23-
before_render: _ => {
24-
console.log("準備渲染")
26+
beforeRender: _ => {
27+
console.log("準備渲染")
2528
},
2629
}
2730
});
2831
```
29-
- 非標準 CSS 屬性寫法將不再支持。請使用標準 CSS 屬性名稱。 (例如:將 `:borderRadius` 改為 `:border-radius`;將 `:bg-color` 改為 `:background-color`)
32+
- CSS 屬性統一使用標準寫法:
33+
-`:borderRadius` 改為 `:border-radius`
34+
-`:bg-color` 改為 `:background-color`

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# PDQuickUI
22

3-
![](https://img.shields.io/badge/tag-JavaScript%20Library-bb4444) ![](https://img.shields.io/github/size/pardnchiu/PDQuickUI/dist%2FPDQuickUI.js) ![](https://img.shields.io/github/license/pardnchiu/PDQuickUI)<br>
4-
[![](https://img.shields.io/github/v/release/pardnchiu/PDQuickUI)](https://github.com/pardnchiu/PDQuickUI) [![](https://img.shields.io/npm/v/pdquickui)](https://www.npmjs.com/package/pdquickui) ![](https://img.shields.io/jsdelivr/npm/hw/pdquickui)<br>
3+
![](https://img.shields.io/badge/tag-JavaScript%20Library-bb4444)
4+
![](https://img.shields.io/github/size/pardnchiu/PDQuickUI/dist%2FPDQuickUI.js)
5+
![](https://img.shields.io/github/license/pardnchiu/PDQuickUI)<br>
6+
[![](https://img.shields.io/github/v/release/pardnchiu/PDQuickUI)](https://github.com/pardnchiu/PDQuickUI)
7+
[![](https://img.shields.io/npm/v/pdquickui)](https://www.npmjs.com/package/pdquickui)
8+
[![](https://img.shields.io/jsdelivr/npm/hw/pdquickui)](https://www.jsdelivr.com/package/npm/pdquickui)<br>
59
[![](https://img.shields.io/badge/read-English%20Version-ffffff)](https://github.com/pardnchiu/PDQuickUI/blob/main/README.en.md)
610

711
`PDQuickUI` 是從 [PDRenderKit](https://github.com/pardnchiu/PDRenderKit) 中獨立出來的前端渲染框架,專注於強化前端框架功能。<br>

dist/PDQuickUI.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/PDQuickUI.module.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151

5252
<!-- 資源預載: https://cdn.jsdelivr.net -->
5353
<link rel="preconnect" href="https://cdn.jsdelivr.net">
54-
<link rel="preload" href="https://cdn.jsdelivr.net/npm/pdmarkdownkit@latest/dist/PDQuickUI.js" as="script">
55-
<link rel="preload" href="https://cdn.jsdelivr.net/npm/pdmarkdownkit@latest/dist/PDRenderKit.js" as="script">
54+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/pdquickui@latest/dist/PDQuickUI.js" as="script">
55+
<link rel="preload" href="https://cdn.jsdelivr.net/npm/pdrenderkit@latest/dist/PDRenderKit.js" as="script">
5656
<link rel="preload" href="https://cdn.jsdelivr.net/npm/pdmarkdownkit@latest/dist/PDMarkdownKit.js" as="script">
5757
<!-- <script src="./dist/PDQuickUI.js" copyright="Pardn Ltd"></script> -->
5858
<!-- <script src="./src/PDQuickUI.js" copyright="Pardn Ltd"></script> -->
@@ -68,7 +68,7 @@
6868
</head>
6969

7070
<body id="app" :effect="fade-in">
71-
<strong>延遲載入過渡</strong>
71+
<strong :html="延遲載入過渡"></strong>
7272
<hr>
7373
<img :lazyload="https://picsum.photos/id/1/640/480" alt="">
7474
<hr>
@@ -236,16 +236,16 @@ <h4 :else>{{ title }} 4
236236
// },
237237
// "test"`);
238238
// console.log(html)
239-
// setTimeout(_ => {
239+
setTimeout(_ => {
240240

241-
// app.data.heading = 3
242-
// }, 2000)
243-
// setTimeout(_ => {
241+
app.data.heading = 3
242+
}, 1000)
243+
setTimeout(_ => {
244244

245-
// app.data.isH2 = true
246-
// app.data.obj.home.ary[0].name = "Test"
245+
app.data.isH2 = true
246+
app.data.obj.home.ary[0].name = "Test"
247247

248-
// }, 3000)
248+
}, 2000)
249249
console.log("已渲染")
250250
},
251251
before_update: _ => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pdquickui",
3-
"version": "0.5.2",
3+
"version": "0.5.3",
44
"description": "PDQuickUI contains a lightweight front-end framework designed to separate the front-end user interface and data logic.",
55
"main": "dist/PDQuickUI.js",
66
"module": "dist/PDQuickUI.module.js",

src/*.ts

74 Bytes
Binary file not shown.

src/PDQuickUI.js

2.71 KB
Binary file not shown.

src/function/printLog.ts

27 Bytes
Binary file not shown.

src/listener/LazyloadListener.ts

1 Byte
Binary file not shown.

src/listener/SVGListener.ts

1 Byte
Binary file not shown.

src/model/Lifecycle.ts

2 Bytes
Binary file not shown.

src/model/QUI.ts

-19.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)