main
zhuzihcu 2023-06-12 16:46:02 +08:00
parent 2fbc5696f7
commit 31bdea8d44
49 changed files with 125 additions and 56 deletions

View File

@ -134,7 +134,8 @@ FluExpander{
"FluPasswordBox", "FluPasswordBox",
"FluBreadcrumbBar", "FluBreadcrumbBar",
"FluCopyableText", "FluCopyableText",
"FluAcrylic" "FluAcrylic",
"FluRemoteLoader"
]; ];
code = code.replace(/\n/g, "<br>"); code = code.replace(/\n/g, "<br>");
code = code.replace(/ /g, "&nbsp;"); code = code.replace(/ /g, "&nbsp;");

View File

@ -291,6 +291,18 @@ FluObject{
navigationView.push("qrc:/example/qml/page/T_MediaPlayer.qml") navigationView.push("qrc:/example/qml/page/T_MediaPlayer.qml")
} }
} }
}
FluPaneItemExpander{
title:lang.other
icon:FluentIcons.Media
FluPaneItem{
title:"RemoteLoader"
onTap:{
navigationView.push("qrc:/example/qml/page/T_RemoteLoader.qml")
}
}
} }
function getRecentlyAddedData(){ function getRecentlyAddedData(){

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -4,7 +4,7 @@ import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Controls.Basic import QtQuick.Controls.Basic
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import "qrc:///example/qml/global/" import "qrc:///example/qml/global"
import FluentUI import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage { FluScrollablePage {

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -0,0 +1,12 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
import "qrc:///example/qml/component"
FluRemoteLoader{
property int pageMode: FluNavigationView.Standard
property string url: ''
source: "https://zhu-zichu.gitee.io/T_RemoteLoader.qml"
}

View File

@ -3,8 +3,8 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "qrc:///example/qml/global/" import "qrc:///example/qml/global"
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import "../component" import "qrc:///example/qml/component"
import FluentUI import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage{ FluScrollablePage{

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts
import QtQuick.Window import QtQuick.Window
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
FluScrollablePage { FluScrollablePage {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Layouts import QtQuick.Layouts
import QtQuick.Controls import QtQuick.Controls
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -4,8 +4,8 @@ import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Qt.labs.platform import Qt.labs.platform
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
import "qrc:///example/qml/global/" import "qrc:///example/qml/global"
CustomWindow { CustomWindow {
@ -110,20 +110,32 @@ CustomWindow {
z:7 z:7
darkClickListener:(button)=>handleDarkChanged(button) darkClickListener:(button)=>handleDarkChanged(button)
} }
Row{
z:8
FluIconButton{ FluIconButton{
iconSource: FluentIcons.ChromeBack iconSource: FluentIcons.ChromeBack
width: 30 width: 30
height: 30 height: 30
iconSize: 13 iconSize: 13
z:8
onClicked: { onClicked: {
flipable.flipped = false flipable.flipped = false
} }
} }
FluText{ FluIconButton{
font: FluTextStyle.Title iconSource: FluentIcons.Sync
text:"建设中..." width: 30
anchors.centerIn: parent height: 30
iconSize: 13
onClicked: {
loader.reload()
}
}
}
FluRemoteLoader{
id:loader
anchors.fill: parent
source: "https://zhu-zichu.gitee.io/RemoteComponent.qml"
} }
} }
front: Item{ front: Item{
@ -162,6 +174,7 @@ CustomWindow {
onLoginClicked:{ onLoginClicked:{
clickCount += 1 clickCount += 1
if(clickCount === 1){ if(clickCount === 1){
loader.reload()
flipable.flipped = true flipable.flipped = true
clickCount = 0 clickCount = 0
} }

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import FluentUI import FluentUI
import "../component" import "qrc:///example/qml/component"
CustomWindow { CustomWindow {

View File

@ -19,4 +19,5 @@ En::En(QObject *parent)
settings("Settings"); settings("Settings");
locale("Locale"); locale("Locale");
navigation_view_display_mode("NavigationView Display Mode"); navigation_view_display_mode("NavigationView Display Mode");
other("Other");
} }

View File

@ -22,6 +22,7 @@ class Lang : public QObject
Q_PROPERTY_AUTO(QString,settings); Q_PROPERTY_AUTO(QString,settings);
Q_PROPERTY_AUTO(QString,navigation_view_display_mode); Q_PROPERTY_AUTO(QString,navigation_view_display_mode);
Q_PROPERTY_AUTO(QString,locale); Q_PROPERTY_AUTO(QString,locale);
Q_PROPERTY_AUTO(QString,other);
public: public:
explicit Lang(QObject *parent = nullptr); explicit Lang(QObject *parent = nullptr);

View File

@ -19,4 +19,5 @@ Zh::Zh(QObject *parent)
settings("设置"); settings("设置");
locale("语言环境"); locale("语言环境");
navigation_view_display_mode("导航视图显示模式"); navigation_view_display_mode("导航视图显示模式");
other("其他");
} }

View File

@ -16,7 +16,9 @@ Item {
id:control id:control
FluText{ FluText{
id:text_title id:text_title
font: FluTextStyle.TitleLarge visible: text !== ""
height: visible ? implicitHeight : 0
font: FluTextStyle.Title
anchors{ anchors{
top: parent.top top: parent.top
topMargin: control.topPadding topMargin: control.topPadding

View File

@ -0,0 +1,26 @@
import QtQuick
import QtQuick.Controls
import FluentUI
Item {
id:control
property url source: ""
Loader{
id:loader
anchors.fill: parent
source: control.source
asynchronous: true
}
FluProgressRing{
anchors.centerIn: parent
visible: loader.status === Loader.Loading
}
function reload(){
var timestamp = Date.now();
loader.source = control.source+"?"+timestamp
}
}